瀏覽代碼

* Removed chanflag "dontkickops"
It is not assumed disabled. (Ops will be kicked)


svn: 337

Bryan Drewery 22 年之前
父節點
當前提交
5e28ea54ea

+ 1 - 2
src/chan.h

@@ -226,7 +226,7 @@ struct chanset_t {
 #define CHAN_SECRET         0x0200	   /* don't advertise channel on botnet  */
 #define CHAN_MANOP          0x0400         /* manual opping allowed? */
 #define CHAN_CYCLE          0x0800	   /* cycle the channel if possible      */
-#define CHAN_DONTKICKOPS    0x1000	   /* never kick +o flag people -arthur2 */
+//#define CHAN_    0x1000	   /* unused*/
 #define CHAN_INACTIVE       0x2000	   /* no irc support for this channel
                                          - drummer                           */
 //#define CHAN_               0x4000	   /* unused */
@@ -276,7 +276,6 @@ struct chanset_t *findchan_by_dname(const char *name);
 #define channel_nouserbans(chan) (chan->status & CHAN_NOUSERBANS)
 #define channel_protectops(chan) (chan->status & CHAN_PROTECTOPS)
 #define channel_autovoice(chan) (0)
-#define channel_dontkickops(chan) (chan->status & CHAN_DONTKICKOPS)
 #define channel_secret(chan) (chan->status & CHAN_SECRET)
 #define channel_shared(chan) (1)
 #define channel_cycle(chan) (chan->status & CHAN_CYCLE)

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

@@ -708,8 +708,6 @@ static void channels_report(int idx, int details)
 	  i += my_strcpy(s + i, "bitch ");
 	if (channel_protectops(chan))
 	  i += my_strcpy(s + i, "protectops ");
-	if (channel_dontkickops(chan))
-	  i += my_strcpy(s + i, "dontkickops ");
 	if (channel_revenge(chan))
 	  i += my_strcpy(s + i, "revenge ");
 	if (channel_revenge(chan))
@@ -1046,7 +1044,6 @@ char *channels_start(Function * global_funcs)
 	 "-protectops "
 	 "-revenge "
 	 "+cycle "
-	 "+dontkickops "
 	 "-inactive "
 	 "+userexempts "
 	 "-dynamicexempts "

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

@@ -1584,7 +1584,6 @@ static void cmd_chaninfo(struct userrec *u, int idx, char *par)
     MSET("bitch",		channel_bitch(chan));
     MSET("closed",		channel_closed(chan));
     MSET("cycle",		channel_cycle(chan));
-    MSET("dontkickops",		channel_dontkickops(chan));
     MSET("enforcebans", 	channel_enforcebans(chan));
     MSET("fastop",		channel_fastop(chan));
     MSET("inactive",		channel_inactive(chan));

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

@@ -68,10 +68,6 @@ static int tcl_channel_info(Tcl_Interp * irp, struct chanset_t *chan)
     Tcl_AppendElement(irp, "+protectops");
   else
     Tcl_AppendElement(irp, "-protectops");
-  if (chan->status & CHAN_DONTKICKOPS)
-    Tcl_AppendElement(irp, "+dontkickops");
-  else
-    Tcl_AppendElement(irp, "-dontkickops");
   if (chan->status & CHAN_INACTIVE)
     Tcl_AppendElement(irp, "+inactive");
   else
@@ -213,7 +209,6 @@ static int tcl_channel_get(Tcl_Interp * irp, struct chanset_t *chan, char *setti
   else if CHKFLAG_NEG(CHAN_NOUSERBANS,     "userbans",       chan->status)
   else if CHKFLAG_POS(CHAN_BITCH,          "bitch",          chan->status)
   else if CHKFLAG_POS(CHAN_PROTECTOPS,     "protectops",     chan->status)
-  else if CHKFLAG_POS(CHAN_DONTKICKOPS,    "dontkickops",    chan->status)
   else if CHKFLAG_POS(CHAN_INACTIVE,       "inactive",       chan->status)
   else if CHKFLAG_POS(CHAN_REVENGE,        "revenge",        chan->status)
   else if CHKFLAG_POS(CHAN_REVENGEBOT,     "revengebot",     chan->status)
@@ -471,10 +466,6 @@ Context;
       chan->status |= CHAN_PROTECTOPS;
     else if (!strcmp(item[i], "-protectops"))
       chan->status &= ~CHAN_PROTECTOPS;
-    else if (!strcmp(item[i], "+dontkickops"))
-      chan->status |= CHAN_DONTKICKOPS;
-    else if (!strcmp(item[i], "-dontkickops"))
-      chan->status &= ~CHAN_DONTKICKOPS;
     else if (!strcmp(item[i], "+inactive"))
       chan->status |= CHAN_INACTIVE;
     else if (!strcmp(item[i], "-inactive"))
@@ -543,7 +534,7 @@ Context;
       chan->status |= CHAN_FASTOP;
     }
     else if (!strcmp(item[i], "-fastop"))
-      chan->status &= ~(CHAN_FASTOP | CHAN_PROTECTOPS | CHAN_DONTKICKOPS);
+      chan->status &= ~(CHAN_FASTOP | CHAN_PROTECTOPS);
     else if (!strcmp(item[i], "+private")) {
       chan->status |= CHAN_PRIVATE;
     }
@@ -552,10 +543,10 @@ Context;
 
     /* ignore wasoptest, stopnethack and clearbans in chanfile, remove
        this later */
+    else if (!strcmp(item[i], "+dontkickops")) ;
+    else if (!strcmp(item[i], "-dontkickops")) ;
     else if (!strcmp(item[i], "+nomdop"))  ;
     else if (!strcmp(item[i], "-nomdop"))  ;
-    else if (!strcmp(item[i], "+nomop"))  ;
-    else if (!strcmp(item[i], "-nomop"))  ;
     else if (!strcmp(item[i], "+protectfriends"))  ;
     else if (!strcmp(item[i], "-protectfriends"))  ;
     else if (!strcmp(item[i], "+punish"))  ;

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

@@ -1328,7 +1328,7 @@ flood-chan %d:%d flood-ctcp %d:%d flood-join %d:%d \
 flood-kick %d:%d flood-deop %d:%d flood-nick %d:%d \
 ban-time %d exempt-time %d invite-time %d \
 %cenforcebans %cdynamicbans %cuserbans %cbitch \
-%cprotectops %cdontkickops %crevenge %crevengebot \
+%cprotectops %crevenge %crevengebot \
 %cprivate %ccycle %cinactive %cdynamicexempts \
 %cuserexempts %cdynamicinvites %cuserinvites \
 %cnodesynch %cclosed %ctake %cmanop %cvoice \
@@ -1365,7 +1365,6 @@ ban-time %d exempt-time %d invite-time %d \
 	PLSMNS(!channel_nouserbans(chan)),
 	PLSMNS(channel_bitch(chan)),
 	PLSMNS(channel_protectops(chan)),
-	PLSMNS(channel_dontkickops(chan)),
 	PLSMNS(channel_revenge(chan)),
 	PLSMNS(channel_revengebot(chan)),
 	PLSMNS(channel_private(chan)),

+ 0 - 4
src/mod/irc.mod/irc.c

@@ -781,10 +781,6 @@ static void punish_badguy(struct chanset_t *chan, char *whobad,
   }
   /* Kick the offender */
   if ((chan->revenge_mode > 1) &&
-      /* ... or don't we kick ops? */
-      (!channel_dontkickops(chan) ||
-        !(chan_op(fr) || (glob_op(fr) && !chan_deop(fr)))) &&
-      /* ... or have we sent the kick already? */
       !chan_sentkick(m) &&
       /* ... and can I actually do anything about it? */
       me_op(chan) && !mevictim) {

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

@@ -1477,9 +1477,7 @@ static int gotmode(char *from, char *msg)
       m = ismember(chan, nick);
       if (m)
 	m->last = now;
-      if (channel_active(chan) && m && me_op(chan) &&
-	  !((channel_dontkickops(chan) && (chan_op(user) || (glob_op(user) &&
-	  !chan_deop(user)))))) {
+      if (channel_active(chan) && m && me_op(chan)) {
 	if (chan_fakeop(m)) {
 	  putlog(LOG_MODES, ch, CHAN_FAKEMODE, ch);
 	  dprintf(DP_MODE, "KICK %s %s :%s%s\n", ch, nick, kickprefix,