X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/969a1ae66a32d04821b9f9657b8c70192225e3bf..24335dd6a3a37b52b92911144ddd3b5a11f77280:/modules/m_pass.c diff --git a/modules/m_pass.c b/modules/m_pass.c index 0cc0747..c331e25 100644 --- a/modules/m_pass.c +++ b/modules/m_pass.c @@ -52,7 +52,6 @@ DECLARE_MODULE_AV1(pass, NULL, NULL, pass_clist, NULL, NULL, "$Revision: 3550 $" * * * mr_pass - PASS message handler - * parv[0] = sender prefix * parv[1] = password * parv[2] = "TS" if this server supports TS. * parv[3] = optional TS version field -- needed for TS6 @@ -83,9 +82,9 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char * auth_user = NULL; } - client_p->localClient->passwd = rb_strndup(pass, PASSWDLEN); + client_p->localClient->passwd = *pass ? rb_strndup(pass, PASSWDLEN) : NULL; - if(auth_user) + if(auth_user && *auth_user) client_p->localClient->auth_user = rb_strndup(auth_user, PASSWDLEN); /* These are for servers only */ @@ -102,9 +101,6 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char * if(irccmp(parv[2], "TS") == 0 && client_p->tsinfo == 0) client_p->tsinfo = TS_DOESTS; - /* kludge, if we're not using ts6, dont ever mark a server - * as TS6 capable, that way we'll never send them TS6 data. - */ if(parc == 5 && atoi(parv[3]) >= 6) { /* only mark as TS6 if the SID is valid.. */