* ---------------------------------------------------
*/
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
#include "inspircd.h"
/* $ModDesc: Allows for auditorium channels (+u) where nobody can see others joining and parting or the nick list */
CUList except_list;
public:
ModuleAuditorium(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
aum = new AuditoriumMode(ServerInstance);
if (!ServerInstance->AddMode(aum, 'u'))
Priority Prioritize()
{
/* To ensure that we get priority over namesx for names list generation on +u channels */
- return (Priority)ServerInstance->PriorityBefore("m_namesx.so");
+ return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
}
virtual Version GetVersion()
/* Show all the opped users */
nl = *(Ptr->GetOppedUsers());
- nl[user] = user;
+ nl[user] = user->nick;
nameslist = &nl;
return 0;
}
else
{
/* HELLOOO, IS ANYBODY THERE? -- nope, just us. */
- user->WriteServ("353 %s = %s :%s", user->nick, Ptr->name, user->nick);
+ user->WriteServ("353 %s %c %s :%s", user->nick, Ptr->IsModeSet('s') ? '@' : Ptr->IsModeSet('p') ? '*' : '=', Ptr->name, user->nick);
user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, Ptr->name);
return 1;
}
}
};
-class ModuleAuditoriumFactory : public ModuleFactory
-{
- public:
- ModuleAuditoriumFactory()
- {
- }
-
- ~ModuleAuditoriumFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleAuditorium(Me);
- }
-
-};
-
-extern "C" void * init_module( void )
-{
- return new ModuleAuditoriumFactory;
-}
-
+MODULE_INIT(ModuleAuditorium)