diff options
author | Adam <Adam@anope.org> | 2014-05-28 12:11:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-28 12:22:39 -0400 |
commit | f97e339314257fa37cfcab0c2289fb6812e32e85 (patch) | |
tree | a1c9d352a771e0bb7d39d42178a7246d6f2c5434 /src/users.cpp | |
parent | f29e1cf383529a1a29f02b0669d973f5ee0b7a66 (diff) | |
parent | ba46b8e4abd8fef991732d5c52c858a229894a25 (diff) |
Merge branch '2.0' into 2.1
Conflicts:
.travis.yml
src/config.cpp
src/version.sh
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 3b874c0f2..81fd13a33 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -537,8 +537,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(Me, "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(Me, "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(); |