1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 19:53:13 +02:00

Only enable vhosts automatically if the user doesn't already have the vhost set

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2998 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2010-06-04 02:17:58 +00:00
parent 9abdb4e2e9
commit 2cc4cd0165
3 changed files with 22 additions and 19 deletions
+18 -15
View File
@@ -198,23 +198,26 @@ void do_on_id(User *u)
if (!na || !na->hostinfo.HasVhost())
return;
ircdproto->SendVhost(u, na->hostinfo.GetIdent(), na->hostinfo.GetHost());
if (ircd->vhost)
if (!u->vhost || u->vhost != na->hostinfo.GetHost() || (!na->hostinfo.GetIdent().empty() && u->GetVIdent() != na->hostinfo.GetIdent()))
{
if (u->vhost)
delete [] u->vhost;
u->vhost = sstrdup(na->hostinfo.GetHost().c_str());
}
if (ircd->vident && !na->hostinfo.GetIdent().empty())
{
u->SetVIdent(na->hostinfo.GetIdent());
}
u->UpdateHost();
ircdproto->SendVhost(u, na->hostinfo.GetIdent(), na->hostinfo.GetHost());
if (ircd->vhost)
{
if (u->vhost)
delete [] u->vhost;
u->vhost = sstrdup(na->hostinfo.GetHost().c_str());
}
if (ircd->vident && !na->hostinfo.GetIdent().empty())
{
u->SetVIdent(na->hostinfo.GetIdent());
}
u->UpdateHost();
if (!na->hostinfo.GetIdent().empty())
notice_lang(Config.s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
if (!na->hostinfo.GetIdent().empty())
notice_lang(Config.s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
}
}