Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IRC commands work with . as prefix too
  • Loading branch information
UnknownShadow200 committed Jul 17, 2017
1 parent 076151d commit d836984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fCraft/Network/IRCHandlers.cs
Expand Up @@ -21,7 +21,7 @@ internal static class IRCHandlers {
string cmd = rawMessage.ToLower();
bool elapsed = DateTime.UtcNow.Subtract(lastIrcCommand).TotalSeconds > 5;

if (cmd.StartsWith(".players") || cmd.StartsWith(".who")) {
if (cmd.StartsWith(".who")) {
if (!elapsed) return true;
HandlePlayers(userNick, null);
lastIrcCommand = DateTime.UtcNow;
Expand All @@ -30,7 +30,7 @@ internal static class IRCHandlers {

foreach (var kvp in commands) {
string cmdName = kvp.Key;
if (cmd.StartsWith("!" + cmdName) || cmd.StartsWith(nick + " " + kvp.Key)) {
if (cmd.StartsWith("!" + cmdName) || cmd.StartsWith("." + cmdName) || cmd.StartsWith(nick + " " + kvp.Key)) {
if (!elapsed) return true;

int start = cmd[0] == '!' ? 0 : nick.Length;
Expand Down

0 comments on commit d836984

Please sign in to comment.