fixed cmd_resync (bot shouldn't deop itself...)
[NeonServV5.git] / cmd_neonserv_resync.c
index 5ce398305d0ab694fbf81c49bc6d012604a4a618..78a1edd50271d1a29e823d7708ec8c594b0229f0 100644 (file)
@@ -103,12 +103,12 @@ static void neonserv_cmd_resync_async1(struct ClientSocket *client, struct Clien
             if(!(chanuser->flags & CHANUSERFLAG_OPPED) && resync_op)
                 modeBufferOp(modeBuf, chanuser->user->nick);
         } else if(caccess >= db_enfvoice) {
-            if((chanuser->flags & CHANUSERFLAG_OPPED) && resync_op)
+            if((chanuser->flags & CHANUSERFLAG_OPPED) && resync_op && !(chanuser->user->flags & (USERFLAG_ISBOT | USERFLAG_ISIRCOP)))
                 modeBufferDeop(modeBuf, chanuser->user->nick);
             if(!(chanuser->flags & CHANUSERFLAG_VOICED) && resync_voice)
                 modeBufferVoice(modeBuf, chanuser->user->nick);
         } else {
-            if((chanuser->flags & CHANUSERFLAG_OPPED) && resync_op)
+            if((chanuser->flags & CHANUSERFLAG_OPPED) && resync_op && !(chanuser->user->flags & (USERFLAG_ISBOT | USERFLAG_ISIRCOP)))
                 modeBufferDeop(modeBuf, chanuser->user->nick);
             if((chanuser->flags & CHANUSERFLAG_VOICED) && resync_voice)
                 modeBufferDevoice(modeBuf, chanuser->user->nick);