X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_user.c;h=aa172e49af380e4bfb336025575c0057ffe62f5f;hb=787ba07385499acc43314957a0243c757f5c90b5;hp=17fa10042d7fa83e0d5391273e218cc1388c7930;hpb=ee0e47cc59291034bf96bc27fa685afb0ecd9817;p=ircu2.10.12-pk.git diff --git a/ircd/m_user.c b/ircd/m_user.c index 17fa100..aa172e4 100644 --- a/ircd/m_user.c +++ b/ircd/m_user.c @@ -113,7 +113,9 @@ int m_user(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) { char* username; + char* term; const char* info; + unsigned int mode_request; assert(0 != cptr); assert(cptr == sptr); @@ -137,6 +139,27 @@ int m_user(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) else username = "NoUser"; + if ((mode_request = strtoul(parv[2], &term, 10)) != 0 + && term != NULL && *term != '\0') + { + /* These bitmask values are codified in RFC 2812, showing + * ... well, something that is probably best not said. + */ + if (mode_request & 8) + SetInvisible(cptr); + if (mode_request & 4) + SetWallops(cptr); + } + else if (parv[2][0] == '+') + { + char *user_modes[4]; + user_modes[0] = NULL; + user_modes[1] = NULL; + user_modes[2] = parv[2]; + user_modes[3] = NULL; + set_user_mode(cptr, sptr, 3, user_modes); + } + info = (EmptyString(parv[4])) ? "No Info" : parv[4]; return auth_set_user(cli_auth(cptr), username, parv[2], parv[3], info);