Browse Source

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

svn: 1827
Bryan Drewery 21 năm trước cách đây
mục cha
commit
71a27a3c7b

+ 1 - 0
doc/UPDATES

@@ -25,6 +25,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed.
 * 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'
+* Removed channel flag '+|-nomop' as it was redundant with chanint 'mop'
 
 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

@@ -212,7 +212,7 @@ struct chanset_t {
 #define CHAN_BITCH          BIT4	/* be a tightwad with ops             */
 #define CHAN_TAKE 	    BIT5	/* When a bot gets opped, take the chan */
 #define CHAN_PROTECTOPS     BIT6	/* re-op any +o people who get deop'd */
-#define CHAN_NOMOP	    BIT7        /* If a bot sees a mass op, botnet mdops */
+#undef  CHAN_7              BIT7        /* unused */
 #define CHAN_REVENGE        BIT8	/* get revenge on bad people          */
 #define CHAN_SECRET         BIT9	/* don't advertise channel on botnet  */
 #undef  CHAN_10		    BIT10       /* not used */
@@ -271,7 +271,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_voice(chan) (chan->status & CHAN_VOICE)
 #define channel_fastop(chan) (chan->status & CHAN_FASTOP)
 #define channel_privchan(chan) (chan->status & CHAN_PRIVATE)

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

@@ -849,8 +849,6 @@ void channels_report(int idx, int details)
           i += my_strcpy(s + i, "closed ");
         if (channel_take(chan))
           i += my_strcpy(s + i, "take ");
-        if (channel_nomop(chan))
-          i += my_strcpy(s + i, "nomop ");
         if (channel_voice(chan))
           i += my_strcpy(s + i, "voice ");
         if (channel_autoop(chan))

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

@@ -1242,7 +1242,6 @@ static void cmd_chaninfo(int idx, char *par)
     SHOW_FLAG("fastop",		channel_fastop(chan));
     SHOW_FLAG("inactive",	channel_inactive(chan));
     SHOW_FLAG("nodesynch",	channel_nodesynch(chan));
-    SHOW_FLAG("nomop",		channel_nomop(chan));
     SHOW_FLAG("private",	channel_privchan(chan));
     SHOW_FLAG("protectops",	channel_protectops(chan));
     SHOW_FLAG("revenge",	channel_revenge(chan));

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

@@ -530,10 +530,6 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item)
       chan->status |= CHAN_TAKE;
     else if (!strcmp(item[i], "-take"))
       chan->status &= ~CHAN_TAKE;
-    else if (!strcmp(item[i], "+nomop"))
-      chan->status |= CHAN_NOMOP;
-    else if (!strcmp(item[i], "-nomop"))
-      chan->status &= ~CHAN_NOMOP;
     else if (!strcmp(item[i], "+voice"))
       chan->status |= CHAN_VOICE;
     else if (!strcmp(item[i], "-voice"))

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

@@ -1054,7 +1054,7 @@ gotmode(char *from, char *msg)
 
             /* check for mop */
             if (ops >= 3) {
-              if (channel_nomop(chan)) {
+              if (chan->mop) {
                 m->flags |= SENTKICK;
                 sprintf(tmp, "KICK %s %s :%s%s\r\n", chan->name, m->nick, kickprefix, response(RES_MANUALOP));
                 tputs(serv, tmp, strlen(tmp));