diff options
author | Adam <Adam@anope.org> | 2010-08-05 23:18:36 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-05 23:18:36 -0400 |
commit | 94f7962e1abc12db7dd4adabcd35c067ad17889e (patch) | |
tree | cfeea7aa747d3329c537cf6d48817d78359d343e /src | |
parent | 3308ab715393e6da5bda085026b4d5d4085890e7 (diff) |
Fixed bug #1180 - Fixed tracking of internal clients when they change nicks on TS6 IRCds
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/charybdis.c | 6 | ||||
-rw-r--r-- | src/protocol/inspircd12.c | 2 | ||||
-rw-r--r-- | src/protocol/ratbox.c | 6 | ||||
-rw-r--r-- | src/protocol/shadowircd.c | 6 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index e302f57f5..8ae557d40 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -1692,10 +1692,16 @@ void charybdis_cmd_svid_umode3(User * u, char *ts) /* NICK <newnick> */ void charybdis_cmd_chg_nick(char *oldnick, char *newnick) { + Uid *ud; + if (!oldnick || !newnick) { return; } + ud = find_uid(oldnick); + if (ud) + strscpy(ud->nick, newnick, NICKMAX); + send_cmd(oldnick, "NICK %s", newnick); } diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c index e5722c236..5eb9cc5ab 100644 --- a/src/protocol/inspircd12.c +++ b/src/protocol/inspircd12.c @@ -1309,6 +1309,8 @@ void inspircd_cmd_chg_nick(char *oldnick, char *newnick) if (!ud) ud = find_uid(newnick); + if (ud) + strscpy(ud->nick, newnick, NICKMAX); send_cmd(ud ? ud->uid : oldnick, "NICK %s %ld", newnick, time(NULL)); } diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 42a00d2f2..231899d3f 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -1621,10 +1621,16 @@ void ratbox_cmd_svid_umode3(User * u, char *ts) /* NICK <newnick> */ void ratbox_cmd_chg_nick(char *oldnick, char *newnick) { + Uid *ud; + if (!oldnick || !newnick) { return; } + ud = find_uid(oldnick); + if (ud) + strscpy(ud->nick, newnick, NICKMAX); + send_cmd(oldnick, "NICK %s", newnick); } diff --git a/src/protocol/shadowircd.c b/src/protocol/shadowircd.c index 2e0262046..a8fd02d4b 100644 --- a/src/protocol/shadowircd.c +++ b/src/protocol/shadowircd.c @@ -1567,10 +1567,16 @@ void shadowircd_cmd_svid_umode3(User * u, char *ts) /* NICK <newnick> */ void shadowircd_cmd_chg_nick(char *oldnick, char *newnick) { + Uid *ud; + if (!oldnick || !newnick) { return; } + ud = find_uid(oldnick); + if (ud) + strscpy(ud->nick, newnick, NICKMAX); + send_cmd(oldnick, "NICK %s", newnick); } |