Browse Source

* Port [3686] to 1.2.15
* Fix a case where 'botcmd ?' would loop forever when a hub had a 1 character handle



svn: 3687

Bryan Drewery 18 năm trước cách đây
mục cha
commit
e3a8db0648
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 1 0
      doc/UPDATES
  2. 2 1
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -13,6 +13,7 @@
 * Dont show portmin/portmax/pscloak/autouname in binary config unless they are set
 * Fix possible situation where an error while saving userfile is not reported (fixes #287)
 * Fix a bug where some nets did not save userfile correctly
+* Fix a case where 'botcmd ?' would loop forever when a hub had a 1 character handle
 
 1.2.14 - http://wraith.botpack.net/milestone/1.2.14
 * Fix another bug in shell functions. (fixes #321)

+ 2 - 1
src/cmds.c

@@ -1344,7 +1344,8 @@ static void cmd_botcmd(int idx, char *par)
     }
   }
 
-  if (wild_match(botm, conf.bot->nick) || !egg_strcasecmp(botm, conf.bot->nick)) {
+  /* Only wild_match when not using botm=? and strlen(conf.bot->nick) > 1, ie dont match on hubs with 1 letter nicks */
+  if ((!(strlen(conf.bot->nick) == 1 && !strcmp(botm, "?")) && wild_match(botm, conf.bot->nick)) || !egg_strcasecmp(botm, conf.bot->nick)) {
     found++;
     check_bind_dcc(cmd, idx, par);
   }