mirror of
https://github.com/anope/anope.git
synced 2026-07-07 21:23:13 +02:00
Moved the core pseudo clients out into their own modules
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
#include "operserv.h"
|
||||
|
||||
class HelpChannel : public Module
|
||||
{
|
||||
@@ -20,23 +21,23 @@ class HelpChannel : public Module
|
||||
Implementation i[] = { I_OnChannelModeSet, I_OnReload };
|
||||
ModuleManager::Attach(i, this, 2);
|
||||
|
||||
OnReload(true);
|
||||
OnReload();
|
||||
}
|
||||
|
||||
EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const Anope::string ¶m)
|
||||
{
|
||||
if (Name == CMODE_OP && c && c->ci && c->name.equals_ci(this->HelpChan))
|
||||
if (Name == CMODE_OP && operserv && c && c->ci && c->name.equals_ci(this->HelpChan))
|
||||
{
|
||||
User *u = finduser(param);
|
||||
|
||||
if (u && check_access(u, c->ci, CA_OPDEOPME))
|
||||
u->SetMode(OperServ, UMODE_HELPOP);
|
||||
u->SetMode(operserv->Bot(), UMODE_HELPOP);
|
||||
}
|
||||
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
void OnReload(bool)
|
||||
void OnReload()
|
||||
{
|
||||
ConfigReader config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user