#include "blacklist.h"
#include "s_assert.h"
-static int mr_user(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static const char user_desc[] =
+ "Provides the USER command to register a new connection";
+
+static void mr_user(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message user_msgtab = {
"USER", 0, 0, 0, 0,
};
mapi_clist_av1 user_clist[] = { &user_msgtab, NULL };
-DECLARE_MODULE_AV1(user, NULL, NULL, user_clist, NULL, NULL, "$Revision: 3416 $");
+DECLARE_MODULE_AV2(user, NULL, NULL, user_clist, NULL, NULL, NULL, NULL, user_desc);
-static int do_local_user(struct Client *client_p, struct Client *source_p,
- const char *username, const char *realname);
+static void do_local_user(struct Client *client_p, struct Client *source_p,
+ const char *username, const char *realname);
/* mr_user()
* parv[1] = username (login name, account)
* parv[3] = server host name (ignored)
* parv[4] = users gecos
*/
-static int
+static void
mr_user(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
static char buf[BUFSIZE];
if (strlen(client_p->id) == 3)
{
exit_client(client_p, client_p, client_p, "Mixing client and server protocol");
- return 0;
+ return;
}
if(source_p->flags & FLAGS_SENTUSER)
- return 0;
+ return;
if((p = strchr(parv[1], '@')))
*p = '\0';
source_p->localClient->fullcaps = rb_strdup(buf);
do_local_user(client_p, source_p, parv[1], parv[4]);
- return 0;
}
-static int
+static void
do_local_user(struct Client *client_p, struct Client *source_p,
const char *username, const char *realname)
{
if(source_p->name[0])
{
/* NICK already received, now I have USER... */
- return register_local_user(client_p, source_p);
+ register_local_user(client_p, source_p);
}
-
- return 0;
}