]> jfr.im git - solanum.git/blobdiff - src/client.c
strip_tabs() is related to s_conf.c ONLY - moved it there
[solanum.git] / src / client.c
index a7455e09002f8d3e94ce86164fb76262ccd47282..dc88b936e71ce053907918986f3291790fdd9567 100644 (file)
@@ -32,7 +32,6 @@
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "packet.h"
@@ -1231,7 +1230,7 @@ dead_link(struct Client *client_p)
        abt = (struct abort_client *) rb_malloc(sizeof(struct abort_client));
 
        if(client_p->flags & FLAGS_SENDQEX)
-               strlcpy(abt->notice, "Max SendQ exceeded", sizeof(abt->notice));
+               rb_strlcpy(abt->notice, "Max SendQ exceeded", sizeof(abt->notice));
        else
                rb_snprintf(abt->notice, sizeof(abt->notice), "Write error: %s", strerror(errno));
 
@@ -1512,6 +1511,7 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien
                  const char *comment)
 {
        unsigned long on_for;
+       char tbuf[26];
 
        exit_generic_client(client_p, source_p, from, comment);
        clear_monitor(source_p);
@@ -1538,7 +1538,7 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien
        on_for = rb_current_time() - source_p->localClient->firsttime;
 
        ilog(L_USER, "%s (%3lu:%02lu:%02lu): %s!%s@%s %d/%d",
-               myctime(rb_current_time()), on_for / 3600,
+               rb_ctime(rb_current_time(), tbuf, sizeof(tbuf)), on_for / 3600,
                (on_for % 3600) / 60, on_for % 60,
                source_p->name, source_p->username, source_p->host,
                source_p->localClient->sendK, source_p->localClient->receiveK);
@@ -1955,9 +1955,9 @@ close_connection(struct Client *client_p)
        {
                struct server_conf *server_p;
 
-               ServerStats.is_sv++;\r
-               ServerStats.is_sbs += client_p->localClient->sendB;\r
-               ServerStats.is_sbr += client_p->localClient->receiveB;\r
+               ServerStats.is_sv++;
+               ServerStats.is_sbs += client_p->localClient->sendB;
+               ServerStats.is_sbr += client_p->localClient->receiveB;
                ServerStats.is_sti += rb_current_time() - client_p->localClient->firsttime;
 
                /*
@@ -1981,9 +1981,9 @@ close_connection(struct Client *client_p)
        }
        else if(IsClient(client_p))
        {
-               ServerStats.is_cl++;\r
-               ServerStats.is_cbs += client_p->localClient->sendB;\r
-               ServerStats.is_cbr += client_p->localClient->receiveB;\r
+               ServerStats.is_cl++;
+               ServerStats.is_cbs += client_p->localClient->sendB;
+               ServerStats.is_cbr += client_p->localClient->receiveB;
                ServerStats.is_cti += rb_current_time() - client_p->localClient->firsttime;
        }
        else
@@ -2053,7 +2053,7 @@ error_exit_client(struct Client *client_p, int error)
        }
 
        if(error == 0)
-               strlcpy(errmsg, "Remote host closed the connection", sizeof(errmsg));
+               rb_strlcpy(errmsg, "Remote host closed the connection", sizeof(errmsg));
        else
                rb_snprintf(errmsg, sizeof(errmsg), "Read error: %s", strerror(current_error));