Skip to content
Permalink
Browse files

IRC commands work with . as prefix too

  • Loading branch information...
UnknownShadow200 committed Jul 17, 2017
1 parent 076151d commit d8369847c5c177659d317a373bc19abadc66686e
Showing with 2 additions and 2 deletions.
  1. +2 −2 fCraft/Network/IRCHandlers.cs
@@ -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;
@@ -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;

0 comments on commit d836984

Please sign in to comment.
You can’t perform that action at this time.