mirror of
https://github.com/anope/anope.git
synced 2026-06-30 06:56:37 +02:00
Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
This commit is contained in:
+173
-237
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,6 @@ class BSAutoAssign : public Module
|
||||
public:
|
||||
BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnChanRegistered };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnChanRegistered(ChannelInfo *ci) anope_override
|
||||
|
||||
@@ -154,8 +154,6 @@ class BSAssign : public Module
|
||||
BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsassign(this), commandbsunassign(this)
|
||||
{
|
||||
Implementation i[] = { I_OnInvite };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnInvite(User *source, Channel *c, User *targ) anope_override
|
||||
|
||||
@@ -81,7 +81,7 @@ class CommandBSBot : public Command
|
||||
|
||||
source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
|
||||
FOREACH_MOD(OnBotCreate, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ class CommandBSBot : public Command
|
||||
source.Reply(_("Bot \002%s\002 has been changed to %s!%s@%s (%s)."), oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
|
||||
|
||||
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
|
||||
FOREACH_MOD(OnBotChange, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnBotDelete, OnBotDelete(bi));
|
||||
FOREACH_MOD(OnBotDelete, (bi));
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "DEL " << bi->nick;
|
||||
|
||||
|
||||
@@ -771,7 +771,7 @@ class BSKick : public Module
|
||||
Anope::string mask = ci->GetIdealBan(u);
|
||||
|
||||
ci->c->SetMode(NULL, "BAN", mask);
|
||||
FOREACH_MOD(I_OnBotBan, OnBotBan(u, ci, mask));
|
||||
FOREACH_MOD(OnBotBan, (u, ci, mask));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,8 +802,6 @@ class BSKick : public Module
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnPrivmsg };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~BSKick()
|
||||
|
||||
@@ -495,7 +495,6 @@ class BSSet : public Module
|
||||
commandbsset(this), commandbssetbanexpire(this), commandbssetdontkickops(this), commandbssetdontkickvoices(this),
|
||||
commandbssetfantasy(this), commandbssetgreet(this), commandbssetnobot(this), commandbssetprivate(this)
|
||||
{
|
||||
ModuleManager::Attach(I_OnBotBan, this);
|
||||
}
|
||||
|
||||
void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) anope_override
|
||||
|
||||
@@ -175,7 +175,7 @@ class CommandCSAccess : public Command
|
||||
access->created = Anope::CurTime;
|
||||
ci->AddAccess(access);
|
||||
|
||||
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, access));
|
||||
FOREACH_MOD(OnAccessAdd, (ci, source, access));
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << " with level " << level;
|
||||
source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
|
||||
@@ -258,7 +258,7 @@ class CommandCSAccess : public Command
|
||||
else
|
||||
Nicks = access->mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, access));
|
||||
|
||||
ci->EraseAccess(Number - 1);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ class CommandCSAccess : public Command
|
||||
bool override = !u_access.founder && !u_access.HasPriv("ACCESS_CHANGE") && !access->mask.equals_ci(source.nc->display);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << access->mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, access));
|
||||
delete access;
|
||||
}
|
||||
return;
|
||||
@@ -429,7 +429,7 @@ class CommandCSAccess : public Command
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else
|
||||
{
|
||||
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
|
||||
FOREACH_MOD(OnAccessClear, (ci, source));
|
||||
|
||||
ci->ClearAccess();
|
||||
|
||||
@@ -597,7 +597,7 @@ class CommandCSLevels : public Command
|
||||
else
|
||||
{
|
||||
ci->SetLevel(p->name, level);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, level));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, p->name, level));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to set " << p->name << " to level " << level;
|
||||
@@ -621,7 +621,7 @@ class CommandCSLevels : public Command
|
||||
if (p != NULL)
|
||||
{
|
||||
ci->SetLevel(p->name, ACCESS_INVALID);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, ACCESS_INVALID));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, p->name, ACCESS_INVALID));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable " << p->name;
|
||||
@@ -673,7 +673,7 @@ class CommandCSLevels : public Command
|
||||
void DoReset(CommandSource &source, ChannelInfo *ci)
|
||||
{
|
||||
reset_levels(ci);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, "ALL", 0));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, "ALL", 0));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to reset all levels";
|
||||
@@ -791,8 +791,6 @@ class CSAccess : public Module
|
||||
{
|
||||
this->SetPermanent(true);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnCreateChan, I_OnGroupCheckPriv };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -160,7 +160,7 @@ class CommandCSAKick : public Command
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << (reason == "" ? "" : ": ") << reason;
|
||||
|
||||
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(source, ci, akick));
|
||||
FOREACH_MOD(OnAkickAdd, (source, ci, akick));
|
||||
|
||||
source.Reply(_("\002%s\002 added to %s autokick list."), mask.c_str(), ci->name.c_str());
|
||||
|
||||
@@ -210,7 +210,7 @@ class CommandCSAKick : public Command
|
||||
if (!number || number > ci->GetAkickCount())
|
||||
return;
|
||||
|
||||
FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(number - 1)));
|
||||
FOREACH_MOD(OnAkickDel, (source, ci, ci->GetAkick(number - 1)));
|
||||
|
||||
++deleted;
|
||||
ci->EraseAkick(number - 1);
|
||||
@@ -241,7 +241,7 @@ class CommandCSAKick : public Command
|
||||
bool override = !source.AccessFor(ci).HasPriv("AKICK");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << mask;
|
||||
|
||||
FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(i)));
|
||||
FOREACH_MOD(OnAkickDel, (source, ci, ci->GetAkick(i)));
|
||||
|
||||
ci->EraseAkick(i);
|
||||
|
||||
@@ -512,8 +512,6 @@ class CSAKick : public Module
|
||||
CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandcsakick(this)
|
||||
{
|
||||
Implementation i[] = { I_OnCheckKick };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
else
|
||||
target_ci->last_topic_setter = source.service->nick;
|
||||
|
||||
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci));
|
||||
FOREACH_MOD(OnChanRegistered, (target_ci));
|
||||
|
||||
source.Reply(_("All settings from \002%s\002 have been cloned to \002%s\002."), channel.c_str(), target.c_str());
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class CommandCSDrop : public Command
|
||||
bool override = (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER"));
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
|
||||
|
||||
FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci));
|
||||
FOREACH_MOD(OnChanDrop, (ci));
|
||||
|
||||
Reference<Channel> c = ci->c;
|
||||
delete ci;
|
||||
|
||||
@@ -272,8 +272,6 @@ class CSEntryMessage : public Module
|
||||
CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), entrymsg_type("EntryMsg", EntryMsg::Unserialize), commandentrymsg(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnJoinChannel };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnJoinChannel(User *u, Channel *c) anope_override
|
||||
|
||||
@@ -71,8 +71,6 @@ class CSStats : public Module
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -96,8 +96,6 @@ class CSTop : public Module
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -178,7 +178,7 @@ class CommandCSFlags : public Command
|
||||
{
|
||||
if (current != NULL)
|
||||
{
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, current));
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, current));
|
||||
delete current;
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << mask;
|
||||
source.Reply(_("\002%s\002 removed from the %s access list."), mask.c_str(), ci->name.c_str());
|
||||
@@ -206,7 +206,7 @@ class CommandCSFlags : public Command
|
||||
|
||||
ci->AddAccess(access);
|
||||
|
||||
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, access));
|
||||
FOREACH_MOD(OnAccessAdd, (ci, source, access));
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to modify " << mask << "'s flags to " << access->AccessSerialize();
|
||||
source.Reply(_("Access for \002%s\002 on %s set to +\002%s\002"), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
@@ -285,7 +285,7 @@ class CommandCSFlags : public Command
|
||||
{
|
||||
ci->ClearAccess();
|
||||
|
||||
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
|
||||
FOREACH_MOD(OnAccessClear, (ci, source));
|
||||
|
||||
source.Reply(_("Channel %s access list has been cleared."), ci->name.c_str());
|
||||
|
||||
@@ -391,8 +391,6 @@ class CSFlags : public Module
|
||||
{
|
||||
this->SetPermanent(true);
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, 1);
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -105,7 +105,7 @@ class CommandCSInfo : public Command
|
||||
info["Expires on"] = Anope::strftime(ci->last_used + chanserv_expire);
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, info, show_all));
|
||||
FOREACH_MOD(OnChanInfo, (source, ci, info, show_all));
|
||||
|
||||
std::vector<Anope::string> replies;
|
||||
info.Process(replies);
|
||||
|
||||
@@ -186,8 +186,6 @@ class CSLog : public Module
|
||||
MSService("MemoServService", "MemoServ"), commandcslog(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnLog };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnLog(Log *l) anope_override
|
||||
|
||||
@@ -75,7 +75,7 @@ class CommandCSRegister : public Command
|
||||
c->SetCorrectModes(u, true);
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(ci));
|
||||
FOREACH_MOD(OnChanRegistered, (ci));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -296,15 +296,6 @@ class CSSeen : public Module
|
||||
public:
|
||||
CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), seeninfo_type("SeenInfo", SeenInfo::Unserialize), commandseen(this), commandosseen(this)
|
||||
{
|
||||
|
||||
Implementation eventlist[] = { I_OnExpireTick,
|
||||
I_OnUserConnect,
|
||||
I_OnUserNickChange,
|
||||
I_OnUserQuit,
|
||||
I_OnJoinChannel,
|
||||
I_OnPartChannel,
|
||||
I_OnPreUserKicked };
|
||||
ModuleManager::Attach(eventlist, this, sizeof(eventlist) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnExpireTick() anope_override
|
||||
|
||||
+15
-19
@@ -73,7 +73,7 @@ class CommandCSSetAutoOp : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -130,7 +130,7 @@ class CommandCSSetBanType : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -191,7 +191,7 @@ class CommandCSSetChanstats : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -245,7 +245,7 @@ class CommandCSSetDescription : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -300,7 +300,7 @@ class CommandCSSetFounder : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -363,7 +363,7 @@ class CommandCSSetKeepTopic : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -420,7 +420,7 @@ class CommandCSSetPeace : public Command
|
||||
return;
|
||||
}
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -479,7 +479,7 @@ class CommandCSSetPersist : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -627,7 +627,7 @@ class CommandCSSetPrivate : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -689,7 +689,7 @@ class CommandCSSetRestricted : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -745,7 +745,7 @@ class CommandCSSetSecure : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -803,7 +803,7 @@ class CommandCSSetSecureFounder : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -861,7 +861,7 @@ class CommandCSSetSecureOps : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -917,7 +917,7 @@ class CommandCSSetSignKick : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -988,7 +988,7 @@ class CommandCSSetSuccessor : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -1128,10 +1128,6 @@ class CSSet : public Module
|
||||
commandcssetsecure(this), commandcssetsecurefounder(this), commandcssetsecureops(this), commandcssetsignkick(this),
|
||||
commandcssetsuccessor(this), commandcssetnoexpire(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnCheckKick, I_OnDelChan, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnCheckDelete, I_OnJoinChannel,
|
||||
I_OnSetCorrectModes };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override
|
||||
|
||||
@@ -85,7 +85,7 @@ class CommandCSSetMisc : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1]));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, params[1]));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -136,8 +136,6 @@ class CSSetMisc : public Module
|
||||
CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
csmiscdata_type("CSMiscData", CSMiscData::Unserialize), commandcssetmisc(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnChanInfo };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -74,7 +74,7 @@ class CommandCSSuspend : public Command
|
||||
Log(LOG_ADMIN, source, this, ci) << (!reason.empty() ? reason : "No reason") << ", expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never");
|
||||
source.Reply(_("Channel \002%s\002 is now suspended."), ci->name.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
|
||||
FOREACH_MOD(OnChanSuspend, (ci));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class CommandCSUnSuspend : public Command
|
||||
|
||||
source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
|
||||
FOREACH_MOD(OnChanUnsuspend, (ci));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -161,8 +161,6 @@ class CSSuspend : public Module
|
||||
commandcssuspend(this), commandcsunsuspend(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnChanInfo, I_OnPreChanExpire, I_OnCheckKick };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) anope_override
|
||||
|
||||
@@ -16,7 +16,7 @@ class CommandCSTopic : public Command
|
||||
void Lock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock on"));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, "topiclock on"));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -27,7 +27,7 @@ class CommandCSTopic : public Command
|
||||
void Unlock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock off"));
|
||||
FOREACH_RESULT(OnSetChannelOption, MOD_RESULT, (source, this, ci, "topiclock off"));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ class CommandCSXOP : public Command
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, acc));
|
||||
FOREACH_MOD(OnAccessAdd, (ci, source, acc));
|
||||
source.Reply(_("\002%s\002 added to %s %s list."), acc->mask.c_str(), ci->name.c_str(), source.command.c_str());
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ class CommandCSXOP : public Command
|
||||
else
|
||||
nicks = caccess->mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, caccess));
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, caccess));
|
||||
|
||||
ci->EraseAccess(number - 1);
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class CommandCSXOP : public Command
|
||||
|
||||
source.Reply(_("\002%s\002 deleted from %s %s list."), a->mask.c_str(), ci->name.c_str(), source.command.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, a));
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, a));
|
||||
delete a;
|
||||
|
||||
return;
|
||||
@@ -431,7 +431,7 @@ class CommandCSXOP : public Command
|
||||
ci->EraseAccess(i - 1);
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
|
||||
FOREACH_MOD(OnAccessClear, (ci, source));
|
||||
|
||||
source.Reply(_("Channel %s %s list has been cleared."), ci->name.c_str(), source.command.c_str());
|
||||
}
|
||||
@@ -554,8 +554,6 @@ class CSXOP : public Module
|
||||
{
|
||||
this->SetPermanent(true);
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -37,7 +37,7 @@ class CommandHelp : public Command
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnPreHelp, OnPreHelp(source, params));
|
||||
FOREACH_RESULT(OnPreHelp, MOD_RESULT, (source, params));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -184,7 +184,7 @@ class CommandHelp : public Command
|
||||
source.Reply(_("No help available for \002%s\002."), params[0].c_str());
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnPostHelp, OnPostHelp(source, params));
|
||||
FOREACH_MOD(OnPostHelp, (source, params));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class CommandHSDel : public Command
|
||||
if (na)
|
||||
{
|
||||
Log(LOG_ADMIN, source, this) << "for user " << na->nick;
|
||||
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
|
||||
FOREACH_MOD(OnDeleteVhost, (na));
|
||||
na->RemoveVhost();
|
||||
source.Reply(_("Vhost for \002%s\002 removed."), nick.c_str());
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class CommandHSDelAll : public Command
|
||||
NickAlias *na = NickAlias::Find(nick);
|
||||
if (na)
|
||||
{
|
||||
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
|
||||
FOREACH_MOD(OnDeleteVhost, (na));
|
||||
const NickCore *nc = na->nc;
|
||||
for (unsigned i = 0; i < nc->aliases->size(); ++i)
|
||||
{
|
||||
|
||||
@@ -190,7 +190,7 @@ class CommandHSActivate : public Command
|
||||
if (req)
|
||||
{
|
||||
na->SetVhost(req->ident, req->host, source.GetNick(), req->time);
|
||||
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
|
||||
if (Config->GetModule(this->owner)->Get<bool>("memouser") && memoserv)
|
||||
memoserv->Send(source.service->nick, na->nick, _("[auto memo] Your requested vHost has been approved."), true);
|
||||
|
||||
@@ -80,7 +80,7 @@ class CommandHSSet : public Command
|
||||
Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
|
||||
|
||||
na->SetVhost(user, host, source.GetNick());
|
||||
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
if (!user.empty())
|
||||
source.Reply(_("VHost for \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), user.c_str(), host.c_str());
|
||||
else
|
||||
@@ -182,7 +182,7 @@ class CommandHSSetAll : public Command
|
||||
|
||||
na->SetVhost(user, host, source.GetNick());
|
||||
this->Sync(na);
|
||||
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
if (!user.empty())
|
||||
source.Reply(_("VHost for group \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), user.c_str(), host.c_str());
|
||||
else
|
||||
|
||||
@@ -41,9 +41,9 @@ class CommandMSCancel : public Command
|
||||
if (mi->GetMemo(i)->unread && source.nc->display.equals_ci(mi->GetMemo(i)->sender))
|
||||
{
|
||||
if (ischan)
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(i)));
|
||||
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(i)));
|
||||
else
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(na->nc, mi, mi->GetMemo(i)));
|
||||
FOREACH_MOD(OnMemoDel, (na->nc, mi, mi->GetMemo(i)));
|
||||
mi->Del(i);
|
||||
source.Reply(_("Last memo to \002%s\002 has been cancelled."), nname.c_str());
|
||||
return;
|
||||
|
||||
@@ -27,9 +27,9 @@ class MemoDelCallback : public NumberList
|
||||
return;
|
||||
|
||||
if (ci)
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(number - 1)));
|
||||
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(number - 1)));
|
||||
else
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(number - 1)));
|
||||
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(number - 1)));
|
||||
|
||||
mi->Del(number - 1);
|
||||
source.Reply(_("Memo %d has been deleted."), number);
|
||||
@@ -97,9 +97,9 @@ class CommandMSDel : public Command
|
||||
{
|
||||
/* Delete last memo. */
|
||||
if (ci)
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(mi->memos->size() - 1)));
|
||||
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(mi->memos->size() - 1)));
|
||||
else
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
|
||||
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
|
||||
mi->Del(mi->memos->size() - 1);
|
||||
source.Reply(_("Memo %d has been deleted."), mi->memos->size() + 1);
|
||||
}
|
||||
@@ -109,9 +109,9 @@ class CommandMSDel : public Command
|
||||
for (unsigned i = 0, end = mi->memos->size(); i < end; ++i)
|
||||
{
|
||||
if (ci)
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(i)));
|
||||
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(i)));
|
||||
else
|
||||
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(i)));
|
||||
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(i)));
|
||||
delete mi->GetMemo(i);
|
||||
}
|
||||
mi->memos->clear();
|
||||
|
||||
@@ -180,8 +180,6 @@ class NSAccess : public Module
|
||||
NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandnsaccess(this)
|
||||
{
|
||||
Implementation i[] = { I_OnNickRegister };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnNickRegister(User *u, NickAlias *na) anope_override
|
||||
|
||||
@@ -242,8 +242,6 @@ class NSAJoin : public Module
|
||||
if (!IRCD->CanSVSJoin)
|
||||
throw ModuleException("Your IRCd does not support SVSJOIN");
|
||||
|
||||
Implementation i[] = { I_OnNickIdentify };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnNickIdentify(User *u) anope_override
|
||||
|
||||
@@ -225,8 +225,6 @@ class NSCert : public Module
|
||||
if (!IRCD || !IRCD->CanCertFP)
|
||||
throw ModuleException("Your IRCd does not support ssl client certificates");
|
||||
|
||||
Implementation i[] = { I_OnFingerprint };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class CommandNSDrop : public Command
|
||||
source.Reply(_("You may not drop other Services Operators' nicknames."));
|
||||
else
|
||||
{
|
||||
FOREACH_MOD(I_OnNickDrop, OnNickDrop(source, na));
|
||||
FOREACH_MOD(OnNickDrop, (source, na));
|
||||
|
||||
Log(!is_mine ? LOG_ADMIN : LOG_COMMAND, source, this) << "to drop nickname " << na->nick << " (group: " << na->nc->display << ") (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
|
||||
delete na;
|
||||
|
||||
@@ -31,7 +31,7 @@ class NSGroupRequest : public IdentifyRequest
|
||||
/* If the nick is already registered, drop it. */
|
||||
if (na)
|
||||
{
|
||||
FOREACH_MOD(I_OnChangeCoreDisplay, OnChangeCoreDisplay(na->nc, u->nick));
|
||||
FOREACH_MOD(OnChangeCoreDisplay, (na->nc, u->nick));
|
||||
delete na;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class NSGroupRequest : public IdentifyRequest
|
||||
|
||||
u->Login(target->nc);
|
||||
IRCD->SendLogin(u);
|
||||
FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target));
|
||||
FOREACH_MOD(OnNickGroup, (u, target));
|
||||
|
||||
Log(LOG_COMMAND, source, cmd) << "makes " << nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")";
|
||||
source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str());
|
||||
@@ -147,7 +147,7 @@ class CommandNSGroup : public Command
|
||||
if (ok == false && !pass.empty())
|
||||
{
|
||||
NSGroupRequest *req = new NSGroupRequest(owner, source, this, u->nick, target, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req));
|
||||
req->Dispatch();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -82,7 +82,7 @@ class CommandNSIdentify : public Command
|
||||
else
|
||||
{
|
||||
NSIdentifyRequest *req = new NSIdentifyRequest(owner, source, this, na ? na->nc->display : nick, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(u, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (u, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -135,7 +135,7 @@ class CommandNSInfo : public Command
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnNickInfo, OnNickInfo(source, na, info, show_hidden));
|
||||
FOREACH_MOD(OnNickInfo, (source, na, info, show_hidden));
|
||||
|
||||
std::vector<Anope::string> replies;
|
||||
info.Process(replies);
|
||||
|
||||
@@ -54,7 +54,7 @@ class CommandNSLogout : public Command
|
||||
u2->Logout();
|
||||
|
||||
/* Send out an event */
|
||||
FOREACH_MOD(I_OnNickLogout, OnNickLogout(u2));
|
||||
FOREACH_MOD(OnNickLogout, (u2));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class CommandNSRecover : public Command
|
||||
if (ok == false && !pass.empty())
|
||||
{
|
||||
NSRecoverRequest *req = new NSRecoverRequest(owner, source, this, na->nick, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req));
|
||||
req->Dispatch();
|
||||
}
|
||||
else
|
||||
@@ -209,8 +209,6 @@ class NSRecover : public Module
|
||||
if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
|
||||
throw ModuleException(modname + " can not be used with options:nonicknameownership enabled");
|
||||
|
||||
Implementation i[] = { I_OnUserNickChange, I_OnJoinChannel, I_OnShutdown, I_OnRestart };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~NSRecover()
|
||||
|
||||
@@ -194,7 +194,7 @@ class CommandNSRegister : public Command
|
||||
|
||||
Log(LOG_COMMAND, source, this) << "to register " << na->nick << " (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
|
||||
|
||||
FOREACH_MOD(I_OnNickRegister, OnNickRegister(source.GetUser(), na));
|
||||
FOREACH_MOD(OnNickRegister, (source.GetUser(), na));
|
||||
|
||||
if (na->nc->GetAccessCount())
|
||||
source.Reply(_("Nickname \002%s\002 registered under your user@host-mask: %s"), u_nick.c_str(), na->nc->GetAccess(0).c_str());
|
||||
|
||||
@@ -71,7 +71,6 @@ class NSResetPass : public Module
|
||||
throw ModuleException("Not using mail.");
|
||||
|
||||
|
||||
ModuleManager::Attach(I_OnPreCommand, this);
|
||||
}
|
||||
|
||||
~NSResetPass()
|
||||
|
||||
+11
-13
@@ -224,7 +224,7 @@ class CommandNSSetAutoOp : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -306,7 +306,7 @@ class CommandNSSetChanstats : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, na->nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, na->nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -395,7 +395,7 @@ class CommandNSSetDisplay : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, user_na->nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, user_na->nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -510,7 +510,7 @@ class CommandNSSetEmail : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -599,7 +599,7 @@ class CommandNSSetGreet : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -682,7 +682,7 @@ class CommandNSSetHide : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -811,7 +811,7 @@ class CommandNSSetKill : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -937,7 +937,7 @@ class CommandNSSetLanguage : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -1045,7 +1045,7 @@ class CommandNSSetMessage : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -1134,7 +1134,7 @@ class CommandNSSetPrivate : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -1223,7 +1223,7 @@ class CommandNSSetSecure : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -1399,8 +1399,6 @@ class NSSet : public Module
|
||||
commandnssasetnoexpire(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnPreCommand, I_OnSetCorrectModes };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override
|
||||
|
||||
@@ -87,7 +87,7 @@ class CommandNSSetMisc : public Command
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnSetNickOption, OnSetNickOption(source, this, nc, param));
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -155,8 +155,6 @@ class NSSetMisc : public Module
|
||||
NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
nsmiscdata_type("NSMiscData", NSMiscData::Unserialize), commandnssetmisc(this), commandnssasetmisc(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnNickInfo };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -94,7 +94,7 @@ class CommandNSSuspend : public Command
|
||||
Log(LOG_ADMIN, source, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never");
|
||||
source.Reply(_("Nick %s is now suspended."), nick.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na));
|
||||
FOREACH_MOD(OnNickSuspend, (na));
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -150,7 +150,7 @@ class CommandNSUnSuspend : public Command
|
||||
Log(LOG_ADMIN, source, this) << "for " << na->nick;
|
||||
source.Reply(_("Nick %s is now released."), nick.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));
|
||||
FOREACH_MOD(OnNickUnsuspended, (na));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -173,8 +173,6 @@ class NSSuspend : public Module
|
||||
NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandnssuspend(this), commandnsunsuspend(this)
|
||||
{
|
||||
Implementation i[] = { I_OnPreNickExpire, I_OnNickInfo };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) anope_override
|
||||
|
||||
@@ -31,7 +31,7 @@ class CommandNSUpdate : public Command
|
||||
na->last_seen = Anope::CurTime;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnNickUpdate, OnNickUpdate(u));
|
||||
FOREACH_MOD(OnNickUpdate, (u));
|
||||
|
||||
source.Reply(_("Status updated (memos, vhost, chmodes, flags)."));
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ class CommandOSAKill : public Command
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, akills));
|
||||
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, akills));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
{
|
||||
delete x;
|
||||
@@ -231,7 +231,7 @@ class CommandOSAKill : public Command
|
||||
|
||||
do
|
||||
{
|
||||
FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, akills));
|
||||
FOREACH_MOD(OnDelXLine, (source, x, akills));
|
||||
|
||||
source.Reply(_("\002%s\002 deleted from the AKILL list."), x->mask.c_str());
|
||||
AkillDelCallback::DoDel(source, x);
|
||||
@@ -353,7 +353,7 @@ class CommandOSAKill : public Command
|
||||
for (unsigned i = akills->GetCount(); i > 0; --i)
|
||||
{
|
||||
XLine *x = akills->GetEntry(i - 1);
|
||||
FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, akills));
|
||||
FOREACH_MOD(OnDelXLine, (source, x, akills));
|
||||
akills->DelXLine(x);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class DefConTimeout : public Timer
|
||||
if (DConfig.defaultlevel != level)
|
||||
{
|
||||
DConfig.defaultlevel = level;
|
||||
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level));
|
||||
FOREACH_MOD(OnDefconLevel, (level));
|
||||
Log(Config->GetClient("OperServ"), "operserv/defcon") << "Defcon level timeout, returning to level " << level;
|
||||
|
||||
if (DConfig.globalondefcon)
|
||||
@@ -203,7 +203,7 @@ class CommandOSDefcon : public Command
|
||||
|
||||
DConfig.defaultlevel = newLevel;
|
||||
|
||||
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(newLevel));
|
||||
FOREACH_MOD(OnDefconLevel, (newLevel));
|
||||
|
||||
delete timeout;
|
||||
|
||||
@@ -333,8 +333,6 @@ class OSDefcon : public Module
|
||||
OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelSync };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -656,8 +656,6 @@ class ModuleDNS : public Module
|
||||
zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnNewServer, I_OnServerQuit, I_OnUserConnect, I_OnPreUserLogoff, I_OnDnsRequest };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
for (unsigned j = 0; j < dns_servers->size(); ++j)
|
||||
{
|
||||
|
||||
@@ -251,8 +251,6 @@ class OSForbid : public Module
|
||||
forbiddata_type("ForbidData", ForbidData::Unserialize), forbidService(this), commandosforbid(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnUserConnect, I_OnUserNickChange, I_OnJoinChannel, I_OnPreCommand };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnUserConnect(User *u, bool &exempt) anope_override
|
||||
|
||||
@@ -320,8 +320,6 @@ class OSIgnore : public Module
|
||||
ignoredata_type("IgnoreData", IgnoreData::Unserialize), osignoreservice(this), commandosignore(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnBotPrivmsg };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) anope_override
|
||||
|
||||
@@ -116,7 +116,6 @@ class OSLogin : public Module
|
||||
commandoslogin(this), commandoslogout(this)
|
||||
{
|
||||
|
||||
ModuleManager::Attach(I_IsServicesOper, this);
|
||||
}
|
||||
|
||||
~OSLogin()
|
||||
|
||||
@@ -385,8 +385,6 @@ class OSNews : public Module
|
||||
OSNews(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
newsitem_type("NewsItem", NewsItem::Unserialize), newsservice(this), commandoslogonnews(this), commandosopernews(this), commandosrandomnews(this)
|
||||
{
|
||||
Implementation i[] = { I_OnUserModeSet, I_OnUserConnect };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnUserModeSet(User *u, const Anope::string &mname) anope_override
|
||||
|
||||
@@ -82,7 +82,6 @@ class OSNOOP : public Module
|
||||
commandosnoop(this)
|
||||
{
|
||||
|
||||
ModuleManager::Attach(I_OnUserModeSet, this);
|
||||
}
|
||||
|
||||
void OnUserModeSet(User *u, const Anope::string &mname) anope_override
|
||||
|
||||
@@ -156,7 +156,7 @@ class ExceptionDelCallback : public NumberList
|
||||
static void DoDel(CommandSource &source, unsigned index)
|
||||
{
|
||||
Exception *e = session_service->GetExceptions()[index];
|
||||
FOREACH_MOD(I_OnExceptionDel, OnExceptionDel(source, e));
|
||||
FOREACH_MOD(OnExceptionDel, (source, e));
|
||||
|
||||
session_service->DelException(e);
|
||||
delete e;
|
||||
@@ -360,7 +360,7 @@ class CommandOSException : public Command
|
||||
exception->expires = expires;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnExceptionAdd, OnExceptionAdd(exception));
|
||||
FOREACH_RESULT(OnExceptionAdd, MOD_RESULT, (exception));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
delete exception;
|
||||
else
|
||||
@@ -619,8 +619,6 @@ class OSSession : public Module
|
||||
{
|
||||
this->SetPermanent(true);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserConnect, I_OnUserQuit, I_OnExpireTick };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
ModuleManager::SetPriority(this, PRIORITY_FIRST);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ class CommandOSSXLineBase : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, x, this->xlm()));
|
||||
FOREACH_MOD(OnDelXLine, (source, x, this->xlm()));
|
||||
|
||||
SXLineDelCallback::DoDel(this->xlm(), source, x);
|
||||
source.Reply(_("\002%s\002 deleted from the %s list."), mask.c_str(), source.command.c_str());
|
||||
@@ -198,7 +198,7 @@ class CommandOSSXLineBase : public Command
|
||||
|
||||
void OnClear(CommandSource &source)
|
||||
{
|
||||
FOREACH_MOD(I_OnDelXLine, OnDelXLine(source, NULL, this->xlm()));
|
||||
FOREACH_MOD(OnDelXLine, (source, NULL, this->xlm()));
|
||||
|
||||
for (unsigned i = this->xlm()->GetCount(); i > 0; --i)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, this->xlm()));
|
||||
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, this->xlm()));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
{
|
||||
delete x;
|
||||
@@ -576,7 +576,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnAddXLine, OnAddXLine(source, x, this->xlm()));
|
||||
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, this->xlm()));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
{
|
||||
delete x;
|
||||
|
||||
@@ -13,8 +13,6 @@ class StatusUpdate : public Module
|
||||
StatusUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnAccessAdd, I_OnAccessDel };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnAccessAdd(ChannelInfo *ci, CommandSource &, ChanAccess *access) anope_override
|
||||
|
||||
@@ -164,8 +164,6 @@ class DBFlatFile : public Module, public Pipe
|
||||
DBFlatFile(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR), last_day(0), loaded(false)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnLoadDatabase, I_OnSaveDatabase, I_OnSerializeTypeCreate };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnNotify() anope_override
|
||||
|
||||
@@ -1093,8 +1093,6 @@ class DBOld : public Module
|
||||
DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnLoadDatabase, I_OnUplinkSync };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
hashm = Config->GetModule(this)->Get<const Anope::string>("hash");
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ static void ReadDatabase(Module *m = NULL)
|
||||
/*if (m)
|
||||
MOD_RESULT = m->OnDatabaseRead(params);
|
||||
else
|
||||
FOREACH_RESULT(I_OnDatabaseRead, OnDatabaseRead(params));
|
||||
FOREACH_RESULT(OnDatabaseRead, MOD_RESULT, (params));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
continue;*/
|
||||
OnDatabaseRead(params);
|
||||
@@ -587,8 +587,6 @@ class DBPlain : public Module
|
||||
public:
|
||||
DBPlain(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnLoadDatabase, I_OnSaveDatabase };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
LastDay = 0;
|
||||
}
|
||||
@@ -645,9 +643,6 @@ class DBPlain : public Module
|
||||
{
|
||||
ReadDatabase();
|
||||
|
||||
/* No need to ever reload this again, although this should never be trigged again */
|
||||
ModuleManager::Detach(I_OnLoadDatabase, this);
|
||||
|
||||
return EVENT_STOP;
|
||||
}
|
||||
|
||||
@@ -702,7 +697,7 @@ class DBPlain : public Module
|
||||
}
|
||||
for (unsigned k = 0, end = mi->ignores.size(); k < end; ++k)
|
||||
db_buffer << "MD MIG " << Anope::string(mi->ignores[k]) << endl;
|
||||
//FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, nc));
|
||||
//FOREACH_MOD(OnDatabaseWriteMetadata, (WriteMetadata, nc));
|
||||
}
|
||||
|
||||
for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end; ++it)
|
||||
@@ -727,7 +722,7 @@ class DBPlain : public Module
|
||||
if (na->HasVhost())
|
||||
db_buffer << "MD VHOST " << na->GetVhostCreator() << " " << na->GetVhostCreated() << " " << na->GetVhostHost() << " :" << na->GetVhostIdent() << endl;
|
||||
|
||||
//FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, na));
|
||||
//FOREACH_MOD(OnDatabaseWriteMetadata, (WriteMetadata, na));
|
||||
}
|
||||
|
||||
for (botinfo_map::const_iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
|
||||
@@ -836,7 +831,7 @@ class DBPlain : public Module
|
||||
db_buffer << "MD BI BADWORD " << (ci->GetBadWord(k)->type == BW_ANY ? "ANY " : "") << (ci->GetBadWord(k)->type == BW_SINGLE ? "SINGLE " : "") << (ci->GetBadWord(k)->type == BW_START ? "START " : "") <<
|
||||
(ci->GetBadWord(k)->type == BW_END ? "END " : "") << ":" << ci->GetBadWord(k)->word << endl;
|
||||
|
||||
//FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, ci));
|
||||
//FOREACH_MOD(OnDatabaseWriteMetadata, (WriteMetadata, ci));
|
||||
}
|
||||
|
||||
db_buffer << "OS STATS " << MaxUserCount << " " << MaxUserTime << endl;
|
||||
@@ -858,7 +853,7 @@ class DBPlain : public Module
|
||||
db_buffer << "OS EXCEPTION " << e->mask << " " << e->limit << " " << e->who << " " << e->time << " " << e->expires << " " << e->reason << endl;
|
||||
}
|
||||
|
||||
//FOREACH_MOD(I_OnDatabaseWrite, OnDatabaseWrite(Write));
|
||||
//FOREACH_MOD(OnDatabaseWrite, (Write));
|
||||
|
||||
std::fstream db;
|
||||
db.open(DatabaseFile.c_str(), std::ios_base::out | std::ios_base::trunc);
|
||||
|
||||
@@ -132,8 +132,6 @@ class DatabaseRedis : public Module, public Pipe
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnLoadDatabase, I_OnSerializeTypeCreate, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializableUpdate };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
/* Insert or update an object */
|
||||
|
||||
@@ -92,8 +92,6 @@ class DBSQL : public Module, public Pipe
|
||||
DBSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR), sql("", ""), sqlinterface(this), shutting_down(false), loading_databases(false), loaded(false), imported(false)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnShutdown, I_OnRestart, I_OnLoadDatabase, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializableUpdate, I_OnSerializeTypeCreate };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
if (ModuleManager::FindModule("db_sql_live") != NULL)
|
||||
throw ModuleException("db_sql can not be loaded after db_sql_live");
|
||||
|
||||
@@ -70,8 +70,6 @@ class DBMySQL : public Module, public Pipe
|
||||
this->ro = false;
|
||||
this->init = false;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnShutdown, I_OnLoadDatabase, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializeCheck, I_OnSerializableUpdate };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
if (ModuleManager::FindFirstOf(DATABASE) != this)
|
||||
throw ModuleException("If db_sql_live is loaded it must be the first database module loaded.");
|
||||
|
||||
@@ -346,8 +346,6 @@ class EMD5 : public Module
|
||||
md5provider(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) anope_override
|
||||
|
||||
@@ -15,8 +15,6 @@ class ENone : public Module
|
||||
ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnEncrypt, I_OnDecrypt, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) anope_override
|
||||
|
||||
@@ -49,8 +49,6 @@ class EOld : public Module
|
||||
if (!md5)
|
||||
throw ModuleException("Unable to find md5 reference");
|
||||
|
||||
Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) anope_override
|
||||
|
||||
@@ -201,8 +201,6 @@ class ESHA1 : public Module
|
||||
sha1provider(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) anope_override
|
||||
|
||||
@@ -277,8 +277,6 @@ class ESHA256 : public Module
|
||||
sha256provider(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
use_iv = false;
|
||||
}
|
||||
|
||||
@@ -336,17 +336,6 @@ class MChanstats : public Module
|
||||
MChanstats(const Anope::string &modname, const Anope::string &creator) :
|
||||
Module(modname, creator, EXTRA | VENDOR), sql("", ""), sqlinterface(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnPrivmsg,
|
||||
I_OnPreUserKicked,
|
||||
I_OnChannelModeSet,
|
||||
I_OnChannelModeUnset,
|
||||
I_OnTopicUpdated,
|
||||
I_OnDelCore,
|
||||
I_OnChangeCoreDisplay,
|
||||
I_OnChanDrop,
|
||||
I_OnReload};
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -334,8 +334,6 @@ class HTTPD : public Module
|
||||
HTTPD(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), sslref("SSLService", "ssl")
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~HTTPD()
|
||||
|
||||
@@ -407,8 +407,6 @@ class ModuleLDAP : public Module, public Pipe
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnModuleUnload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ModuleLDAP()
|
||||
|
||||
@@ -103,7 +103,7 @@ class IdentifyInterface : public LDAPInterface
|
||||
if (na == NULL)
|
||||
{
|
||||
na = new NickAlias(ii->req->GetAccount(), new NickCore(ii->req->GetAccount()));
|
||||
FOREACH_MOD(I_OnNickRegister, OnNickRegister(ii->user, na));
|
||||
FOREACH_MOD(OnNickRegister, (ii->user, na));
|
||||
BotInfo *NickServ = Config->GetClient("NickServ");
|
||||
if (ii->user && NickServ)
|
||||
ii->user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
|
||||
@@ -217,8 +217,6 @@ class NSIdentifyLDAP : public Module
|
||||
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnPreCommand, I_OnCheckAuthentication, I_OnNickIdentify, I_OnNickRegister };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
ModuleManager::SetPriority(this, PRIORITY_FIRST);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,6 @@ class LDAPOper : public Module
|
||||
Module(modname, creator, EXTRA | VENDOR), ldap("LDAPProvider", "ldap/main"), iinterface(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnDelCore };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -169,8 +169,6 @@ class ModuleSQL : public Module, public Pipe
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnModuleUnload };
|
||||
ModuleManager::Attach(i, this, 2);
|
||||
|
||||
DThread = new DispatcherThread();
|
||||
DThread->Start();
|
||||
|
||||
@@ -221,8 +221,6 @@ class ModuleProxyScan : public Module
|
||||
connectionTimeout(this, 5)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserConnect };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
this->listener = NULL;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class SQLAuthenticationResult : public SQL::Interface
|
||||
if (na == NULL)
|
||||
{
|
||||
na = new NickAlias(req->GetAccount(), new NickCore(req->GetAccount()));
|
||||
FOREACH_MOD(I_OnNickRegister, OnNickRegister(user, na));
|
||||
FOREACH_MOD(OnNickRegister, (user, na));
|
||||
if (user && NickServ)
|
||||
user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
|
||||
}
|
||||
@@ -78,8 +78,6 @@ class ModuleSQLAuthentication : public Module
|
||||
{
|
||||
me = this;
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnPreCommand, I_OnCheckAuthentication };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -98,8 +98,6 @@ class ModuleSQLOper : public Module
|
||||
ModuleSQLOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnNickIdentify };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -66,8 +66,6 @@ class ModuleSQLite : public Module
|
||||
public:
|
||||
ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ModuleSQLite()
|
||||
|
||||
@@ -117,8 +117,6 @@ class SSLModule : public Module
|
||||
SSL_CTX_set_session_id_context(client_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
|
||||
SSL_CTX_set_session_id_context(server_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
|
||||
|
||||
ModuleManager::Attach(I_OnReload, this);
|
||||
ModuleManager::Attach(I_OnPreServerConnect, this);
|
||||
}
|
||||
|
||||
~SSLModule()
|
||||
|
||||
@@ -168,8 +168,6 @@ class ModuleXMLRPC : public Module
|
||||
throw ModuleException("Unable to find http reference, is m_httpd loaded?");
|
||||
httpref->RegisterPage(&xmlrpcinterface);
|
||||
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ModuleXMLRPC()
|
||||
|
||||
@@ -117,7 +117,7 @@ class MyXMLRPCEvent : public XMLRPCEvent
|
||||
else
|
||||
{
|
||||
XMLRPCIdentifyRequest *req = new XMLRPCIdentifyRequest(me, request, client, iface, username, password);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page
|
||||
// Rate limit check.
|
||||
|
||||
WebpanelRequest *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-3
@@ -779,7 +779,7 @@ class MyManager : public Manager, public Timer
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnDnsRequest, OnDnsRequest(recv_packet, packet));
|
||||
FOREACH_MOD(OnDnsRequest, (recv_packet, packet));
|
||||
|
||||
for (unsigned i = 0; i < recv_packet.questions.size(); ++i)
|
||||
{
|
||||
@@ -940,8 +940,6 @@ class ModuleDNS : public Module
|
||||
ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), manager(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnModuleUnload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -92,8 +92,6 @@ class ModuleDNSBL : public Module
|
||||
ModuleDNSBL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserConnect };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -12,8 +12,6 @@ class HelpChannel : public Module
|
||||
public:
|
||||
HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnChannelModeSet };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, const Anope::string &mname, const Anope::string ¶m) anope_override
|
||||
|
||||
@@ -529,8 +529,6 @@ class ModuleRedis : public Module
|
||||
public:
|
||||
ModuleRedis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnModuleUnload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ModuleRedis()
|
||||
|
||||
@@ -155,8 +155,6 @@ class ModuleRewrite : public Module
|
||||
public:
|
||||
ModuleRewrite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), cmdrewrite(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -554,7 +554,6 @@ class ProtoBahamut : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
|
||||
@@ -171,7 +171,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
if (params[1] == "CERTFP")
|
||||
{
|
||||
u->fingerprint = params[2];
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
/*
|
||||
* Received: :42X ENCAP * SASL 42XAAAAAH * S PLAIN
|
||||
@@ -257,7 +257,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new CharybdisSASLIdentifyRequest(this->owner, source, params[2], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -419,8 +419,6 @@ class ProtoCharybdis : public Module
|
||||
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnChannelSync, I_OnMLock, I_OnUnMLock };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
if (ModuleManager::LoadModule("ratbox", User::Find(creator)) != MOD_ERR_OK)
|
||||
throw ModuleException("Unable to load ratbox");
|
||||
|
||||
@@ -610,7 +610,6 @@ public:
|
||||
{
|
||||
this->AddModes();
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
|
||||
if (Me->GetSID() == Me->GetName())
|
||||
Me->SetSID(Servers::TS6_SID_Retrieve());
|
||||
|
||||
@@ -953,7 +953,7 @@ struct IRCDMessageMetadata : IRCDMessage
|
||||
if ((pos2 - pos1) >= 32) // inspircd supports md5 and sha1 fingerprint hashes -> size 32 or 40 bytes.
|
||||
{
|
||||
u->fingerprint = data.substr(pos1, pos2 - pos1);
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1213,8 +1213,6 @@ class ProtoInspIRCd : public Module
|
||||
message_setident(this), message_server(this), message_time(this), message_uid(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnUserNickChange };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
Servers::Capab.insert("NOQUIT");
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new InspIRCDSASLIdentifyRequest(this->owner, params[2], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -790,8 +790,6 @@ class ProtoInspIRCd : public Module
|
||||
throw ModuleException("No protocol interface for insp12");
|
||||
ModuleManager::DetachAll(m_insp12);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserNickChange, I_OnChannelSync, I_OnChanRegistered, I_OnDelChan, I_OnMLock, I_OnUnMLock, I_OnSetChannelOption };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ProtoInspIRCd()
|
||||
|
||||
@@ -656,8 +656,6 @@ class ProtongIRCd : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
Implementation i[] = { I_OnUserNickChange };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
|
||||
@@ -202,7 +202,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
if (u)
|
||||
{
|
||||
u->fingerprint = params[3];
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -920,7 +920,7 @@ struct IRCDMessageSASL : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new UnrealSASLIdentifyRequest(this->owner, params[1], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -1211,8 +1211,6 @@ class ProtoUnreal : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserNickChange, I_OnChannelSync, I_OnChanRegistered, I_OnDelChan, I_OnMLock, I_OnUnMLock };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
ModuleManager::SetPriority(this, PRIORITY_FIRST);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ class BotServCore : public Module
|
||||
public:
|
||||
BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnSetCorrectModes, I_OnBotAssign, I_OnPrivmsg, I_OnJoinChannel, I_OnLeaveChannel,
|
||||
I_OnPreHelp, I_OnPostHelp, I_OnChannelModeSet, I_OnCreateChan, I_OnUserKicked, I_OnCreateBot };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
@@ -148,11 +145,11 @@ class BotServCore : public Module
|
||||
EventReturn MOD_RESULT;
|
||||
if (c->ci->AccessFor(u).HasPriv("FANTASIA"))
|
||||
{
|
||||
FOREACH_RESULT(I_OnBotFantasy, OnBotFantasy(source, cmd, c->ci, params));
|
||||
FOREACH_RESULT(OnBotFantasy, MOD_RESULT, (source, cmd, c->ci, params));
|
||||
}
|
||||
else
|
||||
{
|
||||
FOREACH_RESULT(I_OnBotNoFantasyAccess, OnBotNoFantasyAccess(source, cmd, c->ci, params));
|
||||
FOREACH_RESULT(OnBotNoFantasyAccess, MOD_RESULT, (source, cmd, c->ci, params));
|
||||
}
|
||||
|
||||
if (MOD_RESULT == EVENT_STOP || !c->ci->AccessFor(u).HasPriv("FANTASIA"))
|
||||
@@ -161,7 +158,7 @@ class BotServCore : public Module
|
||||
if (MOD_RESULT != EVENT_ALLOW && !info.permission.empty() && !source.HasCommand(info.permission))
|
||||
return;
|
||||
|
||||
FOREACH_RESULT(I_OnPreCommand, OnPreCommand(source, cmd, params));
|
||||
FOREACH_RESULT(OnPreCommand, MOD_RESULT, (source, cmd, params));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
@@ -169,7 +166,7 @@ class BotServCore : public Module
|
||||
cmd->Execute(source, params);
|
||||
if (!nc_reference)
|
||||
source.nc = NULL;
|
||||
FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, cmd, params));
|
||||
FOREACH_MOD(OnPostCommand, (source, cmd, params));
|
||||
}
|
||||
|
||||
void OnJoinChannel(User *user, Channel *c) anope_override
|
||||
|
||||
@@ -20,11 +20,6 @@ class ChanServCore : public Module, public ChanServService
|
||||
ChanServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR),
|
||||
ChanServService(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnBotDelete, I_OnBotPrivmsg, I_OnDelCore,
|
||||
I_OnPreHelp, I_OnPostHelp, I_OnCheckModes, I_OnCreateChan, I_OnCanSet,
|
||||
I_OnChannelSync, I_OnBotKick, I_OnExpireTick, I_OnCheckDelete, I_OnPreUplinkSync,
|
||||
I_OnChanRegistered, I_OnTopicUpdated };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void Hold(Channel *c) anope_override
|
||||
@@ -360,7 +355,7 @@ class ChanServCore : public Module, public ChanServService
|
||||
if (ci->HasExt("NO_EXPIRE"))
|
||||
expire = false;
|
||||
|
||||
FOREACH_MOD(I_OnPreChanExpire, OnPreChanExpire(ci, expire));
|
||||
FOREACH_MOD(OnPreChanExpire, (ci, expire));
|
||||
|
||||
if (expire)
|
||||
{
|
||||
@@ -369,7 +364,7 @@ class ChanServCore : public Module, public ChanServService
|
||||
extra = "suspended ";
|
||||
|
||||
Log(LOG_NORMAL, "chanserv/expire") << "Expiring " << extra << "channel " << ci->name << " (founder: " << (ci->GetFounder() ? ci->GetFounder()->display : "(none)") << ")";
|
||||
FOREACH_MOD(I_OnChanExpire, OnChanExpire(ci));
|
||||
FOREACH_MOD(OnChanExpire, (ci));
|
||||
delete ci;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,6 @@ class GlobalCore : public Module, public GlobalService
|
||||
GlobalCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR),
|
||||
GlobalService(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnRestart, I_OnShutdown, I_OnNewServer, I_OnPreHelp };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) anope_override
|
||||
|
||||
@@ -17,13 +17,8 @@ class HostServCore : public Module
|
||||
public:
|
||||
HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR)
|
||||
{
|
||||
|
||||
if (!IRCD || !IRCD->CanSetVHost)
|
||||
throw ModuleException("Your IRCd does not support vhosts");
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnNickUpdate, I_OnPreHelp,
|
||||
I_OnSetVhost, I_OnDeleteVhost };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
|
||||
@@ -39,8 +39,6 @@ class MemoServCore : public Module, public MemoServService
|
||||
MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR),
|
||||
MemoServService(this)
|
||||
{
|
||||
Implementation i[] = { I_OnNickCoreCreate, I_OnCreateChan, I_OnReload, I_OnBotDelete, I_OnNickIdentify, I_OnJoinChannel, I_OnUserAway, I_OnNickUpdate, I_OnPreHelp, I_OnPostHelp };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) anope_override
|
||||
@@ -76,7 +74,7 @@ class MemoServCore : public Module, public MemoServService
|
||||
m->text = message;
|
||||
m->unread = true;
|
||||
|
||||
FOREACH_MOD(I_OnMemoSend, OnMemoSend(source, target, mi, m));
|
||||
FOREACH_MOD(OnMemoSend, (source, target, mi, m));
|
||||
|
||||
if (ischan)
|
||||
{
|
||||
|
||||
@@ -114,10 +114,6 @@ class NickServCore : public Module, public NickServService
|
||||
public:
|
||||
NickServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), NickServService(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickIdentify, I_OnNickGroup,
|
||||
I_OnNickUpdate, I_OnUserConnect, I_OnPostUserLogoff, I_OnServerSync, I_OnUserNickChange, I_OnPreHelp, I_OnPostHelp,
|
||||
I_OnNickCoreCreate, I_OnUserQuit, I_OnExpireTick, I_OnUserLogin };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void Validate(User *u) anope_override
|
||||
@@ -285,7 +281,7 @@ class NickServCore : public Module, public NickServService
|
||||
IRCD->SendLogout(user);
|
||||
user->RemoveMode(NickServ, "REGISTERED");
|
||||
user->Logout();
|
||||
FOREACH_MOD(I_OnNickLogout, OnNickLogout(user));
|
||||
FOREACH_MOD(OnNickLogout, (user));
|
||||
}
|
||||
nc->users.clear();
|
||||
}
|
||||
@@ -510,7 +506,7 @@ class NickServCore : public Module, public NickServService
|
||||
if (na->HasExt("NO_EXPIRE"))
|
||||
expire = false;
|
||||
|
||||
FOREACH_MOD(I_OnPreNickExpire, OnPreNickExpire(na, expire));
|
||||
FOREACH_MOD(OnPreNickExpire, (na, expire));
|
||||
|
||||
if (expire)
|
||||
{
|
||||
@@ -518,7 +514,7 @@ class NickServCore : public Module, public NickServService
|
||||
if (na->nc->HasExt("SUSPENDED"))
|
||||
extra = "suspended ";
|
||||
Log(LOG_NORMAL, "expire") << "Expiring " << extra << "nickname " << na->nick << " (group: " << na->nc->display << ") (e-mail: " << (na->nc->email.empty() ? "none" : na->nc->email) << ")";
|
||||
FOREACH_MOD(I_OnNickExpire, OnNickExpire(na));
|
||||
FOREACH_MOD(OnNickExpire, (na));
|
||||
delete na;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,8 +159,6 @@ class OperServCore : public Module
|
||||
OperServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR),
|
||||
sglines(this), sqlines(this), snlines(this)
|
||||
{
|
||||
Implementation i[] = { I_OnReload, I_OnBotPrivmsg, I_OnServerQuit, I_OnUserModeSet, I_OnUserModeUnset, I_OnUserConnect, I_OnUserNickChange, I_OnPreHelp, I_OnLog };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
/* Yes, these are in this order for a reason. Most violent->least violent. */
|
||||
XLineManager::RegisterXLineManager(&sglines);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user