summaryrefslogtreecommitdiff
path: root/modules/protocol
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2013-08-31 08:46:56 +0200
committerDukePyrolator <DukePyrolator@anope.org>2013-08-31 08:46:56 +0200
commit752a5ca1b7d89044728a045622b3f3db5fb94f7e (patch)
treebb269ec3ad50ff4ac4f50b3fd50cf9f7feb60925 /modules/protocol
parente1a1cf0e6f62c374f952103e50d302cb17462833 (diff)
add vhost support for hybrid
Diffstat (limited to 'modules/protocol')
-rw-r--r--modules/protocol/hybrid.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index f4254edf4..997513f7e 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -26,6 +26,7 @@ class HybridProto : public IRCDProto
CanSZLine = true;
CanSVSHold = true;
CanCertFP = true;
+ CanSetVHost = true;
RequiresID = true;
MaxModes = 4;
}
@@ -260,6 +261,16 @@ class HybridProto : public IRCDProto
this->SendSQLineDel(&x);
}
+ void SendVhost(User *u, const Anope::string &ident, const Anope::string &host) anope_override
+ {
+ u->SetMode(Config->GetClient("HostServ"), "CLOAK", host);
+ }
+
+ void SendVhostDel(User *u) anope_override
+ {
+ u->RemoveMode(Config->GetClient("HostServ"), "CLOAK", u->host);
+ }
+
bool IsIdentValid(const Anope::string &ident) anope_override
{
if (ident.empty() || ident.length() > Config->GetBlock("networkinfo")->Get<unsigned>("userlen"))
@@ -603,6 +614,7 @@ class ProtoHybrid : public Module
ModeManager::AddUserMode(new UserModeOperOnly("HIDEOPER", 'H'));
ModeManager::AddUserMode(new UserMode("REGPRIV", 'R'));
ModeManager::AddUserMode(new UserModeNoone("SSL", 'S'));
+ ModeManager::AddUserMode(new UserMode("CLOAK", 'x'));
/* b/e/I */
ModeManager::AddChannelMode(new ChannelModeList("BAN", 'b'));