summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-04 16:23:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-04 16:23:06 +0000
commit02ce802257b0c1213d4c54cce4cbbd0708db6919 (patch)
treecf911da2ea9d19932995a78906f45a39424df05d /src/modules
parent2facf72164bcf6ddef3b865ee729e6918cd06fd0 (diff)
Bring back Prioritize (needs to occur after module load) with a different declaration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8499 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_auditorium.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index a686d7444..173b13311 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -55,8 +55,11 @@ class ModuleAuditorium : public Module
{
aum = new AuditoriumMode(ServerInstance);
if (!ServerInstance->AddMode(aum))
- throw ModuleException("Could not add new modes!");
+ throw ModuleException("Could not add new modes!")
OnRehash(NULL, "");
+
+ Implements eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnRehash };
+ Me->Modules->Attach(eventlist, this, sizeof(eventlist));
}
virtual ~ModuleAuditorium()
@@ -65,16 +68,15 @@ class ModuleAuditorium : public Module
DELETE(aum);
}
- virtual void OnRehash(User* user, const std::string &parameter)
+ void Prioritize()
{
- ConfigReader conf(ServerInstance);
- ShowOps = conf.ReadFlag("auditorium", "showops", 0);
+ ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, &(ServerInstance->Modules->Find("m_namesx.so")));
}
- Priority Prioritize()
+ virtual void OnRehash(User* user, const std::string &parameter)
{
- /* To ensure that we get priority over namesx for names list generation on +u channels */
- return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
+ ConfigReader conf(ServerInstance);
+ ShowOps = conf.ReadFlag("auditorium", "showops", 0);
}
virtual Version GetVersion()
@@ -82,11 +84,6 @@ class ModuleAuditorium : public Module
return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
}
- void Implements(char* List)
- {
- List[I_OnUserJoin] = List[I_OnUserPart] = List[I_OnUserKick] = List[I_OnUserQuit] = List[I_OnUserList] = List[I_OnRehash] = 1;
- }
-
virtual int OnUserList(User* user, Channel* Ptr, CUList* &nameslist)
{
if (Ptr->IsModeSet('u'))