summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-18 10:40:33 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-18 10:40:33 +0100
commit4fc2f7199e964ba5112ecdb2613c6fd5c2eee638 (patch)
treebf2469f00fd4dfeaa07c0ab431a9663952cf17b7 /src/modules
parent4b6f7d789333dd9fd3b08f8742a68c0f9c6c2254 (diff)
Specify which Extensible subclass an ExtensionItem is valid for
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_geoip.cpp4
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_blockamsg.cpp3
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_cap.cpp2
-rw-r--r--src/modules/m_cgiirc.cpp5
-rw-r--r--src/modules/m_cloaking.cpp2
-rw-r--r--src/modules/m_conn_join.cpp3
-rw-r--r--src/modules/m_conn_waitpong.cpp2
-rw-r--r--src/modules/m_customtitle.cpp2
-rw-r--r--src/modules/m_dccallow.cpp2
-rw-r--r--src/modules/m_delayjoin.cpp4
-rw-r--r--src/modules/m_delaymsg.cpp2
-rw-r--r--src/modules/m_dnsbl.cpp7
-rw-r--r--src/modules/m_ident.cpp3
-rw-r--r--src/modules/m_ldapauth.cpp4
-rw-r--r--src/modules/m_mlock.cpp2
-rw-r--r--src/modules/m_nicklock.cpp4
-rw-r--r--src/modules/m_repeat.cpp2
-rw-r--r--src/modules/m_sasl.cpp5
-rw-r--r--src/modules/m_services_account.cpp2
-rw-r--r--src/modules/m_silence.cpp3
-rw-r--r--src/modules/m_sqlauth.cpp4
-rw-r--r--src/modules/m_sslinfo.cpp6
-rw-r--r--src/modules/m_swhois.cpp4
-rw-r--r--src/modules/m_topiclock.cpp2
-rw-r--r--src/modules/m_watch.cpp2
27 files changed, 56 insertions, 29 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index 3561d1a5d..d21a82149 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -46,7 +46,9 @@ class ModuleGeoIP : public Module
}
public:
- ModuleGeoIP() : ext("geoip_cc", this), gi(NULL)
+ ModuleGeoIP()
+ : ext("geoip_cc", ExtensionItem::EXT_USER, this)
+ , gi(NULL)
{
}
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 9833c720d..d3490acc0 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -50,7 +50,7 @@ class BanRedirect : public ModeWatcher
BanRedirect(Module* parent)
: ModeWatcher(parent, "ban", MODETYPE_CHANNEL)
, ban(parent, "ban")
- , extItem("banredirect", parent)
+ , extItem("banredirect", ExtensionItem::EXT_CHANNEL, parent)
{
}
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index b456606a8..9614203c3 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -53,7 +53,8 @@ class ModuleBlockAmsg : public Module
SimpleExtItem<BlockedMessage> blockamsg;
public:
- ModuleBlockAmsg() : blockamsg("blockamsg", this)
+ ModuleBlockAmsg()
+ : blockamsg("blockamsg", ExtensionItem::EXT_USER, this)
{
}
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index efbf1a81b..5c6d14a90 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -69,7 +69,7 @@ class callerid_data
struct CallerIDExtInfo : public ExtensionItem
{
CallerIDExtInfo(Module* parent)
- : ExtensionItem("callerid_data", parent)
+ : ExtensionItem("callerid_data", ExtensionItem::EXT_USER, parent)
{
}
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index bc79e59ec..db5d85f0f 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -42,7 +42,7 @@ class CommandCAP : public Command
public:
LocalIntExt reghold;
CommandCAP (Module* mod) : Command(mod, "CAP", 1),
- reghold("CAP_REGHOLD", mod)
+ reghold("CAP_REGHOLD", ExtensionItem::EXT_USER, mod)
{
works_before_reg = true;
}
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 791045780..721d6ba08 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -74,7 +74,8 @@ class CommandWebirc : public Command
CGIHostlist Hosts;
CommandWebirc(Module* Creator)
: Command(Creator, "WEBIRC", 4),
- realhost("cgiirc_realhost", Creator), realip("cgiirc_realip", Creator)
+ realhost("cgiirc_realhost", ExtensionItem::EXT_USER, Creator)
+ , realip("cgiirc_realip", ExtensionItem::EXT_USER, Creator)
{
works_before_reg = true;
this->syntax = "password client hostname ip";
@@ -225,7 +226,7 @@ class ModuleCgiIRC : public Module
public:
ModuleCgiIRC()
: cmd(this)
- , waiting("cgiirc-delay", this)
+ , waiting("cgiirc-delay", ExtensionItem::EXT_USER, this)
, DNS(this, "DNS")
{
}
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index d0e7313b7..1534043ce 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -49,7 +49,7 @@ class CloakUser : public ModeHandler
CloakUser(Module* source)
: ModeHandler(source, "cloak", 'x', PARAM_NONE, MODETYPE_USER),
- ext("cloaked_host", source), debounce_ts(0), debounce_count(0)
+ ext("cloaked_host", ExtensionItem::EXT_USER, source), debounce_ts(0), debounce_count(0)
{
}
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index d5a095e7f..b22dbdf4d 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -66,7 +66,8 @@ class ModuleConnJoin : public Module
unsigned int defdelay;
public:
- ModuleConnJoin() : ext("join_timer", this)
+ ModuleConnJoin()
+ : ext("join_timer", ExtensionItem::EXT_USER, this)
{
}
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index 496b04c2d..87b6b51f2 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -32,7 +32,7 @@ class ModuleWaitPong : public Module
public:
ModuleWaitPong()
- : ext("waitpong_pingstr", this)
+ : ext("waitpong_pingstr", ExtensionItem::EXT_USER, this)
{
}
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index 3386e8cd7..67eca6dda 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -28,7 +28,7 @@ class CommandTitle : public Command
public:
StringExtItem ctitle;
CommandTitle(Module* Creator) : Command(Creator,"TITLE", 2),
- ctitle("ctitle", Creator)
+ ctitle("ctitle", ExtensionItem::EXT_USER, Creator)
{
syntax = "<user> <password>";
}
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 7627ba8c7..2b8d1306c 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -257,7 +257,7 @@ class ModuleDCCAllow : public Module
public:
ModuleDCCAllow()
- : ext("dccallow", this)
+ : ext("dccallow", ExtensionItem::EXT_USER, this)
, cmd(this, ext)
{
}
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index 7e800572e..e864a8289 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -39,7 +39,9 @@ class ModuleDelayJoin : public Module
DelayJoinMode djm;
public:
LocalIntExt unjoined;
- ModuleDelayJoin() : djm(this), unjoined("delayjoin", this)
+ ModuleDelayJoin()
+ : djm(this)
+ , unjoined("delayjoin", ExtensionItem::EXT_MEMBERSHIP, this)
{
}
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index 32a0ba96e..f64297e15 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -25,7 +25,7 @@ class DelayMsgMode : public ParamMode<DelayMsgMode, LocalIntExt>
LocalIntExt jointime;
DelayMsgMode(Module* Parent)
: ParamMode<DelayMsgMode, LocalIntExt>(Parent, "delaymsg", 'd')
- , jointime("delaymsg", Parent)
+ , jointime("delaymsg", ExtensionItem::EXT_MEMBERSHIP, Parent)
{
levelrequired = OP_VALUE;
}
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 63dda547f..7b38da4bf 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -236,7 +236,12 @@ class ModuleDNSBL : public Module
return DNSBLConfEntry::I_UNKNOWN;
}
public:
- ModuleDNSBL() : DNS(this, "DNS"), nameExt("dnsbl_match", this), countExt("dnsbl_pending", this) { }
+ ModuleDNSBL()
+ : DNS(this, "DNS")
+ , nameExt("dnsbl_match", ExtensionItem::EXT_USER, this)
+ , countExt("dnsbl_pending", ExtensionItem::EXT_USER, this)
+ {
+ }
Version GetVersion() CXX11_OVERRIDE
{
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 3e87b8c5a..959e58a47 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -277,7 +277,8 @@ class ModuleIdent : public Module
bool NoLookupPrefix;
SimpleExtItem<IdentRequestSocket, stdalgo::culldeleter> ext;
public:
- ModuleIdent() : ext("ident_socket", this)
+ ModuleIdent()
+ : ext("ident_socket", ExtensionItem::EXT_USER, this)
{
}
diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp
index eee357ec0..804f6b821 100644
--- a/src/modules/m_ldapauth.cpp
+++ b/src/modules/m_ldapauth.cpp
@@ -307,8 +307,8 @@ class ModuleLDAPAuth : public Module
public:
ModuleLDAPAuth()
: LDAP(this, "LDAP")
- , ldapAuthed("ldapauth", this)
- , ldapVhost("ldapauth_vhost", this)
+ , ldapAuthed("ldapauth", ExtensionItem::EXT_USER, this)
+ , ldapVhost("ldapauth_vhost", ExtensionItem::EXT_USER, this)
{
me = this;
authed = &ldapAuthed;
diff --git a/src/modules/m_mlock.cpp b/src/modules/m_mlock.cpp
index d9c43ec10..9b0fa8dab 100644
--- a/src/modules/m_mlock.cpp
+++ b/src/modules/m_mlock.cpp
@@ -25,7 +25,7 @@ class ModuleMLock : public Module
public:
ModuleMLock()
- : mlock("mlock", this)
+ : mlock("mlock", ExtensionItem::EXT_CHANNEL, this)
{
}
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 9bf16498a..8ac2e8b47 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -144,7 +144,9 @@ class ModuleNickLock : public Module
CommandNickunlock cmd2;
public:
ModuleNickLock()
- : locked("nick_locked", this), cmd1(this, locked), cmd2(this, locked)
+ : locked("nick_locked", ExtensionItem::EXT_USER, this)
+ , cmd1(this, locked)
+ , cmd2(this, locked)
{
}
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp
index ca6955040..820ef702f 100644
--- a/src/modules/m_repeat.cpp
+++ b/src/modules/m_repeat.cpp
@@ -122,7 +122,7 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
RepeatMode(Module* Creator)
: ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >(Creator, "repeat", 'E')
- , MemberInfoExt("repeat_memb", Creator)
+ , MemberInfoExt("repeat_memb", ExtensionItem::EXT_MEMBERSHIP, Creator)
{
}
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 074362651..0a2c840bd 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -249,7 +249,10 @@ class ModuleSASL : public Module
public:
ModuleSASL()
- : authExt("sasl_auth", this), cap(this, "sasl"), auth(this, authExt, cap), sasl(this, authExt)
+ : authExt("sasl_auth", ExtensionItem::EXT_USER, this)
+ , cap(this, "sasl")
+ , auth(this, authExt, cap)
+ , sasl(this, authExt)
{
}
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 9630128e0..b778c16ed 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -106,7 +106,7 @@ class AccountExtItemImpl : public AccountExtItem
{
public:
AccountExtItemImpl(Module* mod)
- : AccountExtItem("accountname", mod)
+ : AccountExtItem("accountname", ExtensionItem::EXT_USER, mod)
{
}
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 22de0ac8b..91822b4e4 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -106,7 +106,8 @@ class CommandSilence : public Command
public:
SimpleExtItem<silencelist> ext;
CommandSilence(Module* Creator, unsigned int &max) : Command(Creator, "SILENCE", 0),
- maxsilence(max), ext("silence_list", Creator)
+ maxsilence(max)
+ , ext("silence_list", ExtensionItem::EXT_USER, Creator)
{
allow_empty_last_param = false;
syntax = "{[+|-]<mask> <p|c|i|n|t|a|x>}";
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp
index 8a0b80ce1..1a5b68dd9 100644
--- a/src/modules/m_sqlauth.cpp
+++ b/src/modules/m_sqlauth.cpp
@@ -78,7 +78,9 @@ class ModuleSQLAuth : public Module
bool verbose;
public:
- ModuleSQLAuth() : pendingExt("sqlauth-wait", this), SQL(this, "SQL")
+ ModuleSQLAuth()
+ : pendingExt("sqlauth-wait", ExtensionItem::EXT_USER, this)
+ , SQL(this, "SQL")
{
}
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp
index c354e4e0e..f861f1236 100644
--- a/src/modules/m_sslinfo.cpp
+++ b/src/modules/m_sslinfo.cpp
@@ -22,7 +22,11 @@
class SSLCertExt : public ExtensionItem {
public:
- SSLCertExt(Module* parent) : ExtensionItem("ssl_cert", parent) {}
+ SSLCertExt(Module* parent)
+ : ExtensionItem("ssl_cert", ExtensionItem::EXT_USER, parent)
+ {
+ }
+
ssl_cert* get(const Extensible* item) const
{
return static_cast<ssl_cert*>(get_raw(item));
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 4eb2a9cda..81abde6f7 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -31,7 +31,9 @@ class CommandSwhois : public Command
{
public:
StringExtItem swhois;
- CommandSwhois(Module* Creator) : Command(Creator,"SWHOIS", 2,2), swhois("swhois", Creator)
+ CommandSwhois(Module* Creator)
+ : Command(Creator, "SWHOIS", 2, 2)
+ , swhois("swhois", ExtensionItem::EXT_USER, Creator)
{
flags_needed = 'o'; syntax = "<nick> :<swhois>";
TRANSLATE2(TR_NICK, TR_TEXT);
diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp
index 42ed6e4c1..6053bc849 100644
--- a/src/modules/m_topiclock.cpp
+++ b/src/modules/m_topiclock.cpp
@@ -90,7 +90,7 @@ class FlagExtItem : public ExtensionItem
{
public:
FlagExtItem(const std::string& key, Module* owner)
- : ExtensionItem(key, owner)
+ : ExtensionItem(key, ExtensionItem::EXT_CHANNEL, owner)
{
}
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 9cb31a6d8..d0e42af6f 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -247,7 +247,7 @@ class CommandWatch : public Command
return CMD_SUCCESS;
}
- CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", parent)
+ CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", ExtensionItem::EXT_USER, parent)
{
syntax = "[C|L|S]|[+|-<nick>]";
}