X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fm_fakehost.c;h=5aa559e59a80c907a240287ab34f7b10b628dd96;hp=a73dd53aa19b61de48fc49dcc5b7fcb8c62c5f47;hb=3ff8f436014bfe342053877d3d063d181a753e3b;hpb=dc0367a5dc496477adc5afaee2c536e538df98b4 diff --git a/ircd/m_fakehost.c b/ircd/m_fakehost.c index a73dd53..5aa559e 100644 --- a/ircd/m_fakehost.c +++ b/ircd/m_fakehost.c @@ -91,8 +91,8 @@ #include "s_bsd.h" #include "s_conf.h" #include "s_user.h" +#include "s_debug.h" #include "send.h" - /* * m_fakehost - fakehost user message handler * @@ -295,15 +295,16 @@ int ms_fakehost2(struct Client *cptr, struct Client *sptr, int parc, char *parv[ } /* Ignore the assignment if it changes nothing. */ - if(IsFakeHost(target) && strcmp(cli_user(target)->fakehost, parv[3]) == 0 && strcmp(cli_user(target)->username, parv[2]) == 0) { + if(IsFakeHost(target) && strcmp(cli_user(target)->fakehost, parv[3]) == 0 && strcmp(cli_user(target)->fakeuser, parv[2]) == 0) { return 0; } /* Set fakehost and propagate the changed host. */ ircd_strncpy(cli_user(target)->fakehost, parv[3], HOSTLEN); - hide_ident_hostmask(target, FLAG_FAKEHOST, parv[2]); + ircd_strncpy(cli_user(target)->fakeuser, parv[2], USERLEN); + hide_hostmask(target, FLAG_FAKEHOST | FLAG_FAKEIDENT); - sendcmdto_serv_butone(sptr, CMD_FAKEHOST2, cptr, "%C %s %s", target, parv[2], parv[3]); + sendcmdto_serv_butone(sptr, CMD_FAKEHOST2, cptr, "%C %s %s", target, cli_user(target)->fakeuser, cli_user(target)->fakehost); return 0; } @@ -314,6 +315,7 @@ int ms_fakehost2(struct Client *cptr, struct Client *sptr, int parc, char *parv[ * parv[0] = sender prefix * parv[1] = target user numeric * parv[2] = target user's new fake host + * parv[3] = target user's new fake ident */ int ms_fakehost_old(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { struct Client *target;