Author: ZenShadow
[ircu2.10.12-pk.git] / ircd / s_misc.c
index 6564e0bcb7f9351d3f688706eae51f4c3fba73b9..82fb0648c11e78c0abac383caa98418831316191 100644 (file)
@@ -277,11 +277,9 @@ static void exit_one_client(struct Client* bcptr, const char* comment)
   else if (IsUnknown(bcptr) || IsConnecting(bcptr) || IsHandshake(bcptr))
     Count_unknowndisconnects(UserStats);
 
-  /*
-   * Update IPregistry
-   */
-  if (IsIPChecked(bcptr))
-    IPcheck_disconnect(bcptr);
+  /* Update IPregistry */
+  ip_registry_disconnect(bcptr);
+
 
   /* 
    * Remove from serv->client_list
@@ -389,23 +387,6 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
 
   if (MyConnect(victim)) {
     victim->flags |= FLAGS_CLOSING;
-#ifdef ALLOW_SNO_CONNEXIT
-#ifdef SNO_CONNEXIT_IP
-    if (IsUser(victim)) {
-      sendto_opmask_butone(0, SNO_CONNEXIT,
-                          "Client exiting: %s (%s@%s) [%s] [%s]",
-                          victim->name, victim->user->username,
-                          victim->user->host, comment,
-                          ircd_ntoa((const char *)&victim->ip));
-    }
-#else /* SNO_CONNEXIT_IP */
-    if (IsUser(victim)) {
-      sendto_opmask_butone(0, SNO_CONNEXIT, "Client exiting: %s (%s@%s) [%s]",
-                          victim->name, victim->user->username,
-                          victim->user->host, comment);
-    }
-#endif /* SNO_CONNEXIT_IP */
-#endif /* ALLOW_SNO_CONNEXIT */
     update_load();
 #ifdef FNAME_USERLOG
     on_for = CurrentTime - victim->firsttime;
@@ -428,7 +409,7 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
         && IsClient(victim))    /* Not a Ping struct or Log file */
     {
       if (IsServer(victim) || IsHandshake(victim))
-       sendcmdto_one(killer, CMD_SQUIT, victim, "%C 0 :%s", &me, comment);
+       sendcmdto_one(killer, CMD_SQUIT, victim, "%s 0 :%s", me.name, comment);
       else if (!IsConnecting(victim)) {
         if (!IsDead(victim))
          sendrawto_one(victim, MSG_ERROR " :Closing Link: %s by %s (%s)",
@@ -496,8 +477,8 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
   for (dlp = me.serv->down; dlp; dlp = dlp->next) {
     if (dlp->value.cptr != killer->from && dlp->value.cptr != victim) {
       if (IsServer(victim))
-       sendcmdto_one(killer, CMD_SQUIT, dlp->value.cptr, "%C %Tu :%s",
-                     victim, victim->serv->timestamp, comment);
+       sendcmdto_one(killer, CMD_SQUIT, dlp->value.cptr, "%s %Tu :%s",
+                     victim->name, victim->serv->timestamp, comment);
       else if (IsUser(victim) && 0 == (victim->flags & FLAGS_KILLED))
        sendcmdto_one(victim, CMD_QUIT, dlp->value.cptr, ":%s", comment);
     }
@@ -598,27 +579,27 @@ void tstats(struct Client *cptr, char *name)
       sp->is_ni++;
   }
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":accepts %u refused %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":accepts %u refused %u",
             sp->is_ac, sp->is_ref);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":unknown commands %u prefixes %u", sp->is_unco, sp->is_unpf);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":nick collisions %u unknown closes %u", sp->is_kill, sp->is_ni);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":wrong direction %u empty %u", sp->is_wrdi, sp->is_empt);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":numerics seen %u mode fakes %u", sp->is_num, sp->is_fake);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":auth successes %u fails %u", sp->is_asuc, sp->is_abad);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":local connections %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":local connections %u",
             sp->is_loc);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Client server");
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":connected %u %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Client server");
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":connected %u %u",
             sp->is_cl, sp->is_sv);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %u.%uK %u.%uK",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %u.%uK %u.%uK",
             sp->is_cks, sp->is_cbs, sp->is_sks, sp->is_sbs);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %u.%uK %u.%uK",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %u.%uK %u.%uK",
             sp->is_ckr, sp->is_cbr, sp->is_skr, sp->is_sbr);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":time connected %Tu %Tu",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":time connected %Tu %Tu",
             sp->is_cti, sp->is_sti);
 }