소스 검색

* ifdef out some DEBUG code

svn: 3967
Bryan Drewery 17 년 전
부모
커밋
700b8be0a3
2개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/chanprog.c
  2. 2 0
      src/set.c

+ 6 - 4
src/chanprog.c

@@ -749,15 +749,17 @@ bool bot_shouldjoin(struct userrec* u, struct flag_record* fr, struct chanset_t*
   /* If the bot is restarting (and hasn't finished getting the userfile for the first time) DO NOT JOIN channels - breaks +B/+backup */
   if (restarting || loading) return 0;
 
+#ifdef DEBUG
   /* Force debugging bots to only join 3 channels */
-  if (!strncmp(u->handle, STR("wtest"), 5)) {
-    if (!strcmp(chan->dname, STR("#skynet")) || 
-        !strcmp(chan->dname, STR("#bryan")) || 
-        !strcmp(chan->dname, STR("#wraith")))
+  if (!strncmp(u->handle, "wtest", 5) {
+    if (!strcmp(chan->dname, "#skynet") || 
+        !strcmp(chan->dname, "#bryan") || 
+        !strcmp(chan->dname, "#wraith"))
       return 1;
     else
       return 0;
   }
+#endif
   return (!channel_inactive(chan) && (channel_backup(chan) || (!glob_backup(*fr) && !chan_backup(*fr))));
 }
 

+ 2 - 0
src/set.c

@@ -614,8 +614,10 @@ void init_vars()
       var_set(&vars[i], NULL, NULL);		//empty out and set to defaults
   }
   var_set_by_name(NULL, "chanset", def_chanset);
+#ifdef DEBUG
   if (!strncmp(conf.bot->nick, "wtest", 5))
     var_set_by_name(NULL, "homechan", "#bryan");
+#endif
 }
 
 /* This is used to parse (GLOBAL) userfile var lines and changes via .set from a remote hub */