mirror of
https://github.com/anope/anope.git
synced 2026-06-26 13:56:38 +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:
+18
-15
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -810,7 +810,7 @@ int anope_event_setident(const char *source, int ac, const char **av)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
u->SetIdent(av[0]);
|
||||
u->SetVIdent(av[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
int anope_event_chgident(const char *source, int ac, const char **av)
|
||||
@@ -827,7 +827,7 @@ int anope_event_chgident(const char *source, int ac, const char **av)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
u->SetIdent(av[1]);
|
||||
u->SetVIdent(av[1]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -158,7 +158,7 @@ const std::string &User::GetCloakedHost() const
|
||||
|
||||
const std::string &User::GetUID() const
|
||||
{
|
||||
return this->uid;
|
||||
return this->uid;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ void User::SetVIdent(const std::string &sident)
|
||||
{
|
||||
this->vident = sident;
|
||||
|
||||
Alog(LOG_DEBUG) << this->nick << " changed ident to " << sident;
|
||||
Alog(LOG_DEBUG) << this->nick << " changed vident to " << sident;
|
||||
|
||||
this->UpdateHost();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user