X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_pong.c;h=9e433958c31c761d342d2fcc7122d29906936622;hb=f1acbdf96cb8c8094df4aaf8011b20c7332ba2d6;hp=f66668d41432de98867ce68ad0b8b61a4081e57f;hpb=64add5e6befe48b2b5b6843da32f09952776d486;p=ircu2.10.12-pk.git diff --git a/ircd/m_pong.c b/ircd/m_pong.c index f66668d..9e43395 100644 --- a/ircd/m_pong.c +++ b/ircd/m_pong.c @@ -91,6 +91,7 @@ #include "numeric.h" #include "numnicks.h" #include "opercmds.h" +#include "s_auth.h" #include "s_user.h" #include "send.h" @@ -163,25 +164,7 @@ int mr_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) ClrFlag(cptr, FLAG_PINGSENT); cli_lasttime(cptr) = CurrentTime; - /* - * Check to see if this is a PONG :cookie reply from an - * unregistered user. If so, process it. -record - */ - if (0 != cli_cookie(sptr) && COOKIE_VERIFIED != cli_cookie(sptr)) { - if (parc > 1 && cli_cookie(sptr) == atol(parv[parc - 1])) { - cli_cookie(sptr) = COOKIE_VERIFIED; - cli_unreg(sptr) &= ~CLIREG_COOKIE; /* cookie has been returned... */ - if (!cli_unreg(sptr)) /* no more registration tasks... */ - /* - * NICK and USER OK - */ - return register_user(cptr, sptr, cli_name(sptr), cli_user(sptr)->username); - } - else - send_reply(sptr, SND_EXPLICIT | ERR_BADPING, - ":To connect, type /QUOTE PONG %u", cli_cookie(sptr)); - } - return 0; + return (parc > 1) ? auth_set_pong(cli_auth(sptr), atol(parv[parc - 1])) : 0; } /*