djm = new DelayJoinMode(ServerInstance, this);
if (!ServerInstance->AddMode(djm))
throw ModuleException("Could not add new modes!");
+ Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnText };
+ ServerInstance->Modules->Attach(eventlist, this, 6);
}
virtual ~ModuleDelayJoin()
DELETE(djm);
}
- Priority Prioritize()
+ void Prioritize()
{
- /* To ensure that we get priority over namesx for names list generation on +u channels */
- return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
+ /* To ensure that we get priority over namesx for names list generation */
+ Module* namesx = ServerInstance->Modules->Find("m_namesx.so");
+ ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, &namesx);
}
virtual Version GetVersion()
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
- /* User only appears to vanish for non-opers */
+ /* User doesnt get a JOIN sent to themselves */
+ if (user == i->first)
+ continue;
+
+ /* Users with a visibility state that hides them dont appear */
if (user->Visibility && !user->Visibility->VisibleTo(i->first))
continue;