소스 검색

* Possibly fixed a bug in cmd_botcmd

svn: 794
Bryan Drewery 22 년 전
부모
커밋
79774ed690
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/cmds.c

+ 3 - 1
src/cmds.c

@@ -1529,13 +1529,15 @@ static void cmd_botcmd(struct userrec *u, int idx, char *par)
   }
   }
   
   
   for (tbot = tandbot; tbot; tbot = tbot->next) {
   for (tbot = tandbot; tbot; tbot = tbot->next) {
+    if (wild_match(botm, tbot->bot))
+      cnt++;
+
     if (!strcmp(botm, "?") && bot_hublevel(get_user_by_handle(userlist, tbot->bot)) != 999)
     if (!strcmp(botm, "?") && bot_hublevel(get_user_by_handle(userlist, tbot->bot)) != 999)
       continue;
       continue;
 
 
     if ((rleaf != (-1) && cnt == rleaf) || ((rleaf == (-1) && wild_match(botm, tbot->bot)))) {
     if ((rleaf != (-1) && cnt == rleaf) || ((rleaf == (-1) && wild_match(botm, tbot->bot)))) {
       send_remote_simul(idx, tbot->bot, cmd, par ? par : "");
       send_remote_simul(idx, tbot->bot, cmd, par ? par : "");
     }
     }
-    cnt++;
   }
   }
 
 
   if (!cnt) {
   if (!cnt) {