X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/dd2654fadb5af2f9ee7fd445829b7ef2e1316dc1..77d3d2dbafbb44bc4dc87c9d4612a646c546af5d:/src/s_user.c diff --git a/src/s_user.c b/src/s_user.c index 8892a9e6..48b30d51 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -54,6 +54,7 @@ #include "blacklist.h" #include "substitution.h" #include "chmode.h" +#include "s_assert.h" static void report_and_set_user_flags(struct Client *, struct ConfItem *); void user_welcome(struct Client *source_p); @@ -373,7 +374,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char else encr = source_p->localClient->passwd; - if(strcmp(encr, aconf->passwd)) + if(encr == NULL || strcmp(encr, aconf->passwd)) { ServerStats.is_ref++; sendto_one(source_p, form_str(ERR_PASSWDMISMATCH), me.name, source_p->name); @@ -1477,12 +1478,20 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use if(MyClient(target_p) && changed_case) sendto_one(target_p, ":%s!%s@%s NICK %s", target_p->name, target_p->username, target_p->host, nick); + + /* TODO: send some snotes to SNO_NCHANGE/SNO_CCONN/SNO_CCONNEXT? */ } else if(changed_case) { sendto_common_channels_local(target_p, NOCAPS, ":%s!%s@%s NICK :%s", target_p->name, target_p->username, target_p->host, nick); + + if(MyConnect(target_p)) + sendto_realops_snomask(SNO_NCHANGE, L_ALL, + "Nick change: From %s to %s [%s@%s]", + target_p->name, nick, + target_p->username, target_p->host); } rb_strlcpy(target_p->username, user, sizeof target_p->username);