Author: Carlo Wood <run@alinoe.com> (Via Isomer <isomer@undernet.org>)
[ircu2.10.12-pk.git] / ircd / m_endburst.c
index ec42f725fa0d51ecc9b986d1fbcfdc81f8f080a1..68ac9e11490161c7f0eb0b235b9579e03c8d2e74 100644 (file)
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
-#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 "config.h"
+
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
@@ -119,10 +113,9 @@ int ms_end_of_burst(struct Client* cptr, struct Client* sptr, int parc, char* pa
 
   assert(0 != cptr);
   assert(0 != sptr);
-  if (!IsServer(sptr))
-    return 0;
 
-  sendto_opmask_butone(0, SNO_NETWORK, "Completed net.burst from %C.", sptr);
+  sendto_opmask_butone(0, SNO_NETWORK, "Completed net.burst from %C.", 
+       sptr);
   sendcmdto_serv_butone(sptr, CMD_END_OF_BURST, cptr, "");
   ClearBurst(sptr);
   SetBurstAck(sptr);
@@ -134,11 +127,8 @@ int ms_end_of_burst(struct Client* cptr, struct Client* sptr, int parc, char* pa
     next_chan = chan->next;
 
     if (!chan->members) { /* empty channel */
-      if (!(chan->mode.mode & MODE_BURSTADDED))
-       sendto_opmask_butone(0, SNO_OLDSNO, "Empty channel %H not added by "
-                            "BURST!", chan);
-
-      sub1_from_channel(chan); /* ok, nuke channel now */
+      if ((chan->mode.mode & MODE_BURSTADDED))
+       sub1_from_channel(chan); /* New empty channel, schedule it for removal. */
     }
 
     chan->mode.mode &= ~MODE_BURSTADDED;
@@ -167,51 +157,3 @@ int ms_end_of_burst_ack(struct Client *cptr, struct Client *sptr, int parc, char
 
   return 0;
 }
-
-
-#if 0
-/*
- * m_end_of_burst  - Added Xorath 6-14-96, rewritten by Run 24-7-96
- *                 - and fixed by record and Kev 8/1/96
- *                 - and really fixed by Run 15/8/96 :p
- * This the last message in a net.burst.
- * It clears a flag for the server sending the burst.
- *
- * parv[0] - sender prefix
- */
-int m_end_of_burst(struct Client *cptr, struct Client *sptr, int parc, char **parv)
-{
-  if (!IsServer(sptr))
-    return 0;
-
-  sendto_op_mask(SNO_NETWORK, "Completed net.burst from %s.", sptr->name); /* XXX DEAD */
-  sendto_serv_butone(cptr, "%s EB", NumServ(sptr)); /* XXX DEAD */
-  ClearBurst(sptr);
-  SetBurstAck(sptr);
-  if (MyConnect(sptr))
-    sendto_one(sptr, "%s EA", NumServ(&me)); /* XXX DEAD */
-
-  return 0;
-}
-/*
- * m_end_of_burst_ack
- *
- * This the acknowledge message of the `END_OF_BURST' message.
- * It clears a flag for the server receiving the burst.
- *
- * parv[0] - sender prefix
- */
-int m_end_of_burst_ack(struct Client *cptr, struct Client *sptr, int parc, char **parv)
-{
-  if (!IsServer(sptr))
-    return 0;
-
-  sendto_op_mask(SNO_NETWORK, "%s acknowledged end of net.burst.", sptr->name); /* XXX DEAD */
-  sendto_serv_butone(cptr, "%s EA", NumServ(sptr)); /* XXX DEAD */
-  ClearBurstAck(sptr);
-
-  return 0;
-}
-
-#endif /* 0 */
-