|
@@ -29,10 +29,16 @@ |
|
|
|
|
|
|
|
|
int endPos = text.IndexOf('>'); |
|
|
int endPos = text.IndexOf('>'); |
|
|
if (endPos == -1) return false; |
|
|
if (endPos == -1) return false; |
|
|
|
|
|
if (text.Length < endPos + 2 || text[endPos + 1] != ' ') return false; //Must end in "> " |
|
|
|
|
|
|
|
|
ulong userId; |
|
|
ulong userId; |
|
|
if (!MentionUtils.TryParseUser(text.Substring(0, endPos), out userId)) return false; |
|
|
|
|
|
return userId == user.Id; |
|
|
|
|
|
|
|
|
if (!MentionUtils.TryParseUser(text.Substring(0, endPos + 2), out userId)) return false; |
|
|
|
|
|
if (userId == user.Id) |
|
|
|
|
|
{ |
|
|
|
|
|
argPos = endPos + 2; |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |