1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 06:13:13 +02:00

Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.

This commit is contained in:
Adam
2013-05-26 17:13:11 -04:00
parent f2dee1e1d6
commit 22658d63bd
164 changed files with 835 additions and 2137 deletions
+11 -5
View File
@@ -11,8 +11,6 @@
#include "module.h"
static ServiceReference<NickServService> nickserv("NickServService", "NickServ");
class CommandNSSet : public Command
{
public:
@@ -1350,7 +1348,6 @@ class NSSet : public Module
CommandNSSetChanstats commandnssetchanstats;
CommandNSSASetChanstats commandnssasetchanstats;
bool NSDefChanstats;
CommandNSSetDisplay commandnssetdisplay;
CommandNSSASetDisplay commandnssasetdisplay;
@@ -1388,7 +1385,7 @@ class NSSet : public Module
NSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnsset(this), commandnssaset(this),
commandnssetautoop(this), commandnssasetautoop(this),
commandnssetchanstats(this), commandnssasetchanstats(this), NSDefChanstats(false),
commandnssetchanstats(this), commandnssasetchanstats(this),
commandnssetdisplay(this), commandnssasetdisplay(this),
commandnssetemail(this), commandnssasetemail(this),
commandnssetgreet(this), commandnssasetgreet(this),
@@ -1402,7 +1399,7 @@ class NSSet : public Module
commandnssasetnoexpire(this)
{
Implementation i[] = { I_OnPreCommand };
Implementation i[] = { I_OnPreCommand, I_OnSetCorrectModes };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
@@ -1429,6 +1426,15 @@ class NSSet : public Module
return EVENT_CONTINUE;
}
void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) anope_override
{
if (chan->ci)
{
/* Only give modes if autoop is set */
give_modes &= !user->Account() || user->Account()->HasExt("AUTOOP");
}
}
};
MODULE_INIT(NSSet)