diff options
author | Adam <Adam@anope.org> | 2014-04-02 22:37:35 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-02 22:37:35 -0400 |
commit | fb5c5e3442994985af92122803db7b65ed9a4097 (patch) | |
tree | d51c0e4a68297cf26bf432e02014537e54f8284b | |
parent | e357c3977463a8f510a66867a2b3dce851aa7665 (diff) |
Set minus no arg on +l in all proto mods
Set oper modes/vhost on oper too, evan after iding
Add umode +q to plexus
-rw-r--r-- | modules/protocol/bahamut.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/hybrid.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/ngircd.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 5 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 20 |
6 files changed, 27 insertions, 6 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index a114db890..72c3ee8f9 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -522,7 +522,7 @@ class ProtoBahamut : public Module ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i')); ModeManager::AddChannelMode(new ChannelModeFlood('f', false)); ModeManager::AddChannelMode(new ChannelModeKey('k')); - ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l')); + ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true)); ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm')); ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n')); ModeManager::AddChannelMode(new ChannelMode("PRIVATE", 'p')); diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 0fa4287e6..9d928a106 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -632,7 +632,7 @@ class ProtoHybrid : public Module ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 2)); /* l/k */ - ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l')); + ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true)); ModeManager::AddChannelMode(new ChannelModeKey('k')); /* Add channel modes */ diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index b0b2bb522..81ba28a6a 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -650,7 +650,7 @@ class ProtongIRCd : public Module /* Add channel modes */ ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i')); ModeManager::AddChannelMode(new ChannelModeKey('k')); - ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l')); + ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true)); ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm')); ModeManager::AddChannelMode(new ChannelMode("REGMODERATED", 'M')); ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n')); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index c4d39e4a9..0770d20a4 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -334,8 +334,9 @@ class ProtoPlexus : public Module ModeManager::AddUserMode(new UserMode("INVIS", 'i')); ModeManager::AddUserMode(new UserModeOperOnly("LOCOPS", 'l')); ModeManager::AddUserMode(new UserMode("OPER", 'o')); - ModeManager::AddUserMode(new UserMode("PRIV", 'p')); ModeManager::AddUserMode(new UserModeOperOnly("NETADMIN", 'N')); + ModeManager::AddUserMode(new UserMode("PRIV", 'p')); + ModeManager::AddUserMode(new UserMode("ROUTING", 'q')); ModeManager::AddUserMode(new UserModeNoone("REGISTERED", 'r')); ModeManager::AddUserMode(new UserMode("REGPRIV", 'R')); ModeManager::AddUserMode(new UserModeOperOnly("SNOMASK", 's')); @@ -359,7 +360,7 @@ class ProtoPlexus : public Module ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '~', 4)); /* l/k */ - ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l')); + ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true)); ModeManager::AddChannelMode(new ChannelModeKey('k')); /* Add channel modes */ diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 72cdc9573..89e0f0176 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -274,7 +274,7 @@ class ProtoRatbox : public Module ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 1)); /* l/k */ - ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l')); + ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true)); ModeManager::AddChannelMode(new ChannelModeKey('k')); /* channel modes */ diff --git a/src/users.cpp b/src/users.cpp index 97c850111..9b790a98c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -523,8 +523,28 @@ void User::SetModeInternal(const MessageSource &source, UserMode *um, const Anop this->modes[um->name] = param; if (um->name == "OPER") + { ++OperCount; + if (this->IsServicesOper()) + { + if (!this->nc->o->ot->modes.empty()) + { + this->SetModes(NULL, "%s", this->nc->o->ot->modes.c_str()); + this->SendMessage(NULL, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str()); + UserMode *oper = ModeManager::FindUserModeByName("OPER"); + if (oper && !this->HasMode("OPER") && this->nc->o->ot->modes.find(oper->mchar) != Anope::string::npos) + IRCD->SendOper(this); + } + if (IRCD->CanSetVHost && !this->nc->o->vhost.empty()) + { + this->SendMessage(NULL, "Changing your vhost to \002%s\002", this->nc->o->vhost.c_str()); + this->SetDisplayedHost(this->nc->o->vhost); + IRCD->SendVhost(this, "", this->nc->o->vhost); + } + } + } + if (um->name == "CLOAK" || um->name == "VHOST") this->UpdateHost(); |