remove old unused stuff
[ircu2.10.12-pk.git] / ircd / channel.c
index 1bba9b8e070c89cdd2ec1c2f81ffbb678452a783..9de97d3755d5f65c516c8e6bfc2eeab9e2a74d64 100644 (file)
@@ -1280,36 +1280,12 @@ static void send_ban_list(struct Client* cptr, struct Channel* chptr)
   assert(0 != cptr);
   assert(0 != chptr);
 
-  for (lp = chptr->banlist; lp; lp = lp->next) {
-    if(!(lp->flags & BAN_EXCEPTION))
-        send_reply(cptr, RPL_BANLIST, chptr->chname, lp->banstr,
-                   lp->who, lp->when);
-  }
+  for (lp = chptr->banlist; lp; lp = lp->next)
+    send_reply(cptr, RPL_BANLIST, chptr->chname, lp->banstr, lp->who, lp->when);
 
   send_reply(cptr, RPL_ENDOFBANLIST, chptr->chname);
 }
 
-/** send an exceptionlist to a client for a channel
- *
- * @param cptr Client to send the exceptionlist to.
- * @param chptr        Channel whose exceptionlist to send.
- */
-static void send_exception_list(struct Client* cptr, struct Channel* chptr)
-{
-  struct Ban* lp;
-
-  assert(0 != cptr);
-  assert(0 != chptr);
-
-  for (lp = chptr->banlist; lp; lp = lp->next) {
-    if(lp->flags & BAN_EXCEPTION)
-        send_reply(cptr, RPL_EXCEPTIONLIST, chptr->chname, lp->banstr,
-                   lp->who, lp->when);
-  }
-
-  send_reply(cptr, RPL_ENDOFEXCEPTIONLIST, chptr->chname);
-}
-
 /** Get a channel block, creating if necessary.
  *  Get Channel block for chname (and allocate a new channel
  *  block, if it didn't exists before).
@@ -1611,7 +1587,6 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
     MODE_PERSIST,      'z',
     MODE_NOCOLOUR,  'c',
     MODE_NOCTCP,    'C',
-/*  MODE_EXCEPTION, 'e', */
 /*  MODE_ALTCHAN,   'F', */
 /*  MODE_NOFLOOD,   'f', */
     MODE_ACCESS,    'a',
@@ -1710,14 +1685,14 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
        bufptr[(*bufptr_i)++] = MB_TYPE(mbuf, i) & MODE_CHANOP ? 'o' : 'v';
        totalbuflen -= IRCD_MAX(9, tmp) + 1;
       }
