X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fs_user.c;h=3855fbcd5d03b12eee93a0eea09c675c40a08f12;hp=f8d5b94e15ed72ae3ca6b8b4552735106acf83c2;hb=21ced3d1658353412b92c551df8b095022449c82;hpb=888f14529bcb499e8acbcf090360b63e99bc555a diff --git a/ircd/s_user.c b/ircd/s_user.c index f8d5b94..3855fbc 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -972,8 +972,14 @@ void send_user_info(struct Client* sptr, char* names, int rpl, InfoFormatter fmt * @param[in] flag Some flag that affects host-hiding (FLAG_HIDDENHOST, FLAG_ACCOUNT, FLAG_FAKEHOST). * @return Zero. */ + int -hide_hostmask(struct Client *cptr, unsigned int flag) +hide_hostmask(struct Client *cptr, unsigned int flag) { + return hide_hostmask(chptr, flag, NULL); +} + +int +hide_hostmask(struct Client *cptr, unsigned int flag, char *username) { struct Membership *chan; char buf[HOSTLEN]; @@ -1018,9 +1024,17 @@ hide_hostmask(struct Client *cptr, unsigned int flag) sendcmdto_common_channels_butone(cptr, CMD_QUIT, cptr, ":Registered"); ircd_strncpy(cli_user(cptr)->host, buf, HOSTLEN); - /* ok, the client is now fully hidden, so let them know -- hikari */ - if (MyConnect(cptr)) - send_reply(cptr, RPL_HOSTHIDDEN, cli_user(cptr)->host); + /* spoof also the username if username is passed */ + if(username) { + ircd_strncpy(cli_user(cptr)->username, username, USERLEN); + /* ok, the client is now fully hidden, so let them know -- hikari */ + if (MyConnect(cptr)) + send_reply(cptr, RPL_HOSTUSERHIDDEN, cli_user(cptr)->username, cli_user(cptr)->host); + } else { + /* ok, the client is now fully hidden, so let them know -- hikari */ + if (MyConnect(cptr)) + send_reply(cptr, RPL_HOSTHIDDEN, cli_user(cptr)->host); + } /* * Go through all channels the client was on, rejoin him