ソースを参照

* Removed channel flag '+|-manop' as it was redundant with chanint 'manop'

svn: 1826
Bryan Drewery 21 年 前
コミット
f9f963d2d5

+ 1 - 0
doc/UPDATES

@@ -24,6 +24,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed.
 * Default binpath is now the directory the binary is in when doing -C.
 * Fixed a memory leak in dns
 * Fixed DNS staying on nameservers that fail to give replies
+* Removed channel flag '+|-manop' as it was redundant with chanint 'manop'
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 1 - 2
src/chan.h

@@ -215,7 +215,7 @@ struct chanset_t {
 #define CHAN_NOMOP	    BIT7        /* If a bot sees a mass op, botnet mdops */
 #define CHAN_REVENGE        BIT8	/* get revenge on bad people          */
 #define CHAN_SECRET         BIT9	/* don't advertise channel on botnet  */
-#define CHAN_MANOP          BIT10       /* manual opping allowed? */
+#undef  CHAN_10		    BIT10       /* not used */
 #define CHAN_CYCLE          BIT11	/* cycle the channel if possible      */
 #define CHAN_INACTIVE       BIT12	/* no irc support for this channel */
 #define CHAN_VOICE          BIT13	/* a bot +y|y will voice *, except +q */
@@ -272,7 +272,6 @@ struct chanset_t *findchan_by_dname(const char *name);
 #define channel_closed(chan) (chan->status & CHAN_CLOSED)
 #define channel_take(chan) (chan->status & CHAN_TAKE)
 #define channel_nomop(chan) (chan->status & CHAN_NOMOP)
-#define channel_manop(chan) (chan->status & CHAN_MANOP)
 #define channel_voice(chan) (chan->status & CHAN_VOICE)
 #define channel_fastop(chan) (chan->status & CHAN_FASTOP)
 #define channel_privchan(chan) (chan->status & CHAN_PRIVATE)

+ 1 - 1
src/misc.c

@@ -456,7 +456,7 @@ void show_channels(int idx, char *handle)
           first = 1;
         }
         dprintf(idx, format, !conf.bot->hub && me_op(chan) ? '@' : ' ', chan->dname, !shouldjoin(chan) ? "(inactive) " : "", 
-           channel_privchan(chan) ? "(private)  " : "", !channel_manop(chan) ? "(no manop) " : "", 
+           channel_privchan(chan) ? "(private)  " : "", chan->manop ? "(no manop) " : "", 
            channel_bitch(chan) ? "(bitch)    " : "", channel_closed(chan) ?  "(closed)" : "");
     }
   }

+ 0 - 3
src/mod/channels.mod/channels.c

@@ -851,8 +851,6 @@ void channels_report(int idx, int details)
           i += my_strcpy(s + i, "take ");
         if (channel_nomop(chan))
           i += my_strcpy(s + i, "nomop ");
-        if (channel_manop(chan))
-          i += my_strcpy(s + i, "manop ");
         if (channel_voice(chan))
           i += my_strcpy(s + i, "voice ");
         if (channel_autoop(chan))
@@ -930,7 +928,6 @@ void channels_init()
 	 "-nodesynch "
 	 "-closed "
 	 "-take "
-	 "+manop "
 	 "-voice "
          "-private "
 	 "-fastop ");

+ 0 - 1
src/mod/channels.mod/cmdschan.c

@@ -1241,7 +1241,6 @@ static void cmd_chaninfo(int idx, char *par)
     SHOW_FLAG("enforcebans", 	channel_enforcebans(chan));
     SHOW_FLAG("fastop",		channel_fastop(chan));
     SHOW_FLAG("inactive",	channel_inactive(chan));
-    SHOW_FLAG("manop",		channel_manop(chan));
     SHOW_FLAG("nodesynch",	channel_nodesynch(chan));
     SHOW_FLAG("nomop",		channel_nomop(chan));
     SHOW_FLAG("private",	channel_privchan(chan));

+ 0 - 12
src/mod/channels.mod/tclchan.c

@@ -433,14 +433,6 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item)
         return ERROR;
       }
       chan->bad_cookie = deflag_translate(item[i]);
-    } else if (!strcmp(item[i], "manop")) {
-      i++;
-      if (i >= items) {
-        if (result)
-          sprintf(result, "channel manop needs argument");
-        return ERROR;
-      }
-      chan->manop = deflag_translate(item[i]);
     } else if (!strcmp(item[i], "mdop")) {
       i++;
       if (i >= items) {
@@ -542,10 +534,6 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item)
       chan->status |= CHAN_NOMOP;
     else if (!strcmp(item[i], "-nomop"))
       chan->status &= ~CHAN_NOMOP;
-    else if (!strcmp(item[i], "+manop"))
-      chan->status |= CHAN_MANOP;
-    else if (!strcmp(item[i], "-manop"))
-      chan->status &= ~CHAN_MANOP;
     else if (!strcmp(item[i], "+voice"))
       chan->status |= CHAN_VOICE;
     else if (!strcmp(item[i], "-voice"))

+ 1 - 2
src/mod/channels.mod/userchan.c

@@ -1004,7 +1004,7 @@ flood-nick %d:%lu closed-ban %d closed-invite %d closed-private %d ban-time %lu
 exempt-time %lu invite-time %lu \
 %cenforcebans %cdynamicbans %cuserban %cbitch %cprotectops %crevenge \
 %crevengebot %cprivate %ccycle %cinactive %cdynamicexempts %cuserexempts \
-%cdynamicinvites %cuserinvites %cnodesynch %cclosed %ctake %cmanop %cvoice \
+%cdynamicinvites %cuserinvites %cnodesynch %cclosed %ctake %cvoice \
 %cfastop %cautoop }\n",
 	chan->dname,
 	w,
@@ -1055,7 +1055,6 @@ exempt-time %lu invite-time %lu \
 	PLSMNS(channel_nodesynch(chan)),
 	PLSMNS(channel_closed(chan)),
 	PLSMNS(channel_take(chan)),
-	PLSMNS(channel_manop(chan)),
 	PLSMNS(channel_voice(chan)),
 	PLSMNS(channel_fastop(chan)),
         PLSMNS(channel_autoop(chan))

+ 1 - 1
src/mod/irc.mod/mode.c

@@ -1129,7 +1129,7 @@ gotmode(char *from, char *msg)
                 putlog(LOG_DEBUG, "@", "Good op: %s", modes[modecnt - 1]);
             }
 
-            if (!channel_manop(chan) && !u->bot) {
+            if (chan->manop && !u->bot) {
               n = i = 0;
 
               switch (role) {