summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_geoip.cpp2
-rw-r--r--src/modules/extra/m_ldapauth.cpp2
-rw-r--r--src/modules/extra/m_ldapoper.cpp2
-rw-r--r--src/modules/extra/m_mssql.cpp2
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_pgsql.cpp2
-rw-r--r--src/modules/extra/m_regex_posix.cpp2
-rw-r--r--src/modules/extra/m_regex_stdlib.cpp2
-rw-r--r--src/modules/extra/m_sqlite3.cpp2
-rw-r--r--src/modules/m_alias.cpp5
-rw-r--r--src/modules/m_allowinvite.cpp2
-rw-r--r--src/modules/m_auditorium.cpp2
-rw-r--r--src/modules/m_autoop.cpp2
-rw-r--r--src/modules/m_banexception.cpp2
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_blockamsg.cpp2
-rw-r--r--src/modules/m_blockcaps.cpp2
-rw-r--r--src/modules/m_blockcolor.cpp2
-rw-r--r--src/modules/m_botmode.cpp2
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_cap.cpp2
-rw-r--r--src/modules/m_cban.cpp2
-rw-r--r--src/modules/m_censor.cpp2
-rw-r--r--src/modules/m_cgiirc.cpp2
-rw-r--r--src/modules/m_chancreate.cpp2
-rw-r--r--src/modules/m_chanfilter.cpp2
-rw-r--r--src/modules/m_chanhistory.cpp2
-rw-r--r--src/modules/m_chanlog.cpp2
-rw-r--r--src/modules/m_channames.cpp2
-rw-r--r--src/modules/m_channelban.cpp2
-rw-r--r--src/modules/m_chanprotect.cpp2
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_cloaking.cpp2
-rw-r--r--src/modules/m_commonchans.cpp2
-rw-r--r--src/modules/m_conn_join.cpp2
-rw-r--r--src/modules/m_conn_waitpong.cpp2
-rw-r--r--src/modules/m_connectban.cpp2
-rw-r--r--src/modules/m_connflood.cpp2
-rw-r--r--src/modules/m_dccallow.cpp2
-rw-r--r--src/modules/m_deaf.cpp2
-rw-r--r--src/modules/m_delayjoin.cpp2
-rw-r--r--src/modules/m_delaymsg.cpp2
-rw-r--r--src/modules/m_denychans.cpp2
-rw-r--r--src/modules/m_dnsbl.cpp2
-rw-r--r--src/modules/m_exemptchanops.cpp2
-rw-r--r--src/modules/m_filter.cpp2
-rw-r--r--src/modules/m_gecosban.cpp2
-rw-r--r--src/modules/m_helpop.cpp2
-rw-r--r--src/modules/m_hidechans.cpp2
-rw-r--r--src/modules/m_hideoper.cpp2
-rw-r--r--src/modules/m_hostchange.cpp2
-rw-r--r--src/modules/m_httpd_acl.cpp2
-rw-r--r--src/modules/m_httpd_config.cpp2
-rw-r--r--src/modules/m_httpd_stats.cpp2
-rw-r--r--src/modules/m_ident.cpp2
-rw-r--r--src/modules/m_inviteexception.cpp2
-rw-r--r--src/modules/m_ircv3.cpp2
-rw-r--r--src/modules/m_joinflood.cpp2
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_kicknorejoin.cpp2
-rw-r--r--src/modules/m_lockserv.cpp2
-rw-r--r--src/modules/m_maphide.cpp2
-rw-r--r--src/modules/m_messageflood.cpp2
-rw-r--r--src/modules/m_muteban.cpp2
-rw-r--r--src/modules/m_namedmodes.cpp2
-rw-r--r--src/modules/m_namesx.cpp2
-rw-r--r--src/modules/m_nationalchars.cpp2
-rw-r--r--src/modules/m_nickflood.cpp2
-rw-r--r--src/modules/m_noctcp.cpp2
-rw-r--r--src/modules/m_nokicks.cpp2
-rw-r--r--src/modules/m_nonicks.cpp2
-rw-r--r--src/modules/m_nonotice.cpp2
-rw-r--r--src/modules/m_nopartmsg.cpp2
-rw-r--r--src/modules/m_ojoin.cpp2
-rw-r--r--src/modules/m_operchans.cpp2
-rw-r--r--src/modules/m_operjoin.cpp2
-rw-r--r--src/modules/m_operlog.cpp2
-rw-r--r--src/modules/m_opermotd.cpp2
-rw-r--r--src/modules/m_operprefix.cpp2
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_passforward.cpp2
-rw-r--r--src/modules/m_password_hash.cpp2
-rw-r--r--src/modules/m_permchannels.cpp2
-rw-r--r--src/modules/m_randquote.cpp2
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_regonlycreate.cpp2
-rw-r--r--src/modules/m_remove.cpp2
-rw-r--r--src/modules/m_restrictchans.cpp2
-rw-r--r--src/modules/m_restrictmsg.cpp2
-rw-r--r--src/modules/m_rline.cpp2
-rw-r--r--src/modules/m_sasl.cpp2
-rw-r--r--src/modules/m_securelist.cpp2
-rw-r--r--src/modules/m_seenicks.cpp2
-rw-r--r--src/modules/m_serverban.cpp2
-rw-r--r--src/modules/m_services_account.cpp2
-rw-r--r--src/modules/m_servprotect.cpp2
-rw-r--r--src/modules/m_sethost.cpp2
-rw-r--r--src/modules/m_showwhois.cpp2
-rw-r--r--src/modules/m_shun.cpp2
-rw-r--r--src/modules/m_silence.cpp2
-rw-r--r--src/modules/m_sqlauth.cpp4
-rw-r--r--src/modules/m_sqloper.cpp2
-rw-r--r--src/modules/m_sslinfo.cpp2
-rw-r--r--src/modules/m_sslmodes.cpp2
-rw-r--r--src/modules/m_stripcolor.cpp2
-rw-r--r--src/modules/m_svshold.cpp2
-rw-r--r--src/modules/m_swhois.cpp2
-rw-r--r--src/modules/m_timedbans.cpp2
-rw-r--r--src/modules/m_uhnames.cpp2
-rw-r--r--src/modules/m_userip.cpp2
-rw-r--r--src/modules/m_watch.cpp2
-rw-r--r--src/modules/m_xline_db.cpp2
-rw-r--r--src/modules/u_listmode.h2
113 files changed, 115 insertions, 116 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index f92054f9e..3dd74d8b0 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -58,7 +58,7 @@ class ModuleGeoIP : public Module
ServerInstance->Modules->AddService(ext);
Implementation eventlist[] = { I_OnSetConnectClass, I_OnStats };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 612fb79f6..5b3f1e7cc 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -124,7 +124,7 @@ public:
ServerInstance->Modules->AddService(ldapAuthed);
ServerInstance->Modules->AddService(ldapVhost);
Implementation eventlist[] = { I_OnCheckReady, I_OnRehash,I_OnUserRegister, I_OnUserConnect };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp
index e8455529d..1812a5ba4 100644
--- a/src/modules/extra/m_ldapoper.cpp
+++ b/src/modules/extra/m_ldapoper.cpp
@@ -49,7 +49,7 @@ public:
{
conn = NULL;
Implementation eventlist[] = { I_OnRehash, I_OnPassCompare };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp
index 27410e95b..598f9aac9 100644
--- a/src/modules/extra/m_mssql.cpp
+++ b/src/modules/extra/m_mssql.cpp
@@ -664,7 +664,7 @@ class ModuleMsSQL : public Module
ServerInstance->Threads->Start(queryDispatcher);
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
ServerInstance->Modules->AddService(sqlserv);
}
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 08ec93cf2..682f041ad 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -383,7 +383,7 @@ void ModuleSQL::init()
ServerInstance->Threads->Start(Dispatcher);
Implementation eventlist[] = { I_OnRehash, I_OnUnloadModule };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index ab6908d17..7751f9b82 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -513,7 +513,7 @@ class ModulePgSQL : public Module
ReadConf();
Implementation eventlist[] = { I_OnUnloadModule, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModulePgSQL()
diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp
index e3e436bd6..b3afd60c8 100644
--- a/src/modules/extra/m_regex_posix.cpp
+++ b/src/modules/extra/m_regex_posix.cpp
@@ -96,7 +96,7 @@ public:
ModuleRegexPOSIX() : ref(this) {
ServerInstance->Modules->AddService(ref);
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp
index 4942e9739..204728b65 100644
--- a/src/modules/extra/m_regex_stdlib.cpp
+++ b/src/modules/extra/m_regex_stdlib.cpp
@@ -76,7 +76,7 @@ public:
ModuleRegexStd() : ref(this) {
ServerInstance->Modules->AddService(ref);
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index c10f62bd2..7f6a53359 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -219,7 +219,7 @@ class ModuleSQLite3 : public Module
ReadConf();
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleSQLite3()
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 991d6f264..97b1612af 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -104,9 +104,8 @@ class ModuleAlias : public Module
void init()
{
ReadAliases();
- ServerInstance->Modules->Attach(I_OnPreCommand, this);
- ServerInstance->Modules->Attach(I_OnRehash, this);
- ServerInstance->Modules->Attach(I_OnUserMessage, this);
+ Implementation eventlist[] = { I_OnPreCommand, I_OnRehash, I_OnUserMessage };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleAlias()
diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp
index 7dd2efc24..a53b934a6 100644
--- a/src/modules/m_allowinvite.cpp
+++ b/src/modules/m_allowinvite.cpp
@@ -41,7 +41,7 @@ class ModuleAllowInvite : public Module
if (!ServerInstance->Modes->AddMode(&ni))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreInvite, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 6b88a5e16..c3e31c583 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -63,7 +63,7 @@ class ModuleAuditorium : public Module
I_OnUserJoin, I_OnUserPart, I_OnUserKick,
I_OnBuildNeighborList, I_OnNamesListItem, I_OnSendWhoLine,
I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 7);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleAuditorium()
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp
index e3adfdfe0..07dca6929 100644
--- a/src/modules/m_autoop.cpp
+++ b/src/modules/m_autoop.cpp
@@ -93,7 +93,7 @@ public:
mh.DoImplements(this);
Implementation list[] = { I_OnPostJoin, };
- ServerInstance->Modules->Attach(list, this, 1);
+ ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
}
void OnPostJoin(Membership *memb)
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index afa198e04..de217d2b9 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -61,7 +61,7 @@ public:
be.DoImplements(this);
Implementation list[] = { I_OnRehash, I_On005Numeric, I_OnExtBanCheck, I_OnCheckChannelBan };
- ServerInstance->Modules->Attach(list, this, 4);
+ ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
}
void On005Numeric(std::string &output)
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 421d8ade6..9a7ba0c4f 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -231,7 +231,7 @@ class ModuleBanRedirect : public Module
ServerInstance->Extensions.Register(&re.extItem);
Implementation list[] = { I_OnRehash, I_OnUserPreJoin, I_OnChannelDelete };
- ServerInstance->Modules->Attach(list, this, 3);
+ ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
}
virtual void OnChannelDelete(Channel* chan)
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index b0001574a..5f0dbcdd4 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -64,7 +64,7 @@ class ModuleBlockAmsg : public Module
this->OnRehash(NULL);
ServerInstance->Extensions.Register(&blockamsg);
Implementation eventlist[] = { I_OnRehash, I_OnPreCommand };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleBlockAmsg()
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index ca452945b..6807c1fd7 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -51,7 +51,7 @@ public:
if (!ServerInstance->Modes->AddMode(&bc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 90e3f912a..aebdf9792 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -48,7 +48,7 @@ class ModuleBlockColor : public Module
if (!ServerInstance->Modes->AddMode(&bc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index 3e7fd2fc6..949332ba5 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -45,7 +45,7 @@ class ModuleBotMode : public Module
if (!ServerInstance->Modes->AddMode(&bm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleBotMode()
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index bb0514680..6ed1f957a 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -338,7 +338,7 @@ public:
ServerInstance->Modules->AddService(cmd.extInfo);
Implementation eventlist[] = { I_OnRehash, I_OnUserPostNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage };
- ServerInstance->Modules->Attach(eventlist, this, 6);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleCallerID()
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index af53452c9..af8357cf0 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -138,7 +138,7 @@ class ModuleCAP : public Module
ServerInstance->Extensions.Register(&cmd.reghold);
Implementation eventlist[] = { I_OnCheckReady };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnCheckReady(LocalUser* user)
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index f6cdfdb88..c864f25c1 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -167,7 +167,7 @@ class ModuleCBan : public Module
ServerInstance->AddCommand(&mycommand);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnStats };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleCBan()
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 03a211ad8..50c8e22a7 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -63,7 +63,7 @@ class ModuleCensor : public Module
ServerInstance->Modules->AddService(cu);
ServerInstance->Modules->AddService(cc);
Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 08b8d3f1c..0e3e39e0e 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -233,7 +233,7 @@ public:
ServerInstance->Extensions.Register(&waiting);
Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCheckReady };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp
index 60dbed10b..997a92648 100644
--- a/src/modules/m_chancreate.cpp
+++ b/src/modules/m_chancreate.cpp
@@ -31,7 +31,7 @@ class ModuleChanCreate : public Module
{
ServerInstance->SNO->EnableSnomask('j', "CHANCREATE");
Implementation eventlist[] = { I_OnUserJoin };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion()
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 2c8995044..67ea6bde7 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -85,7 +85,7 @@ class ModuleChanFilter : public Module
cf.DoImplements(this);
Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp
index 16eba953f..8db4b2cf0 100644
--- a/src/modules/m_chanhistory.cpp
+++ b/src/modules/m_chanhistory.cpp
@@ -121,7 +121,7 @@ class ModuleChanHistory : public Module
ServerInstance->Modules->AddService(m);
Implementation eventlist[] = { I_OnPostJoin, I_OnUserMessage, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp
index 123b20164..6dbc0e7a8 100644
--- a/src/modules/m_chanlog.cpp
+++ b/src/modules/m_chanlog.cpp
@@ -35,7 +35,7 @@ class ModuleChanLog : public Module
void init()
{
Implementation eventlist[] = { I_OnRehash, I_OnSendSnotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp
index 559ec5314..e78171c4a 100644
--- a/src/modules/m_channames.cpp
+++ b/src/modules/m_channames.cpp
@@ -63,7 +63,7 @@ class ModuleChannelNames : public Module
{
ServerInstance->IsChannel = &myhandler;
Implementation eventlist[] = { I_OnRehash, I_OnUserKick };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp
index 71d4de784..6eec486ea 100644
--- a/src/modules/m_channelban.cpp
+++ b/src/modules/m_channelban.cpp
@@ -29,7 +29,7 @@ class ModuleBadChannelExtban : public Module
void init()
{
Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleBadChannelExtban()
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 85405ec25..affd0c8d6 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -255,7 +255,7 @@ class ModuleChanProtect : public Module
ServerInstance->Modules->AddService(cp);
Implementation eventlist[] = { I_OnUserPreJoin };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void LoadSettings()
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index d98e14d75..5855104de 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -100,7 +100,7 @@ class ModuleChgHost : public Module
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 61bf3f4e9..105d68833 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -164,7 +164,7 @@ class ModuleCloaking : public Module
ServerInstance->Modules->AddService(cu.ext);
Implementation eventlist[] = { I_OnRehash, I_OnCheckBan, I_OnUserConnect, I_OnChangeHost };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
/** This function takes a domain name string and returns just the last two domain parts,
diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp
index d91ab1231..d5e7d4b1c 100644
--- a/src/modules/m_commonchans.cpp
+++ b/src/modules/m_commonchans.cpp
@@ -42,7 +42,7 @@ class ModulePrivacyMode : public Module
if (!ServerInstance->Modes->AddMode(&pm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModulePrivacyMode()
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index c56d9488f..6b13ab1aa 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -30,7 +30,7 @@ class ModuleConnJoin : public Module
void init()
{
Implementation eventlist[] = { I_OnPostConnect };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void Prioritize()
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index 381beb18f..1d48220a6 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -43,7 +43,7 @@ class ModuleWaitPong : public Module
ServerInstance->Modules->AddService(ext);
OnRehash(NULL);
Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp
index 010190046..798f06fb6 100644
--- a/src/modules/m_connectban.cpp
+++ b/src/modules/m_connectban.cpp
@@ -34,7 +34,7 @@ class ModuleConnectBan : public Module
void init()
{
Implementation eventlist[] = { I_OnUserConnect, I_OnGarbageCollect, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp
index 85aa85a9b..f86b9ce52 100644
--- a/src/modules/m_connflood.cpp
+++ b/src/modules/m_connflood.cpp
@@ -43,7 +43,7 @@ public:
{
InitConf();
Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual Version GetVersion()
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 68fee4a19..26dd13bb3 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -262,7 +262,7 @@ class ModuleDCCAllow : public Module
ServerInstance->AddCommand(&cmd);
ReadFileConf();
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, I_OnUserPostNick, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index 45a53491c..31c498030 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -73,7 +73,7 @@ class ModuleDeaf : public Module
OnRehash(NULL);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index 98d50455a..49ca93788 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -52,7 +52,7 @@ class ModuleDelayJoin : public Module
if (!ServerInstance->Modes->AddMode(&djm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnBuildNeighborList, I_OnNamesListItem, I_OnText, I_OnRawMode };
- ServerInstance->Modules->Attach(eventlist, this, 7);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleDelayJoin();
Version GetVersion();
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index 63da04a63..1889f6c47 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -54,7 +54,7 @@ class ModuleDelayMsg : public Module
throw ModuleException("Could not add new modes!");
ServerInstance->Extensions.Register(&djm.jointime);
Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage};
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion();
void OnUserJoin(Membership* memb, bool sync, bool created, CUList&);
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 2b2b343a4..e774e92c8 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -30,7 +30,7 @@ class ModuleDenyChannels : public Module
void init()
{
Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 3a334ea37..0f4f4c335 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -240,7 +240,7 @@ class ModuleDNSBL : public Module
ServerInstance->Modules->AddService(nameExt);
ServerInstance->Modules->AddService(countExt);
Implementation eventlist[] = { I_OnRehash, I_OnSetUserIP, I_OnStats, I_OnSetConnectClass, I_OnCheckReady };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleDNSBL()
diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp
index c6dc2d75d..9fac8e7ad 100644
--- a/src/modules/m_exemptchanops.cpp
+++ b/src/modules/m_exemptchanops.cpp
@@ -121,7 +121,7 @@ class ModuleExemptChanOps : public Module
{
ServerInstance->Modules->AddService(eh.ec);
Implementation eventlist[] = { I_OnRehash, I_OnSyncChannel };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
ServerInstance->OnCheckExemption = &eh;
OnRehash(NULL);
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 683db179a..eb9f17b75 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -300,7 +300,7 @@ void ModuleFilter::init()
{
ServerInstance->AddCommand(&filtcommand);
Implementation eventlist[] = { I_OnPreCommand, I_OnStats, I_OnSyncNetwork, I_OnDecodeMetaData, I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 7);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_gecosban.cpp b/src/modules/m_gecosban.cpp
index 53cbf0fa4..1497c1b87 100644
--- a/src/modules/m_gecosban.cpp
+++ b/src/modules/m_gecosban.cpp
@@ -27,7 +27,7 @@ class ModuleGecosBan : public Module
void init()
{
Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleGecosBan()
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 8080599e7..92abcd76f 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -115,7 +115,7 @@ class ModuleHelpop : public Module
ServerInstance->Modules->AddService(ho);
ServerInstance->Modules->AddService(cmd);
Implementation eventlist[] = { I_OnRehash, I_OnWhois };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void ReadConfig()
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index bb67c05a6..b2497cbe0 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -44,7 +44,7 @@ class ModuleHideChans : public Module
if (!ServerInstance->Modes->AddMode(&hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index fe06ad8c6..00e7deb91 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -48,7 +48,7 @@ class ModuleHideOper : public Module
if (!ServerInstance->Modes->AddMode(&hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 68f3fdcbe..7433fccd3 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -58,7 +58,7 @@ class ModuleHostChange : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnRehash, I_OnUserConnect };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp
index e97febc6e..ba8d14063 100644
--- a/src/modules/m_httpd_acl.cpp
+++ b/src/modules/m_httpd_acl.cpp
@@ -98,7 +98,7 @@ class ModuleHTTPAccessList : public Module
{
ReadConfig();
Implementation eventlist[] = { I_OnEvent };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void BlockAccess(HTTPRequest* http, int returnval, const std::string &extraheaderkey = "", const std::string &extraheaderval="")
diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp
index e2a70dba3..62314cd7e 100644
--- a/src/modules/m_httpd_config.cpp
+++ b/src/modules/m_httpd_config.cpp
@@ -30,7 +30,7 @@ class ModuleHttpConfig : public Module
void init()
{
Implementation eventlist[] = { I_OnEvent };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
std::string Sanitize(const std::string &str)
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index ee5b213f7..077bc4f2d 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -37,7 +37,7 @@ class ModuleHttpStats : public Module
void init()
{
Implementation eventlist[] = { I_OnEvent };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
std::string Sanitize(const std::string &str)
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index b046079f0..e8f314464 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -279,7 +279,7 @@ class ModuleIdent : public Module
I_OnRehash, I_OnUserInit, I_OnCheckReady,
I_OnUserDisconnect, I_OnSetConnectClass
};
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleIdent()
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index e961c7483..67fda5637 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -62,7 +62,7 @@ public:
OnRehash(NULL);
ie.DoImplements(this);
Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void On005Numeric(std::string &output)
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp
index 166bbbea7..b0e020c63 100644
--- a/src/modules/m_ircv3.cpp
+++ b/src/modules/m_ircv3.cpp
@@ -82,7 +82,7 @@ class ModuleIRCv3 : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnUserJoin, I_OnPostJoin, I_OnSetAway, I_OnEvent, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 544995fe1..a94f7d9cf 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -206,7 +206,7 @@ class ModuleJoinFlood : public Module
throw ModuleException("Could not add new modes!");
ServerInstance->Extensions.Register(&jf.ext);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserJoin };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index f4f5c4e84..9c21b6883 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -147,7 +147,7 @@ class ModuleJumpServer : public Module
{
ServerInstance->AddCommand(&js);
Implementation eventlist[] = { I_OnUserRegister, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleJumpServer()
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index f2df9dab7..3e2d52360 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -72,7 +72,7 @@ public:
throw ModuleException("Could not add new modes!");
ServerInstance->Extensions.Register(&kr.ext);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserKick };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp
index cf25e9a92..eef767c5b 100644
--- a/src/modules/m_lockserv.cpp
+++ b/src/modules/m_lockserv.cpp
@@ -96,7 +96,7 @@ public:
ServerInstance->AddCommand(&lockcommand);
ServerInstance->AddCommand(&unlockcommand);
Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleLockserv()
diff --git a/src/modules/m_maphide.cpp b/src/modules/m_maphide.cpp
index de4c82fa4..d9e58ca48 100644
--- a/src/modules/m_maphide.cpp
+++ b/src/modules/m_maphide.cpp
@@ -28,7 +28,7 @@ class ModuleMapHide : public Module
void init()
{
Implementation eventlist[] = { I_OnPreCommand, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index a2fdc115e..27c2f88db 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -134,7 +134,7 @@ class ModuleMsgFlood : public Module
throw ModuleException("Could not add new modes!");
ServerInstance->Extensions.Register(&mf.ext);
Implementation eventlist[] = { I_OnUserPreNotice, I_OnUserPreMessage };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult ProcessMessages(User* user,Channel* dest, const std::string &text)
diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp
index c486a5868..767af2901 100644
--- a/src/modules/m_muteban.cpp
+++ b/src/modules/m_muteban.cpp
@@ -29,7 +29,7 @@ class ModuleQuietBan : public Module
void init()
{
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleQuietBan()
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp
index 024cc427c..4db1f70b9 100644
--- a/src/modules/m_namedmodes.cpp
+++ b/src/modules/m_namedmodes.cpp
@@ -112,7 +112,7 @@ class ModuleNamedModes : public Module
ServerInstance->Modules->AddService(dummyZ);
Implementation eventlist[] = { I_OnPreMode };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion()
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index 15f6d44a6..82d311773 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -36,7 +36,7 @@ class ModuleNamesX : public Module
void init()
{
Implementation eventlist[] = { I_OnPreCommand, I_OnNamesListItem, I_On005Numeric, I_OnEvent, I_OnSendWhoLine };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index c60f214e6..b43b6e2b6 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -243,7 +243,7 @@ class ModuleNationalChars : public Module
ServerInstance->IsNick = &myhandler;
Implementation eventlist[] = { I_OnRehash, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp
index fbb090620..349bf1a5d 100644
--- a/src/modules/m_nickflood.cpp
+++ b/src/modules/m_nickflood.cpp
@@ -147,7 +147,7 @@ class ModuleNickFlood : public Module
throw ModuleException("Could not add new modes!");
ServerInstance->Extensions.Register(&nf.ext);
Implementation eventlist[] = { I_OnUserPreNick, I_OnUserPostNick };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreNick(User* user, const std::string &newnick)
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index 144ac312b..cc57f9d93 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -46,7 +46,7 @@ class ModuleNoCTCP : public Module
if (!ServerInstance->Modes->AddMode(&nc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleNoCTCP()
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index e8bceffd4..a17e6eb35 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -45,7 +45,7 @@ class ModuleNoKicks : public Module
if (!ServerInstance->Modes->AddMode(&nk))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void On005Numeric(std::string &output)
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 9bcc01b59..42e133a2c 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -43,7 +43,7 @@ class ModuleNoNickChange : public Module
OnRehash(NULL);
ServerInstance->Modes->AddMode(&nn);
Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleNoNickChange()
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index 1a806d083..c1f8bca77 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -44,7 +44,7 @@ class ModuleNoNotice : public Module
if (!ServerInstance->Modes->AddMode(&nt))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp
index f061d278b..ad3413101 100644
--- a/src/modules/m_nopartmsg.cpp
+++ b/src/modules/m_nopartmsg.cpp
@@ -28,7 +28,7 @@ class ModulePartMsgBan : public Module
void init()
{
Implementation eventlist[] = { I_OnUserPart, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModulePartMsgBan()
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index 706fff1e1..8f8d3ca90 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -190,7 +190,7 @@ class ModuleOjoin : public Module
ServerInstance->Modules->AddService(mycommand);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserPreKick, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 6df55696e..ae5ea79c9 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -47,7 +47,7 @@ class ModuleOperChans : public Module
if (!ServerInstance->Modes->AddMode(&oc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric, I_OnUserPreJoin };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index c4b2d5599..bd77384a6 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -57,7 +57,7 @@ class ModuleOperjoin : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index 515fbd82b..edb9109e8 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -31,7 +31,7 @@ class ModuleOperLog : public Module
void init()
{
Implementation eventlist[] = { I_OnPreCommand, I_On005Numeric, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
ServerInstance->SNO->EnableSnomask('r', "OPERLOG");
OnRehash(NULL);
}
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 4d29b3878..56acef175 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -87,7 +87,7 @@ class ModuleOpermotd : public Module
ServerInstance->AddCommand(&cmd);
OnRehash(NULL);
Implementation eventlist[] = { I_OnRehash, I_OnOper };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual Version GetVersion()
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index c6c5037e9..b6e6b893b 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -86,7 +86,7 @@ class ModuleOperPrefixMode : public Module
ServerInstance->Modules->AddService(opm);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnPostOper, I_OnLoadModule, I_OnUnloadModule };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
/* To give clients a chance to learn about the new prefix we don't give +y to opers
* right now. That means if the module was loaded after opers have joined channels
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index caaa67acb..1d9447fc4 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -41,7 +41,7 @@ class ModuleOverride : public Module
OnRehash(NULL);
ServerInstance->SNO->EnableSnomask('v', "OVERRIDE");
Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange };
- ServerInstance->Modules->Attach(eventlist, this, 6);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp
index f46e79c0f..84389fb22 100644
--- a/src/modules/m_passforward.cpp
+++ b/src/modules/m_passforward.cpp
@@ -31,7 +31,7 @@ class ModulePassForward : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnPostConnect, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion()
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp
index 55741ee0b..5026749aa 100644
--- a/src/modules/m_password_hash.cpp
+++ b/src/modules/m_password_hash.cpp
@@ -91,7 +91,7 @@ class ModuleOperHash : public Module
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnPassCompare };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype)
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 40774e1fa..8958cdfcd 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -169,7 +169,7 @@ public:
{
ServerInstance->Modules->AddService(p);
Implementation eventlist[] = { I_OnChannelPreDelete, I_OnPostTopicChange, I_OnRawMode, I_OnRehash, I_OnBackgroundTimer };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 5fa63d8f4..f353701e1 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -77,7 +77,7 @@ class ModuleRandQuote : public Module
}
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnUserConnect };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 2af6a4a85..4c44e630c 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -130,7 +130,7 @@ class ModuleRedirect : public Module
}
Implementation eventlist[] = { I_OnUserPreJoin };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp
index 2476f520b..61f94c0bd 100644
--- a/src/modules/m_regonlycreate.cpp
+++ b/src/modules/m_regonlycreate.cpp
@@ -31,7 +31,7 @@ class ModuleRegOnlyCreate : public Module
void init()
{
Implementation eventlist[] = { I_OnUserPreJoin };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 1ba51a0eb..460004d1b 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -206,7 +206,7 @@ class ModuleRemove : public Module
ServerInstance->AddCommand(&cmd2);
OnRehash(NULL);
Implementation eventlist[] = { I_On005Numeric, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 91ad43bc2..c76b0e79f 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -45,7 +45,7 @@ class ModuleRestrictChans : public Module
{
ReadConfig();
Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp
index 9ed092746..e814f3b16 100644
--- a/src/modules/m_restrictmsg.cpp
+++ b/src/modules/m_restrictmsg.cpp
@@ -32,7 +32,7 @@ class ModuleRestrictMsg : public Module
void init()
{
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 43cd31a2d..5790a6a27 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -235,7 +235,7 @@ class ModuleRLine : public Module
ServerInstance->XLines->RegisterFactory(&f);
Implementation eventlist[] = { I_OnUserConnect, I_OnRehash, I_OnUserPostNick, I_OnStats, I_OnBackgroundTimer };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleRLine()
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index b653096b2..943f45bd3 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -249,7 +249,7 @@ class ModuleSASL : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
ServiceProvider* providelist[] = { &auth, &sasl, &authExt };
ServerInstance->Modules->AddServices(providelist, 3);
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 9645c2ba9..6013d1fd7 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -33,7 +33,7 @@ class ModuleSecureList : public Module
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleSecureList()
diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp
index 297504e05..95872b5b2 100644
--- a/src/modules/m_seenicks.cpp
+++ b/src/modules/m_seenicks.cpp
@@ -30,7 +30,7 @@ class ModuleSeeNicks : public Module
{
ServerInstance->SNO->EnableSnomask('n',"NICK");
Implementation eventlist[] = { I_OnUserPostNick };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual Version GetVersion()
diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp
index 8b2520fb6..cf77ae9ba 100644
--- a/src/modules/m_serverban.cpp
+++ b/src/modules/m_serverban.cpp
@@ -28,7 +28,7 @@ class ModuleServerBan : public Module
void init()
{
Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleServerBan()
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index a32527577..5b92c8a26 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -129,7 +129,7 @@ class ModuleServicesAccount : public Module
Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, I_OnCheckBan,
I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick, I_OnSetConnectClass };
- ServerInstance->Modules->Attach(eventlist, this, 9);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void On005Numeric(std::string &t)
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp
index 4f20ce000..4c04fb292 100644
--- a/src/modules/m_servprotect.cpp
+++ b/src/modules/m_servprotect.cpp
@@ -58,7 +58,7 @@ class ModuleServProtectMode : public Module
if (!ServerInstance->Modes->AddMode(&bm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine, I_OnRawMode, I_OnUserPreKick };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index e4662791d..7bd577924 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -84,7 +84,7 @@ class ModuleSetHost : public Module
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 9b2604473..ba4ba9e6e 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -91,7 +91,7 @@ class ModuleShowwhois : public Module
throw ModuleException("Could not add new modes!");
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnWhois };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleShowwhois()
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 10693e5f3..5e13f1090 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -191,7 +191,7 @@ class ModuleShun : public Module
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnStats, I_OnPreCommand, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 40a42c9d7..db2ab12d1 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -309,7 +309,7 @@ class ModuleSilence : public Module
ServerInstance->Extensions.Register(&cmdsilence.ext);
Implementation eventlist[] = { I_OnRehash, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage, I_OnUserPreInvite };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp
index c1da776d6..df97145be 100644
--- a/src/modules/m_sqlauth.cpp
+++ b/src/modules/m_sqlauth.cpp
@@ -87,8 +87,8 @@ class ModuleSQLAuth : public Module
{
ServerInstance->Modules->AddService(pendingExt);
OnRehash(NULL);
- Implementation eventlist[] = { I_OnUserDisconnect, I_OnCheckReady, I_OnRehash, I_OnUserRegister };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ Implementation eventlist[] = { I_OnCheckReady, I_OnRehash, I_OnUserRegister };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp
index 7620af7f3..03b626963 100644
--- a/src/modules/m_sqloper.cpp
+++ b/src/modules/m_sqloper.cpp
@@ -145,7 +145,7 @@ public:
OnRehash(NULL);
Implementation eventlist[] = { I_OnRehash, I_OnPreCommand };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void OnRehash(User* user)
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp
index 33a36d3b4..427f3f71c 100644
--- a/src/modules/m_sslinfo.cpp
+++ b/src/modules/m_sslinfo.cpp
@@ -137,7 +137,7 @@ class ModuleSSLInfo : public Module
ServerInstance->Extensions.Register(&cmd.CertExt);
Implementation eventlist[] = { I_OnWhois, I_OnPreCommand, I_OnSetConnectClass, I_OnUserConnect, I_OnPostConnect };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion()
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index fb43422fd..66a67f05a 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -90,7 +90,7 @@ class ModuleSSLModes : public Module
if (!ServerInstance->Modes->AddMode(&sslm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreJoin, I_OnCheckBan, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index b1cc54580..83ff1a5f3 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -56,7 +56,7 @@ class ModuleStripColor : public Module
ServerInstance->Modules->AddService(usc);
ServerInstance->Modules->AddService(csc);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleStripColor()
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index 377179bf0..e27adf1e1 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -172,7 +172,7 @@ class ModuleSVSHold : public Module
ServerInstance->XLines->RegisterFactory(&s);
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnUserPreNick, I_OnStats };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ModResult OnStats(char symbol, User* user, string_list &out)
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index eeb7a8d67..f581a4808 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -95,7 +95,7 @@ class ModuleSWhois : public Module
ServerInstance->AddCommand(&cmd);
ServerInstance->Modules->AddService(cmd.swhois);
Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
// :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games.
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 70027473f..5023f4c01 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -118,7 +118,7 @@ class ModuleTimedBans : public Module
{
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ModResult OnDelBan(User* source, Channel* chan, const std::string &banmask)
diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp
index e446f88e8..2cd090f97 100644
--- a/src/modules/m_uhnames.cpp
+++ b/src/modules/m_uhnames.cpp
@@ -36,7 +36,7 @@ class ModuleUHNames : public Module
void init()
{
Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
~ModuleUHNames()
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index 9e547d106..c60b2d18d 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -74,7 +74,7 @@ class ModuleUserIP : public Module
{
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index a2a458c33..28ae05286 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -389,7 +389,7 @@ class Modulewatch : public Module
ServerInstance->AddCommand(&sw);
ServerInstance->Extensions.Register(&cmdw.ext);
Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway };
- ServerInstance->Modules->Attach(eventlist, this, 7);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index f25f1d597..404bc6b02 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -35,7 +35,7 @@ class ModuleXLineDB : public Module
void init()
{
Implementation eventlist[] = { I_OnAddLine, I_OnDelLine, I_OnExpireLine };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
/* Load the configuration
* Note:
diff --git a/src/modules/u_listmode.h b/src/modules/u_listmode.h
index 3d82a0c81..b370c86e8 100644
--- a/src/modules/u_listmode.h
+++ b/src/modules/u_listmode.h
@@ -217,7 +217,7 @@ class ListModeBase : public ModeHandler
ServerInstance->Modules->AddService(extItem);
this->DoRehash();
Implementation eventlist[] = { I_OnSyncChannel, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, m, 2);
+ ServerInstance->Modules->Attach(eventlist, m, sizeof(eventlist)/sizeof(Implementation));
}
/** Handle the list mode.