1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 20:06:39 +02:00

Fixes bugs #1105 and #1106

Now properly track users host changes and keep users cloaked hosts saved in memory


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2498 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-09-12 03:32:47 +00:00
parent 46030bbc7e
commit 7ea66a37d5
21 changed files with 164 additions and 53 deletions
+17 -4
View File
@@ -471,7 +471,21 @@ class InspIRCdProto : public IRCDProto
}
break;
case 'x':
if (add) user->chost = user->vhost;
if (add && user->vhost)
{
/* If +x is recieved then User::vhost IS the cloaked host,
* set the cloaked host correctly and destroy the vhost - Adam
*/
user->SetCloakedHost(user->vhost);
delete [] user->vhost;
user->vhost = NULL;
}
else
{
if (user->vhost)
delete [] user->vhost;
user->vhost = NULL;
}
update_host(user);
}
}
@@ -492,8 +506,7 @@ class InspIRCdProto : public IRCDProto
void SendVhostDel(User *u)
{
inspircd_cmd_chghost(u->nick, (u->mode & umodes[static_cast<int>('x')] ? u->chost.c_str() : u->host));
notice_lang(s_HostServ, u, HOST_OFF);
inspircd_cmd_chghost(u->nick, (u->mode & umodes[static_cast<int>('x')] ? u->GetCloakedHost().c_str() : u->host));
if (has_chgidentmod && u->GetIdent() != u->GetVIdent())
{
@@ -1161,7 +1174,7 @@ int anope_event_uid(const char *source, int ac, const char **av)
if (user)
{
ircdproto->ProcessUsermodes(user, 1, &av[8]);
user->chost = av[4];
user->SetCloakedHost(av[4]);
}
return MOD_CONT;