]> jfr.im git - solanum.git/blobdiff - modules/m_signon.c
make more snotes L_NETWIDE
[solanum.git] / modules / m_signon.c
index ad866d968e37b50d1adad027bc78f616bb2f0ee6..3ad9183477f30d18b302461809e9c8a554998256 100644 (file)
@@ -32,7 +32,6 @@
 #include "send.h"
 #include "channel.h"
 #include "client.h"
-#include "common.h"
 #include "defaults.h"
 #include "ircd.h"
 #include "numeric.h"
@@ -222,23 +221,23 @@ me_svslogin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
                struct User *user_p = make_user(target_p);
 
                if(valid & NICK_VALID)
-                       strcpy(target_p->preClient->spoofnick, nick);
+                       rb_strlcpy(target_p->preClient->spoofnick, nick, sizeof(target_p->preClient->spoofnick));
 
                if(valid & USER_VALID)
-                       strcpy(target_p->preClient->spoofuser, user);
+                       rb_strlcpy(target_p->preClient->spoofuser, user, sizeof(target_p->preClient->spoofuser));
 
                if(valid & HOST_VALID)
-                       strcpy(target_p->preClient->spoofhost, host);
+                       rb_strlcpy(target_p->preClient->spoofhost, host, sizeof(target_p->preClient->spoofhost));
 
                rb_strlcpy(user_p->suser, login, NICKLEN + 1);
        }
        else
        {
-               char note[NICKLEN + 10];
+               char note[NAMELEN + 10];
 
                send_signon(NULL, target_p, nick, user, host, rb_current_time(), login);
 
-               snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name);
+               snprintf(note, sizeof(note), "Nick: %s", target_p->name);
                rb_note(target_p->localClient->F, note);
        }
 }
@@ -254,7 +253,7 @@ ms_signon(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
        if(!clean_nick(parv[1], 0))
        {
                ServerStats.is_kill++;
-               sendto_realops_snomask(SNO_DEBUG, L_ALL,
+               sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
                                "Bad Nick from SIGNON: %s From: %s(via %s)",
                                parv[1], source_p->servptr->name, client_p->name);
                /* if source_p has an id, kill_client_serv_butone() will
@@ -272,7 +271,7 @@ ms_signon(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
        if(!clean_username(parv[2]) || !clean_host(parv[3]))
        {
                ServerStats.is_kill++;
-               sendto_realops_snomask(SNO_DEBUG, L_ALL,
+               sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
                                "Bad user@host from SIGNON: %s@%s From: %s(via %s)",
                                parv[2], parv[3], source_p->servptr->name, client_p->name);
                /* if source_p has an id, kill_client_serv_butone() will
@@ -312,7 +311,7 @@ ms_signon(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
                {
                        if(!newts || !target_p->tsinfo || (newts == target_p->tsinfo) || !source_p->user)
                        {
-                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                     "Nick change collision from SIGNON from %s to %s(%s <- %s)(both killed)",
                                                     source_p->name, target_p->name, target_p->from->name,
                                                     client_p->name);
@@ -342,12 +341,12 @@ ms_signon(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
                                   (!sameuser && newts > target_p->tsinfo))
                                {
                                        if(sameuser)
-                                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                                     "Nick change collision from SIGNON from %s to %s(%s <- %s)(older killed)",
                                                                     source_p->name, target_p->name,
                                                                     target_p->from->name, client_p->name);
                                        else
-                                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                                     "Nick change collision from SIGNON from %s to %s(%s <- %s)(newer killed)",
                                                                     source_p->name, target_p->name,
                                                                     target_p->from->name, client_p->name);
@@ -372,12 +371,12 @@ ms_signon(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
                                else
                                {
                                        if(sameuser)
-                                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                                     "Nick collision from SIGNON on %s(%s <- %s)(older killed)",
                                                                     target_p->name, target_p->from->name,
                                                                     client_p->name);
                                        else
-                                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                                     "Nick collision from SIGNON on %s(%s <- %s)(newer killed)",
                                                                     target_p->name, target_p->from->name,
                                                                     client_p->name);
@@ -411,7 +410,7 @@ send_signon(struct Client *client_p, struct Client *target_p,
                        use_id(target_p), nick, user, host,
                        (long) target_p->tsinfo, *login ? login : "0");
 
-       strcpy(target_p->user->suser, login);
+       rb_strlcpy(target_p->user->suser, login, sizeof(target_p->user->suser));
 
        change_nick_user_host(target_p, nick, user, host, newts, "Signing %s (%s)", *login ?  "in" : "out", nick);
 }