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 /src/users.cpp | |
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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(); |