X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_conn_umodes.cpp;h=0b287e5cfa144111f1212a2a28e9746b14e2ddf0;hb=1bfa48143c04504181d1b194af151fae2dac1eb1;hp=714114f04f66506bc444b391a8f691eeb1d583be;hpb=67a4a9b62355ea57a2f4521ca5fc53bd4eac3a1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp index 714114f04..0b287e5cf 100644 --- a/src/modules/m_conn_umodes.cpp +++ b/src/modules/m_conn_umodes.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -19,12 +19,14 @@ class ModuleModesOnConnect : public Module { public: ModuleModesOnConnect() { - Implementation eventlist[] = { I_OnUserConnect, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); - // for things like +x on connect, important, otherwise we have to resort to config order (bleh) -- w00t - ServerInstance->Modules->SetPriority(this, PRIORITY_FIRST); + ServerInstance->Modules->Attach(I_OnUserConnect, this); } + void Prioritize() + { + // for things like +x on connect, important, otherwise we have to resort to config order (bleh) -- w00t + ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIORITY_FIRST); + } virtual ~ModuleModesOnConnect() { @@ -35,11 +37,8 @@ class ModuleModesOnConnect : public Module return Version("Sets (and unsets) modes on users when they connect", VF_VENDOR); } - virtual void OnUserConnect(User* user) + virtual void OnUserConnect(LocalUser* user) { - if (!IS_LOCAL(user)) - return; - // Backup and zero out the disabled usermodes, so that we can override them here. char save[64]; memcpy(save, ServerInstance->Config->DisabledUModes,