-    } else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD)) {
+    } else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD)) {
       tmp = strlen(MB_STRING(mbuf, i));
 
       if ((totalbuflen - tmp) <= 0) /* don't overflow buffer */
        MB_TYPE(mbuf, i) |= MODE_SAVE; /* save for later */
       else {
        char mode_char;
-       switch(MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
+       switch(MB_TYPE(mbuf, i) & (MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
        {
          case MODE_APASS:
            mode_char = 'A';
@@ -1725,9 +1700,6 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
          case MODE_UPASS:
            mode_char = 'U';
            break;
-      case MODE_EXCEPTION:
-        mode_char = 'e';
-        break;
       case MODE_ALTCHAN:
                mode_char = 'F';
                break;
@@ -1811,7 +1783,7 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
        build_string(strptr, strptr_i, cli_name(MB_CLIENT(mbuf, i)), 0, ' ');
 
       /* deal with bans... */
-      else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION))
+      else if (MB_TYPE(mbuf, i) & (MODE_BAN))
        build_string(strptr, strptr_i, MB_STRING(mbuf, i), 0, ' ');
 
       /* deal with keys... */
@@ -1927,7 +1899,7 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
        build_string(strptr, strptr_i, NumNick(MB_CLIENT(mbuf, i)), ' ');
 
       /* deal with modes that take strings */
-      else if (MB_TYPE(mbuf, i) & (MODE_KEY | MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
+      else if (MB_TYPE(mbuf, i) & (MODE_KEY | MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
        build_string(strptr, strptr_i, MB_STRING(mbuf, i), 0, ' ');
 
       /*
@@ -2235,7 +2207,6 @@ modebuf_extract(struct ModeBuf *mbuf, char *buf)
     MODE_PERSIST,       'z',
     MODE_NOCOLOUR,  'c',
     MODE_NOCTCP,    'C',
-/*  MODE_EXCEPTION, 'e', */
     MODE_NOAMSGS,   'M',
        MODE_NONOTICE,  'N',
        MODE_QUARANTINE,  'Q',
@@ -2351,7 +2322,6 @@ mode_invite_clear(struct Channel *chan)
 #define DONE_KEY_DEL    0x80    /**< We've removed the key */
 #define DONE_UPASS_DEL  0x100   /**< We've removed the user pass */
 #define DONE_APASS_DEL  0x200   /**< We've removed the admin pass */
-#define DONE_EXCEPTIONLIST 0x400 /**< We've sent the exception list */
 #define DONE_ALTCHAN   0x800   /**< We've set the altchan */
 #define DONE_ACCESS    0x1000  /**< We've set the access */
 #define DONE_NOFLOOD   0x2000  /**< We've set the noflood options */
@@ -3295,19 +3265,9 @@ mode_parse_ban(struct ParseState *state, ulong64 *flag_p)
   struct Ban *ban, *newban;
 
   if (state->parc <= 0) { /* Not enough args, send ban list */
-    if (MyUser(state->sptr)) {
-      if (*flag_p == MODE_EXCEPTION) {
-        if (!(state->done & DONE_EXCEPTIONLIST)) {
-          send_exception_list(state->sptr, state->chptr);
-          state->done |= DONE_EXCEPTIONLIST;
-        }
-      }
-      else {
-        if (!(state->done & DONE_BANLIST)) {
-          send_ban_list(state->sptr, state->chptr);
-          state->done |= DONE_BANLIST;
-        }
-      }
+    if (MyUser(state->sptr) && !(state->done & DONE_BANLIST)) {
+      send_ban_list(state->sptr, state->chptr);
+      state->done |= DONE_BANLIST;
     }
     return;
   }
@@ -3384,8 +3344,7 @@ mode_process_bans(struct ParseState *state)
     } else if (ban->flags & BAN_DEL) { /* Deleted a ban? */
       char *bandup;
       DupString(bandup, ban->banstr);
-      modebuf_mode_string(state->mbuf, MODE_DEL | ((ban->flags & BAN_EXCEPTION) ? MODE_EXCEPTION : MODE_BAN),
-                         bandup, 1);
+      modebuf_mode_string(state->mbuf, MODE_DEL | MODE_BAN, bandup, 1);
 
       if (state->flags & MODE_PARSE_SET) { /* Ok, make it take effect */
        if (prevban) /* clip it out of the list... */
@@ -3424,14 +3383,13 @@ mode_process_bans(struct ParseState *state)
           char *bandup;
          /* add the ban to the buffer */
           DupString(bandup, ban->banstr);
-          modebuf_mode_string(state->mbuf, MODE_ADD | ((ban->flags & BAN_EXCEPTION) ? MODE_EXCEPTION : MODE_BAN),
-                             bandup, 1);
+          modebuf_mode_string(state->mbuf, MODE_ADD | MODE_BAN, bandup, 1);
 
          if (state->flags & MODE_PARSE_SET) { /* create a new ban */
            newban = make_ban(ban->banstr);
             strcpy(newban->who, ban->who);
            newban->when = ban->when;
-           newban->flags = ban->flags & (BAN_IPMASK | BAN_EXCEPTION);
+           newban->flags = ban->flags & BAN_IPMASK;
 
            newban->next = state->chptr->banlist; /* and link it in */
            state->chptr->banlist = newban;
@@ -3774,7 +3732,6 @@ mode_parse(struct ModeBuf *mbuf, struct Client *cptr, struct Client *sptr,
     MODE_PERSIST,       'z',
     MODE_NOCOLOUR,      'c',
     MODE_NOCTCP,        'C',
-/*    MODE_EXCEPTION,     'e',*/
     MODE_NOAMSGS,       'M',
        MODE_NONOTICE,      'N',
        MODE_QUARANTINE,      'Q',
@@ -3871,9 +3828,6 @@ mode_parse(struct ModeBuf *mbuf, struct Client *cptr, struct Client *sptr,
         if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS))
        mode_parse_upass(&state, flag_p);
        break;
-
-/*      case 'e':
-        if(MyUser(state.sptr) && !(state.flags & MODE_PARSE_FORCE) && !feature_bool(FEAT_EXCEPT_ENABLE)) break;*/
       case 'b': /* deal with bans */
        mode_parse_ban(&state, flag_p);
         break;