basic off-channel support; restructuring how part functions are handled
[srvx.git] / src / hash.c
index 98705bac8fbf8fc5abe789687df0786ac3cafa06..cbe43ceaa9c1dc5627ff2f176e1eaf624ce7eb00 100644 (file)
@@ -544,14 +544,14 @@ DelChannelUser(struct userNode* user, struct chanNode* channel, const char *reas
     if (!mNode)
         return;
 
+    for (n=0; n<pf_used; n++)
+       pf_list[n](mNode, reason);
+
     /* remove modeNode from channel and user */
     modeList_remove(&channel->members, mNode);
     modeList_remove(&user->channels, mNode);
     free(mNode);
 
-    for (n=0; n<pf_used; n++)
-        pf_list[n](user, channel, reason);
-
     if (!deleting && !channel->members.used && !channel->locks)
         DelChannel(channel);
 }