Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / s_serv.c
index f9304801324a9355f8d4d9fea1e5190c68172d2f..c74be252b4fd2adb710278d6794d360c7092d830 100644 (file)
@@ -33,6 +33,7 @@
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_xopen.h"
+#include "jupe.h"
 #include "list.h"
 #include "msg.h"
 #include "match.h"
@@ -68,7 +69,7 @@ int exit_new_server(struct Client *cptr, struct Client *sptr,
   va_start(vl, fmt);
   if (!IsServer(sptr))
     return vexit_client_msg(cptr, cptr, &me, fmt, vl);
-  sprintf_irc(buf, ":%s SQUIT %s " TIME_T_FMT " :", me.name, host, timestamp);
+  sprintf_irc(buf, ":%s " TOK_SQUIT " %s " TIME_T_FMT " :", me.name, host, timestamp);
   strcat(buf, fmt);
   vsendto_one(cptr, buf, vl);
   va_end(vl);
@@ -208,9 +209,14 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
     /* acptr->from == acptr for acptr == cptr */
     if (acptr->from == cptr)
       continue;
-    if (IsServer(acptr))
-    {
-      char *protocol_str = IsBurst(acptr) ? "J" : "P";
+    if (IsServer(acptr)) {
+      const char* protocol_str;
+
+      if (Protocol(acptr) > 9)
+        protocol_str = IsBurst(acptr) ? "J" : "P";
+      else
+        protocol_str = IsBurst(acptr) ? "J0" : "P0";
+
       if (0 == match(me.name, acptr->name))
         continue;
       split = (MyConnect(acptr) && 
@@ -265,6 +271,7 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
     for (chptr = GlobalChannelList; chptr; chptr = chptr->next)
       send_channel_modes(cptr, chptr);
   }
+  jupe_burst(cptr);
   sendto_one(cptr, "%s EB", NumServ(&me));
   return 0;
 }