diff options
author | Peter Powell <petpow@saberuk.com> | 2019-02-05 02:22:26 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-02-05 02:22:26 +0000 |
commit | 6a95b42e11bae7a3385c3d03819e29bb64f00191 (patch) | |
tree | cbf4e3f52b2bc94f58bf82dc41487203d5cd82c9 /src/coremods | |
parent | 104ae6871862857787ddbd1e9748adfc9550312b (diff) |
Move <oper:class> and <oper:vhost> to core_oper.
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_oper/core_oper.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/coremods/core_oper/core_oper.cpp b/src/coremods/core_oper/core_oper.cpp index be4b87714..dba34cc6b 100644 --- a/src/coremods/core_oper/core_oper.cpp +++ b/src/coremods/core_oper/core_oper.cpp @@ -55,6 +55,21 @@ class CoreModOper : public Module cmdkill.hideuline = security->getBool("hideulinekills"); } + void OnPostOper(User* user, const std::string&, const std::string&) CXX11_OVERRIDE + { + LocalUser* luser = IS_LOCAL(user); + if (luser) + return; + + const std::string vhost = luser->oper->getConfig("vhost"); + if (!vhost.empty()) + luser->ChangeDisplayedHost(vhost); + + const std::string klass = luser->oper->getConfig("class"); + if (!klass.empty()) + luser->SetClass(klass); + } + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the DIE, KILL, OPER, REHASH, and RESTART commands", VF_VENDOR | VF_CORE); |