anope- supernets anope source code & configuration |
git clone git://git.acid.vegas/anope.git |
Log | Files | Refs | Archive | README |
m_helpchan.cpp (766B)
1 /* 2 * 3 * (C) 2003-2022 Anope Team 4 * Contact us at team@anope.org 5 * 6 * Please read COPYING and README for further details. 7 */ 8 9 #include "module.h" 10 11 class HelpChannel : public Module 12 { 13 public: 14 HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) 15 { 16 } 17 18 EventReturn OnChannelModeSet(Channel *c, MessageSource &, ChannelMode *mode, const Anope::string ¶m) anope_override 19 { 20 if (mode->name == "OP" && c && c->ci && c->name.equals_ci(Config->GetModule(this)->Get<const Anope::string>("helpchannel"))) 21 { 22 User *u = User::Find(param); 23 24 if (u && c->ci->AccessFor(u).HasPriv("OPME")) 25 u->SetMode(Config->GetClient("OperServ"), "HELPOP"); 26 } 27 28 return EVENT_CONTINUE; 29 } 30 }; 31 32 MODULE_INIT(HelpChannel)