瀏覽代碼

* Added some debug code to find a rare bug in hostmask checking

svn: 2016
Bryan Drewery 21 年之前
父節點
當前提交
421c8e056b
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/mod/server.mod/servmsg.c

+ 4 - 1
src/mod/server.mod/servmsg.c

@@ -1096,8 +1096,11 @@ static void check_hostmask()
     q = (struct list_type *) get_user(&USERENTRY_HOSTS, u);
     q = (struct list_type *) get_user(&USERENTRY_HOSTS, u);
     for (; q; q = q->next) {
     for (; q; q = q->next) {
       if (wild_match(s, q->extra) || wild_match(q->extra, s)) {
       if (wild_match(s, q->extra) || wild_match(q->extra, s)) {
-        if (u != conf.bot->u)
+        if (u != conf.bot->u) {
           putlog(LOG_WARN, "*", "My automatic hostmask '%s' would conflict with user: '%s'. (Not adding)", s, u->handle);
           putlog(LOG_WARN, "*", "My automatic hostmask '%s' would conflict with user: '%s'. (Not adding)", s, u->handle);
+          sdprintf("I am %s, they are: %s, (%X vs %X)", conf.bot->u->handle, u->handle, conf.bot->u, u);
+        } else
+          sdprintf("Already have hostmask '%s' added for myself", s);
         return;
         return;
       }
       }
     }
     }