]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Use rb_snprintf() in various places.
authorJilles Tjoelker <redacted>
Fri, 5 Sep 2008 23:00:20 +0000 (01:00 +0200)
committerJilles Tjoelker <redacted>
Fri, 5 Sep 2008 23:00:20 +0000 (01:00 +0200)
extensions/ip_cloaking.c
modules/core/m_error.c
modules/core/m_server.c
modules/m_monitor.c
modules/m_services.c
modules/m_signon.c
modules/m_svinfo.c
modules/m_whois.c
src/irc_dictionary.c
src/parse.c

index e80a19a451deea7918a9e6051f8ab86e7db3ec69..193939567ce94905f125dcbd1b6d945ed379c03b 100644 (file)
@@ -121,11 +121,11 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
 
        if(ipv6)
        {
-           snprintf(outbuf, HOSTLEN, "%s:%x", buf, accum);
+           rb_snprintf(outbuf, HOSTLEN, "%s:%x", buf, accum);
        }
        else
        {
-           snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum);
+           rb_snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum);
        }
 }
 
index 9659f11b26b61538b89ccf35b93a6daee2d6186c..5a5bd67a6ae4e6077dc79ebf949ce6ef4c70fd45 100644 (file)
@@ -58,7 +58,7 @@ is_safe_error(const char *message)
 
        if (!strncmp(message, "Closing Link: 127.0.0.1 (", 25))
                return 1;
-       snprintf(prefix2, sizeof prefix2,
+       rb_snprintf(prefix2, sizeof prefix2,
                        "Closing Link: 127.0.0.1 %s (", me.name);
        if (!strncmp(message, prefix2, strlen(prefix2)))
                return 1;
index 6ab85deab2acc11b84dfdafdbb97e0859642227f..72c9b84977329fe117dbd948c09398db3190db82 100644 (file)
@@ -297,7 +297,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Link %s cancelled, server %s already exists",
                        client_p->name, name);
 
-               snprintf(squitreason, sizeof squitreason,
+               rb_snprintf(squitreason, sizeof squitreason,
                                "Server %s already exists",
                                name);
                exit_client(client_p, client_p, &me, squitreason);
@@ -477,7 +477,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Link %s cancelled, server %s already exists",
                        client_p->name, parv[1]);
 
-               snprintf(squitreason, sizeof squitreason,
+               rb_snprintf(squitreason, sizeof squitreason,
                                "Server %s already exists",
                                parv[1]);
                exit_client(NULL, client_p, &me, squitreason);
@@ -496,7 +496,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Link %s cancelled, SID %s for server %s already in use by %s",
                        client_p->name, parv[3], parv[1], target_p->name);
 
-               snprintf(squitreason, sizeof squitreason,
+               rb_snprintf(squitreason, sizeof squitreason,
                                "SID %s for %s already in use by %s",
                                parv[3], parv[1], target_p->name);
                exit_client(NULL, client_p, &me, squitreason);
index 1193c69e29f96289562d39861f1f9adc62c0f686..a6ce57551657b85a2bc7a085f121d2194017394c 100644 (file)
@@ -89,9 +89,9 @@ add_monitor(struct Client *client_p, const char *nicks)
                                sendto_one(client_p, "%s", offbuf);
 
                        if(p)
-                               snprintf(buf, sizeof(buf), "%s,%s", name, p);
+                               rb_snprintf(buf, sizeof(buf), "%s,%s", name, p);
                        else
-                               snprintf(buf, sizeof(buf), "%s", name);
+                               rb_snprintf(buf, sizeof(buf), "%s", name);
 
                        sendto_one(client_p, form_str(ERR_MONLISTFULL),
                                        me.name, client_p->name,
index a78cc7f25ebbd70a4568b115df64b6cb63923d8f..ffc77cd5fa5ef074812717dbe6d576a7ca4cd3aa 100644 (file)
@@ -195,7 +195,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p,
                        kill_client_serv_butone(NULL, exist_p, "%s (Nickname regained by services)",
                                                me.name);
 
-               snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
+               rb_snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
                        me.name);
                exit_client(NULL, exist_p, &me, buf);
        }
