#include "ircd_string.h"
#include "numeric.h"
#include "numnicks.h"
+#include "s_auth.h"
#include "s_debug.h"
#include "s_misc.h"
#include "s_user.h"
{
char* username;
const char* info;
- struct User* user;
assert(0 != cptr);
assert(cptr == sptr);
info = (EmptyString(parv[4])) ? "No Info" : parv[4];
- user = make_user(cptr);
-
- user->server = &me;
- ircd_strncpy(cli_info(cptr), info, REALLEN);
-
- cli_unreg(sptr) &= ~CLIREG_USER; /* username now set */
-
- if (!cli_unreg(sptr)) {
- /*
- * NICK and PONG already received, now we have USER...
- */
- return register_user(cptr, sptr, cli_name(sptr), username);
- }
- else {
- ircd_strncpy(user->username, username, USERLEN);
- ircd_strncpy(user->host, cli_sockhost(cptr), HOSTLEN);
- }
- return 0;
+ return auth_set_user(cli_auth(cptr), username, info);
}