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

Fall back to account vhost in hs on/off

This commit is contained in:
Adam
2015-12-13 19:14:44 -05:00
parent 252a65af7e
commit 16d08e57df
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -23,7 +23,10 @@ class CommandHSOff : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
User *u = source.GetUser();
const NickAlias *na = NickAlias::Find(u->nick);
if (!na || na->nc != u->Account() || !na->HasVhost())
na = NickAlias::Find(u->Account()->display);
if (!na || !na->HasVhost())
source.Reply(HOST_NOT_ASSIGNED);
+2
View File
@@ -27,6 +27,8 @@ class CommandHSOn : public Command
User *u = source.GetUser();
const NickAlias *na = NickAlias::Find(u->nick);
if (!na || na->nc != u->Account() || !na->HasVhost())
na = NickAlias::Find(u->Account()->display);
if (na && u->Account() == na->nc && na->HasVhost())
{
if (!na->GetVhostIdent().empty())