Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / m_burst.c
index e91484e9222ca5726dc2007dff1f0a08a6b2d52a..8b84667083f49c3d8f07201c0bbfa39bab518c04 100644 (file)
  */
 #include "config.h"
 
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
+#include "ircd_policy.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "list.h"
@@ -152,7 +145,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   int param, nickpos = 0, banpos = 0;
   char modestr[BUFSIZE], nickstr[BUFSIZE], banstr[BUFSIZE];
 
-  if (parc < 4)
+  if (parc < 3)
     return protocol_violation(sptr,"Too few parameters for BURST");
 
   if (!IsBurst(sptr)) /* don't allow BURST outside of burst */
@@ -175,7 +168,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   if (!chptr->creationtime || chptr->creationtime > timestamp) {
     chptr->creationtime = timestamp;
 
-    modebuf_init(mbuf = &modebuf, sptr, cptr, chptr, MODEBUF_DEST_CHANNEL);
+    modebuf_init(mbuf = &modebuf, &me, cptr, chptr, MODEBUF_DEST_CHANNEL);
     modebuf_mode(mbuf, MODE_DEL | chptr->mode.mode); /* wipeout modes */
     chptr->mode.mode &= ~(MODE_ADD | MODE_DEL | MODE_PRIVATE | MODE_SECRET |
                          MODE_MODERATED | MODE_TOPICLIMIT | MODE_INVITEONLY |
@@ -187,7 +180,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     for (lp = chptr->banlist; lp; lp = lp->next)
       lp->flags |= CHFL_BURST_BAN_WIPEOUT;
   } else if (chptr->creationtime == timestamp) {
-    modebuf_init(mbuf = &modebuf, sptr, cptr, chptr, MODEBUF_DEST_CHANNEL);
+    modebuf_init(mbuf = &modebuf, &me, cptr, chptr, MODEBUF_DEST_CHANNEL);
 
     parse_flags |= MODE_PARSE_SET; /* set new modes */
   }
@@ -247,7 +240,11 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
            newban = make_link(); /* create new ban */
 
            DupString(newban->value.ban.banstr, ban);
+#ifdef HEAD_IN_SAND_BANWHO
+           DupString(newban->value.ban.who, cli_name(&me));
+#else
            DupString(newban->value.ban.who, cli_name(sptr));
+#endif
            newban->value.ban.when = TStime();
 
            newban->flags = CHFL_BAN | CHFL_BURST_BAN; /* set flags */
@@ -312,7 +309,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
          }
 
          add_user_to_channel(chptr, acptr, default_mode);
-         sendcmdto_channel_butserv(acptr, CMD_JOIN, chptr, "%H", chptr);
+         sendcmdto_channel_butserv_butone(acptr, CMD_JOIN, chptr, NULL, "%H", chptr);
        }
       }
       param++;