index d57d953a9ef0e3800aefa10ec5d9b7030db3653e..f28021ff044d669a9005d7ee64e862771c95f7e8 100644 (file)
@@ -214,7 +214,7 @@ me_svslogin(struct Client *client_p, struct Client *source_p,
                kill_client_serv_butone(NULL, exist_p, "%s (Nickname regained by services)",
                                        me.name);
 
-               snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
+               rb_snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
                        me.name);
                exit_client(NULL, exist_p, &me, buf);
        }else if((exist_p = find_client(nick)) && IsUnknown(exist_p) && exist_p != target_p) {
index 740f8d7dfc8ca0cb6be603467fcd7b9666daa411..27ff52570ca951b5154a7479e773f440d96a1483 100644 (file)
@@ -71,7 +71,7 @@ ms_svinfo(struct Client *client_p, struct Client *source_p, int parc, const char
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                     "Link %s dropped, wrong TS protocol version (%s,%s)",
                                     source_p->name, parv[1], parv[2]);
-               snprintf(squitreason, sizeof squitreason, "Incompatible TS version (%s,%s)",
+               rb_snprintf(squitreason, sizeof squitreason, "Incompatible TS version (%s,%s)",
                                parv[1], parv[2]);
                exit_client(source_p, source_p, source_p, squitreason);
                return 0;
@@ -95,7 +95,7 @@ ms_svinfo(struct Client *client_p, struct Client *source_p, int parc, const char
                     "Link %s dropped, excessive TS delta"
                     " (my TS=%ld, their TS=%ld, delta=%d)",
                     log_client_name(source_p, SHOW_IP), (long) rb_current_time(), (long) theirtime, deltat);
-               snprintf(squitreason, sizeof squitreason, "Excessive TS delta (my TS=%ld, their TS=%ld, delta=%d)",
+               rb_snprintf(squitreason, sizeof squitreason, "Excessive TS delta (my TS=%ld, their TS=%ld, delta=%d)",
                                (long) rb_current_time(), (long) theirtime, deltat);
                exit_client(source_p, source_p, source_p, squitreason);
                return 0;
index 40a8d52e6d0b4d9481f502449314ba1d670fdd60..085e4d64d00a73556310a07d88d20514fdb1408e 100644 (file)
@@ -200,7 +200,7 @@ do_whois(struct Client *client_p, struct Client *source_p, int parc, const char
                {
                        char buffer[BUFSIZE];
 
-                       snprintf(buffer, sizeof(buffer), "%s!%s@%s %s",
+                       rb_snprintf(buffer, sizeof(buffer), "%s!%s@%s %s",
                                target_p->name, target_p->username,
                                target_p->host, target_p->servptr->name);
                        report_operspy(source_p, "WHOIS", buffer);
index 0de08b6d87c85c4dac2cc7a337641139ae4fb694..89a0a7bb770b0df9b0d93575827774f4b87ff9dd 100644 (file)
@@ -850,15 +850,15 @@ void irc_dictionary_stats(struct Dictionary *dict, void (*cb)(const char *line,
        s_assert(dict != NULL);
 
        if (dict->id != NULL)
-               snprintf(str, sizeof str, "Dictionary stats for %s (%d)",
+               rb_snprintf(str, sizeof str, "Dictionary stats for %s (%d)",
                                dict->id, dict->count);
        else
-               snprintf(str, sizeof str, "Dictionary stats for <%p> (%d)",
+               rb_snprintf(str, sizeof str, "Dictionary stats for <%p> (%d)",
                                (void *)dict, dict->count);
        cb(str, privdata);
        maxdepth = 0;
        sum = stats_recurse(dict->root, 0, &maxdepth);
-       snprintf(str, sizeof str, "Depth sum %d Avg depth %d Max depth %d", sum, sum / dict->count, maxdepth);
+       rb_snprintf(str, sizeof str, "Depth sum %d Avg depth %d Max depth %d", sum, sum / dict->count, maxdepth);
        cb(str, privdata);
        return;
 }
index 970ad7f63536c836a7b9fb4c61debe394442aa5f..5fe0585dc81908fc07dfa45cd05871f784d582e8 100644 (file)
@@ -364,7 +364,7 @@ handle_command(struct Message *mptr, struct Client *client_p,
                ilog(L_SERVER,
                     "Insufficient parameters (%d < %d) for command '%s' from %s.",
                     i, ehandler.min_para, mptr->cmd, client_p->name);
-               snprintf(squitreason, sizeof squitreason,
+               rb_snprintf(squitreason, sizeof squitreason,
                                "Insufficient parameters (%d < %d) for command '%s'",
                                i, ehandler.min_para, mptr->cmd);
                exit_client(client_p, client_p, client_p, squitreason);