Sfoglia il codice sorgente

Silence unused variable warnings.

These are not implemented yet.
Bryan Drewery 2 anni fa
parent
commit
87863fbcbb
2 ha cambiato i file con 14 aggiunte e 7 eliminazioni
  1. 8 3
      src/mod/irc.mod/chan.cc
  2. 6 4
      src/mod/irc.mod/mode.cc

+ 8 - 3
src/mod/irc.mod/chan.cc

@@ -1520,7 +1520,7 @@ void recheck_channel(struct chanset_t *chan, int dobans)
 
 
   memberlist *m = NULL;
   memberlist *m = NULL;
   struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0 };
   struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0 };
-  int stop_reset = 0, botops = 0, nonbotops = 0, botnonops = 0;
+  int stop_reset = 0, botops = 0, /*nonbotops = 0,*/ botnonops = 0;
   bool flush = 0;
   bool flush = 0;
 
 
   ++stacking;
   ++stacking;
@@ -1536,8 +1536,11 @@ void recheck_channel(struct chanset_t *chan, int dobans)
           ++botops;
           ++botops;
         else
         else
           ++botnonops;
           ++botnonops;
-      } else if (hasop)
+#if 0
+      } else if (hasop) {
         ++nonbotops;
         ++nonbotops;
+#endif
+      }
     }
     }
   }
   }
 
 
@@ -3104,12 +3107,14 @@ void check_should_cycle(struct chanset_t *chan)
     return;
     return;
 
 
   //If there are other ops split off and i'm the only op on this side of split, cycle
   //If there are other ops split off and i'm the only op on this side of split, cycle
-  int localops = 0, localbotops = 0, splitops = 0, splitbotops = 0, localnonops = 0;
+  int localops = 0, localbotops = 0, /*splitops = 0,*/ splitbotops = 0, localnonops = 0;
 
 
   for (memberlist *ml = chan->channel.member; ml && ml->nick[0]; ml = ml->next) {
   for (memberlist *ml = chan->channel.member; ml && ml->nick[0]; ml = ml->next) {
     if (chan_hasop(ml)) {
     if (chan_hasop(ml)) {
       if (chan_issplit(ml)) {
       if (chan_issplit(ml)) {
+#if 0
         splitops++;
         splitops++;
+#endif
         if ((ml->user) && ml->user->bot)
         if ((ml->user) && ml->user->bot)
           splitbotops++;
           splitbotops++;
       } else {
       } else {

+ 6 - 4
src/mod/irc.mod/mode.cc

@@ -1070,7 +1070,7 @@ gotmode(char *from, char *msg)
       } else
       } else
         nick = splitnick(&from);
         nick = splitnick(&from);
 
 
-      int i = 0, modecnt = 0, ops = 0, deops = 0, bans = 0, unbans = 0;
+      int i = 0, modecnt = 0, ops = 0, deops = 0, /*bans = 0,*/ unbans = 0;
       bool me_opped = 0;
       bool me_opped = 0;
       char **modes = (char **) calloc(1, sizeof(char *));
       char **modes = (char **) calloc(1, sizeof(char *));
       char s[UHOSTLEN] = "";
       char s[UHOSTLEN] = "";
@@ -1118,10 +1118,12 @@ gotmode(char *from, char *msg)
                   me_opped = 0;
                   me_opped = 0;
               }
               }
             } else if (chg[0] == 'b') {
             } else if (chg[0] == 'b') {
-              if (sign == '+')
-                ++bans;
-              else
+              if (sign == '-')
                 ++unbans;
                 ++unbans;
+#if 0
+              else
+                ++bans;
+#endif
             }
             }
           }
           }
           ++chg;
           ++chg;