#include "parse.h"
#include "modules.h"
#include "blacklist.h"
+#include "s_assert.h"
-static int mr_user(struct Client *, struct Client *, int, const char **);
+static int mr_user(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message user_msgtab = {
- "USER", 0, 0, 0, MFLG_SLOW,
+ "USER", 0, 0, 0, 0,
{{mr_user, 5}, mg_reg, mg_ignore, mg_ignore, mg_ignore, mg_reg}
};
* parv[4] = users gecos
*/
static int
-mr_user(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mr_user(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
static char buf[BUFSIZE];
char *p;
return 0;
}
+ if(source_p->flags & FLAGS_SENTUSER)
+ return 0;
+
if((p = strchr(parv[1], '@')))
*p = '\0';
- rb_snprintf(buf, sizeof(buf), "%s %s", parv[2], parv[3]);
+ snprintf(buf, sizeof(buf), "%s %s", parv[2], parv[3]);
rb_free(source_p->localClient->fullcaps);
source_p->localClient->fullcaps = rb_strdup(buf);
make_user(source_p);
- if (!(source_p->flags & FLAGS_SENTUSER))
- {
- lookup_blacklists(source_p);
- source_p->flags |= FLAGS_SENTUSER;
- }
+ lookup_blacklists(source_p);
+ source_p->flags |= FLAGS_SENTUSER;
rb_strlcpy(source_p->info, realname, sizeof(source_p->info));
if(!IsGotId(source_p))
- {
- /* This is in this location for a reason..If there is no identd
- * and ping cookies are enabled..we need to have a copy of this
- */
rb_strlcpy(source_p->username, username, sizeof(source_p->username));
- }
if(source_p->name[0])
{
/* NICK already received, now I have USER... */
- return register_local_user(client_p, source_p, username);
+ return register_local_user(client_p, source_p);
}
return 0;