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

add vhost support for hybrid

This commit is contained in:
DukePyrolator
2013-08-31 08:46:56 +02:00
parent e1a1cf0e6f
commit 752a5ca1b7
3 changed files with 20 additions and 6 deletions
+12
View File
@@ -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'));