Kaynağa Gözat

* check_hostmask is lame

svn: 1056
Bryan Drewery 22 yıl önce
ebeveyn
işleme
58f9a992da
1 değiştirilmiş dosya ile 8 ekleme ve 7 silme
  1. 8 7
      src/mod/irc.mod/irc.c

+ 8 - 7
src/mod/irc.mod/irc.c

@@ -416,20 +416,21 @@ void check_hostmask()
   char s[UHOSTLEN + 2] = "", *tmp = NULL;
   struct list_type *q = NULL;
 
-  checked_hostmask = 1;
   if (!server_online || !botuserhost[0])
     return;
+
+  checked_hostmask = 1;
+
   tmp = botuserhost;
 
-  if (!tmp[0] || !tmp[1]) return;
-  if (tmp[0] != '~')
-    sprintf(s, "*!%s", tmp);
-  else {
+  if (tmp[0] == '~') {
     tmp++;
     sprintf(s, "*!*%s", tmp);
-  }
+  } else 
+    sprintf(s, "*!%s", tmp);
+
   for (q = get_user(&USERENTRY_HOSTS, conf.bot->u); q; q = q->next) {
-    if (!strcasecmp(q->extra, s))
+    if (!egg_strcasecmp(q->extra, s))
       return;
   }