]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/proto-p10.c
hash: fix variable set for registering nick change functions
[irc/evilnet/x3.git] / src / proto-p10.c
index eb9e48333a75738e9e0ff62728ba53a8727b3f17..b7b08641c6842f53452dffd85a5185df96841f47 100644 (file)
@@ -1366,7 +1366,6 @@ static CMD_FUNC(cmd_eob)
 {
     struct server *sender;
     dict_iterator_t it;
-    unsigned int ii;
 
     if (!(sender = GetServerH(origin)))
         return 0;
@@ -1387,8 +1386,7 @@ static CMD_FUNC(cmd_eob)
     }
     sender->self_burst = 0;
     recalc_bursts(sender);
-    for (ii=0; ii<slf_used; ii++)
-        slf_list[ii](sender);
+    call_server_link_funcs(sender);
     /* let auto-routing figure out if we were
      * wating on this server to link a child to it */
     /* DONT call this if uplink is _US_ */
@@ -1711,7 +1709,7 @@ irc_privs(struct userNode *target, char *flag, int add)
 }
 
 void
-irc_raw_privs(struct userNode *target, char *privs)
+irc_raw_privs(struct userNode *target, const char *privs)
 {
     putsock("%s " P10_PRIVS " %s %s", self->numeric, target->numeric,  privs);
 }
@@ -2477,6 +2475,7 @@ parse_cleanup(void)
 {
     unsigned int nn;
     free(of_list);
+    free(of_list_extra);
     free(privmsg_funcs);
     num_privmsg_funcs = 0;
     free(notice_funcs);
@@ -2985,7 +2984,7 @@ static struct userNode*
 AddUser(struct server* uplink, const char *nick, const char *ident, const char *hostname, const char *modes, const char *numeric, const char *userinfo, time_t timestamp, const char *realip)
 {
     struct userNode *oldUser, *uNode;
-    unsigned int n, ignore_user, dummy;
+    unsigned int ignore_user, dummy;
     char *tstr;
     int type;
 
@@ -3083,8 +3082,7 @@ AddUser(struct server* uplink, const char *nick, const char *ident, const char *
     }
     if (IsLocal(uNode))
         irc_user(uNode);
-    for (n=0; (n<nuf_used) && !uNode->dead; n++)
-        nuf_list[n](uNode);
+    call_new_user_funcs(uNode);
 
     if ((uNode->loc == 1) && (uNode->handle_info))
         send_func_list(uNode);
@@ -3096,7 +3094,6 @@ AddUser(struct server* uplink, const char *nick, const char *ident, const char *
 void
 DelUser(struct userNode* user, struct userNode *killer, int announce, const char *why)
 {
-    unsigned int n;
 
     verify(user);
 
@@ -3112,8 +3109,7 @@ DelUser(struct userNode* user, struct userNode *killer, int announce, const char
 
     /* Call these in reverse order so ChanServ can update presence
        information before NickServ nukes the handle_info. */
-    for (n = duf_used; n > 0; )
-        duf_list[--n](user, killer, why);
+    call_del_user_funcs(user, killer, why);
 
     user->uplink->clients--;
     user->uplink->users[user->num_local] = NULL;