Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / m_desynch.c
index 89b998c92c8a8426180e9376b27fa480dbc917a3..dcb7e22fad99d61f5a2541062f8f5d19b27a00d1 100644 (file)
@@ -92,6 +92,7 @@
 #include "ircd.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
+#include "msg.h"
 #include "numeric.h"
 #include "numnicks.h"
 #include "s_bsd.h"
  */
 int ms_desynch(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  if (IsServer(sptr) && parc >= 2)
-  {
-    int i;
-    struct Client *acptr;
-    /* Send message to local +g clients as if it were a wallops */
-    sprintf_irc(sendbuf, ":%s WALLOPS :%s", parv[0], parv[parc - 1]);
-    for (i = 0; i <= HighestFd; i++)
-      if ((acptr = LocalClientArray[i]) && !IsServer(acptr) && !IsMe(acptr) &&
-          SendDebug(acptr))
-        sendbufto_one(acptr);
-    /* Send message to remote +g clients */
-    sendto_g_serv_butone(cptr, "%s DESYNCH :%s", NumServ(sptr), parv[parc - 1]);
-  }
-  return 0;
-}
+  if (parc >= 2)
+    sendcmdto_flag_butone(sptr, CMD_DESYNCH, cptr, FLAGS_DEBUG, ":%s",
+                         parv[parc - 1]);
+  else
+    need_more_params(sptr,"DESYNCH");                  
 
-#if 0
-/*
- * m_desynch
- *
- * Writes to all +g users; for sending wall type debugging/anti-hack info.
- * Added 23 Apr 1998  --Run
- *
- * parv[0] - sender prefix
- * parv[parc-1] - message text
- */
-int m_desynch(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
-{
-  if (IsServer(sptr) && parc >= 2)
-  {
-    int i;
-    struct Client *acptr;
-    /* Send message to local +g clients as if it were a wallops */
-    sprintf_irc(sendbuf, ":%s WALLOPS :%s", parv[0], parv[parc - 1]);
-    for (i = 0; i <= HighestFd; i++)
-      if ((acptr = LocalClientArray[i]) && !IsServer(acptr) && !IsMe(acptr) &&
-          SendDebug(acptr))
-        sendbufto_one(acptr);
-    /* Send message to remote +g clients */
-    sendto_g_serv_butone(cptr, "%s DESYNCH :%s", NumServ(sptr), parv[parc - 1]);
-  }
   return 0;
 }
-#endif /* 0 */
-