Browse Source

Merge branch 'ducch-empty-invite' into maint

* ducch-empty-invite:
  * Update docs
  * Enforce syntax on .invite

Conflicts:
	doc/UPDATES
Bryan Drewery 14 years ago
parent
commit
dc5ef1f0f7
2 changed files with 7 additions and 0 deletions
  1. 1 0
      doc/UPDATES
  2. 6 0
      src/mod/irc.mod/cmdsirc.c

+ 1 - 0
doc/UPDATES

@@ -4,6 +4,7 @@ maint
   * Fix case where nick would rotate to NICK1 when already on NICK2 and NICK was unavailable
   * Documentation cleanups
   * Fixed 'request' kick msg with cmd_kick
+  * Enforce cmd_invite syntax
 
 1.3.3 - http://wraith.botpack.net/milestone/1.3.3
   * Fix --disable-ipv6 compiling

+ 6 - 0
src/mod/irc.mod/cmdsirc.c

@@ -1341,6 +1341,12 @@ static void cmd_find(int idx, char *par)
 static void do_invite(int idx, char *par, bool op)
 {
   char *nick = newsplit(&par), *chname = newsplit(&par);
+
+  if (!nick[0]) {
+    dprintf(idx, "Usage: invite <nickname> [channel|*]\n");
+    return;
+  }
+
   if (strchr(CHANMETA, nick[0]) || (!chname[0] && !strcmp(nick, "*")))
     std::swap(nick, chname);
   bool all = 0;