fixed last commits
[NeonServV5.git] / cmd_neonserv_opall.c
index 65195d22faf01dcd625eef3375fc217b38fe5fef..0c9c7f77354f36f26d72ea128b862bab5befa470 100644 (file)
@@ -5,9 +5,8 @@
 */
 
 static CMD_BIND(neonserv_cmd_opall) {
-    int i, done_users;
+    int done_users = 0;
     char *nickmask = NULL;
-    struct UserNode *cuser;
     struct ChanUser *chanuser;
     struct ModeBuffer *modeBuf;
     check_mysql();
@@ -25,7 +24,7 @@ static CMD_BIND(neonserv_cmd_opall) {
     for(chanuser = getChannelUsers(chan, NULL); chanuser; chanuser = getChannelUsers(chan, chanuser)) {
         if(nickmask && match(nickmask, chanuser->user->nick)) continue;
         if(chanuser->flags & CHANUSERFLAG_OPPED) continue;
-        modeBufferOp(modeBuf, argv[i]);
+        modeBufferOp(modeBuf, chanuser->user->nick);
         done_users++;
     }
     freeModeBuffer(modeBuf);