diff options
author | Adam <Adam@anope.org> | 2017-02-06 13:15:01 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-02-06 13:15:01 -0500 |
commit | dde444ed0ec31245545a57e1fc220f1e2308cec0 (patch) | |
tree | 89ede58c0f29224f38a32361eae0e4469651ad86 | |
parent | 9b6c209c804193d46f4d2971ee575c3129623b81 (diff) |
protocol/inspircd12: set +x on /hs off
-rw-r--r-- | modules/protocol/inspircd12.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 348969285..39963f391 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -151,13 +151,14 @@ class InspIRCd12Proto : public IRCDProto void SendVhostDel(User *u) anope_override { - if (u->HasMode("CLOAK")) - this->SendChgHostInternal(u->nick, u->chost); - else - this->SendChgHostInternal(u->nick, u->host); + UserMode *um = ModeManager::FindUserModeByName("CLOAK"); - if (Servers::Capab.count("CHGIDENT") && u->GetIdent() != u->GetVIdent()) - this->SendChgIdentInternal(u->nick, u->GetIdent()); + if (um && !u->HasMode(um->name)) + // Just set +x if we can + u->SetMode(NULL, um); + else + // Try to restore cloaked host + this->SendChgHostInternal(u->nick, u->chost); } void SendAkill(User *u, XLine *x) anope_override |