summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 00:15:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 00:15:07 +0000
commit66098d307c036997e51eaea21724615e27fdc3e9 (patch)
treec2e41b2e2f86efdfca62545c4e61ebae3ed38fe5
parentd0b4bb3811458aa335857514e4cbb95d5c84f433 (diff)
(Bigger than it looks, i did this with perl inplace edit) -- commands now take an InspIRCd* param to their constructor, so that you can do stuff within them without an extern
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4862 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/commands/cmd_admin.h2
-rw-r--r--include/commands/cmd_away.h2
-rw-r--r--include/commands/cmd_commands.h2
-rw-r--r--include/commands/cmd_connect.h2
-rw-r--r--include/commands/cmd_die.h2
-rw-r--r--include/commands/cmd_eline.h2
-rw-r--r--include/commands/cmd_gline.h2
-rw-r--r--include/commands/cmd_info.h2
-rw-r--r--include/commands/cmd_invite.h2
-rw-r--r--include/commands/cmd_ison.h2
-rw-r--r--include/commands/cmd_join.h2
-rw-r--r--include/commands/cmd_kick.h2
-rw-r--r--include/commands/cmd_kill.h2
-rw-r--r--include/commands/cmd_kline.h2
-rw-r--r--include/commands/cmd_links.h2
-rw-r--r--include/commands/cmd_list.h2
-rw-r--r--include/commands/cmd_loadmodule.h2
-rw-r--r--include/commands/cmd_lusers.h2
-rw-r--r--include/commands/cmd_map.h2
-rw-r--r--include/commands/cmd_modules.h2
-rw-r--r--include/commands/cmd_motd.h2
-rw-r--r--include/commands/cmd_names.h2
-rw-r--r--include/commands/cmd_nick.h2
-rw-r--r--include/commands/cmd_notice.h2
-rw-r--r--include/commands/cmd_oper.h2
-rw-r--r--include/commands/cmd_part.h2
-rw-r--r--include/commands/cmd_pass.h2
-rw-r--r--include/commands/cmd_ping.h2
-rw-r--r--include/commands/cmd_pong.h2
-rw-r--r--include/commands/cmd_privmsg.h2
-rw-r--r--include/commands/cmd_qline.h2
-rw-r--r--include/commands/cmd_quit.h2
-rw-r--r--include/commands/cmd_rehash.h2
-rw-r--r--include/commands/cmd_restart.h2
-rw-r--r--include/commands/cmd_rules.h2
-rw-r--r--include/commands/cmd_server.h2
-rw-r--r--include/commands/cmd_squit.h2
-rw-r--r--include/commands/cmd_stats.h2
-rw-r--r--include/commands/cmd_summon.h2
-rw-r--r--include/commands/cmd_time.h2
-rw-r--r--include/commands/cmd_topic.h2
-rw-r--r--include/commands/cmd_trace.h2
-rw-r--r--include/commands/cmd_unloadmodule.h2
-rw-r--r--include/commands/cmd_user.h2
-rw-r--r--include/commands/cmd_userhost.h2
-rw-r--r--include/commands/cmd_users.h2
-rw-r--r--include/commands/cmd_version.h2
-rw-r--r--include/commands/cmd_wallops.h2
-rw-r--r--include/commands/cmd_who.h2
-rw-r--r--include/commands/cmd_whois.h2
-rw-r--r--include/commands/cmd_whowas.h2
-rw-r--r--include/commands/cmd_zline.h2
-rw-r--r--include/ctables.h5
-rw-r--r--include/mode.h2
-rw-r--r--src/command_parse.cpp107
-rw-r--r--src/modules/m_cban.cpp5
-rw-r--r--src/modules/m_check.cpp4
-rw-r--r--src/modules/m_chghost.cpp4
-rw-r--r--src/modules/m_chgident.cpp4
-rw-r--r--src/modules/m_devoice.cpp4
-rw-r--r--src/modules/m_globalload.cpp8
-rw-r--r--src/modules/m_globops.cpp4
-rw-r--r--src/modules/m_helpop.cpp4
-rw-r--r--src/modules/m_knock.cpp4
-rw-r--r--src/modules/m_nicklock.cpp8
-rw-r--r--src/modules/m_opermd5.cpp4
-rw-r--r--src/modules/m_opermotd.cpp4
-rw-r--r--src/modules/m_opersha256.cpp4
-rw-r--r--src/modules/m_park.cpp12
-rw-r--r--src/modules/m_randquote.cpp4
-rw-r--r--src/modules/m_remove.cpp8
-rw-r--r--src/modules/m_sajoin.cpp4
-rw-r--r--src/modules/m_samode.cpp4
-rw-r--r--src/modules/m_sanick.cpp4
-rw-r--r--src/modules/m_sapart.cpp4
-rw-r--r--src/modules/m_saquit.cpp4
-rw-r--r--src/modules/m_sethost.cpp4
-rw-r--r--src/modules/m_setident.cpp4
-rw-r--r--src/modules/m_setidle.cpp4
-rw-r--r--src/modules/m_setname.cpp4
-rw-r--r--src/modules/m_silence.cpp4
-rw-r--r--src/modules/m_spanningtree.cpp4
-rw-r--r--src/modules/m_spy.cpp8
-rw-r--r--src/modules/m_swhois.cpp4
-rw-r--r--src/modules/m_testcommand.cpp4
-rw-r--r--src/modules/m_timedbans.cpp4
-rw-r--r--src/modules/m_tline.cpp4
-rw-r--r--src/modules/m_uninvite.cpp4
-rw-r--r--src/modules/m_userip.cpp4
-rw-r--r--src/modules/m_vhost.cpp4
-rw-r--r--src/modules/m_watch.cpp4
91 files changed, 194 insertions, 193 deletions
diff --git a/include/commands/cmd_admin.h b/include/commands/cmd_admin.h
index e3972c398..310819d1b 100644
--- a/include/commands/cmd_admin.h
+++ b/include/commands/cmd_admin.h
@@ -24,7 +24,7 @@
class cmd_admin : public command_t
{
public:
- cmd_admin () : command_t("ADMIN",0,0) { syntax = "[<servername>]"; }
+ cmd_admin (InspIRCd* Instance) : command_t(Instance,"ADMIN",0,0) { syntax = "[<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_away.h b/include/commands/cmd_away.h
index 92a51e549..52257bab1 100644
--- a/include/commands/cmd_away.h
+++ b/include/commands/cmd_away.h
@@ -31,7 +31,7 @@
class cmd_away : public command_t
{
public:
- cmd_away () : command_t("AWAY",0,0) { syntax = "[<message>]"; }
+ cmd_away (InspIRCd* Instance) : command_t(Instance,"AWAY",0,0) { syntax = "[<message>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_commands.h b/include/commands/cmd_commands.h
index 17b72f07b..031dec606 100644
--- a/include/commands/cmd_commands.h
+++ b/include/commands/cmd_commands.h
@@ -31,7 +31,7 @@
class cmd_commands : public command_t
{
public:
- cmd_commands () : command_t("COMMANDS",0,0) { }
+ cmd_commands (InspIRCd* Instance) : command_t(Instance,"COMMANDS",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_connect.h b/include/commands/cmd_connect.h
index 40fd8b752..68da0d231 100644
--- a/include/commands/cmd_connect.h
+++ b/include/commands/cmd_connect.h
@@ -24,7 +24,7 @@
class cmd_connect : public command_t
{
public:
- cmd_connect () : command_t("CONNECT",'o',1) { syntax = "<servername> [<remote-server>]"; }
+ cmd_connect (InspIRCd* Instance) : command_t(Instance,"CONNECT",'o',1) { syntax = "<servername> [<remote-server>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_die.h b/include/commands/cmd_die.h
index ef4555670..cd05c480e 100644
--- a/include/commands/cmd_die.h
+++ b/include/commands/cmd_die.h
@@ -31,7 +31,7 @@
class cmd_die : public command_t
{
public:
- cmd_die () : command_t("DIE",'o',1) { syntax = "<password>"; }
+ cmd_die (InspIRCd* Instance) : command_t(Instance,"DIE",'o',1) { syntax = "<password>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_eline.h b/include/commands/cmd_eline.h
index 85a1da47c..23cba4964 100644
--- a/include/commands/cmd_eline.h
+++ b/include/commands/cmd_eline.h
@@ -31,7 +31,7 @@
class cmd_eline : public command_t
{
public:
- cmd_eline () : command_t("ELINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
+ cmd_eline (InspIRCd* Instance) : command_t(Instance,"ELINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_gline.h b/include/commands/cmd_gline.h
index 79552a274..622661e87 100644
--- a/include/commands/cmd_gline.h
+++ b/include/commands/cmd_gline.h
@@ -31,7 +31,7 @@
class cmd_gline : public command_t
{
public:
- cmd_gline () : command_t("GLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
+ cmd_gline (InspIRCd* Instance) : command_t(Instance,"GLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_info.h b/include/commands/cmd_info.h
index 1b48f80b8..bcf12c146 100644
--- a/include/commands/cmd_info.h
+++ b/include/commands/cmd_info.h
@@ -31,7 +31,7 @@
class cmd_info : public command_t
{
public:
- cmd_info () : command_t("INFO",0,0) { syntax = "[<servermask>]"; }
+ cmd_info (InspIRCd* Instance) : command_t(Instance,"INFO",0,0) { syntax = "[<servermask>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_invite.h b/include/commands/cmd_invite.h
index b6c78c13c..88a0f180b 100644
--- a/include/commands/cmd_invite.h
+++ b/include/commands/cmd_invite.h
@@ -31,7 +31,7 @@
class cmd_invite : public command_t
{
public:
- cmd_invite () : command_t("INVITE",0,0) { syntax = "[<nick> <channel>]"; }
+ cmd_invite (InspIRCd* Instance) : command_t(Instance,"INVITE",0,0) { syntax = "[<nick> <channel>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_ison.h b/include/commands/cmd_ison.h
index e45c61e8d..0bc5da408 100644
--- a/include/commands/cmd_ison.h
+++ b/include/commands/cmd_ison.h
@@ -31,7 +31,7 @@
class cmd_ison : public command_t
{
public:
- cmd_ison () : command_t("ISON",0,0) { syntax = "<nick> {nick}"; }
+ cmd_ison (InspIRCd* Instance) : command_t(Instance,"ISON",0,0) { syntax = "<nick> {nick}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_join.h b/include/commands/cmd_join.h
index 58863bb4c..4ead0e80e 100644
--- a/include/commands/cmd_join.h
+++ b/include/commands/cmd_join.h
@@ -31,7 +31,7 @@
class cmd_join : public command_t
{
public:
- cmd_join () : command_t("JOIN",0,1) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; }
+ cmd_join (InspIRCd* Instance) : command_t(Instance,"JOIN",0,1) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_kick.h b/include/commands/cmd_kick.h
index 097636965..e57f9f78c 100644
--- a/include/commands/cmd_kick.h
+++ b/include/commands/cmd_kick.h
@@ -31,7 +31,7 @@
class cmd_kick : public command_t
{
public:
- cmd_kick () : command_t("KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; }
+ cmd_kick (InspIRCd* Instance) : command_t(Instance,"KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_kill.h b/include/commands/cmd_kill.h
index 8f7a40141..0bf7517f6 100644
--- a/include/commands/cmd_kill.h
+++ b/include/commands/cmd_kill.h
@@ -31,7 +31,7 @@
class cmd_kill : public command_t
{
public:
- cmd_kill () : command_t("KILL",'o',2) { syntax = "<nickname> <reason>"; }
+ cmd_kill (InspIRCd* Instance) : command_t(Instance,"KILL",'o',2) { syntax = "<nickname> <reason>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_kline.h b/include/commands/cmd_kline.h
index de8a26779..86521484a 100644
--- a/include/commands/cmd_kline.h
+++ b/include/commands/cmd_kline.h
@@ -31,7 +31,7 @@
class cmd_kline : public command_t
{
public:
- cmd_kline () : command_t("KLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
+ cmd_kline (InspIRCd* Instance) : command_t(Instance,"KLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_links.h b/include/commands/cmd_links.h
index ef465fe37..284728aee 100644
--- a/include/commands/cmd_links.h
+++ b/include/commands/cmd_links.h
@@ -31,7 +31,7 @@
class cmd_links : public command_t
{
public:
- cmd_links () : command_t("LINKS",0,0) { }
+ cmd_links (InspIRCd* Instance) : command_t(Instance,"LINKS",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_list.h b/include/commands/cmd_list.h
index 29e61d17a..af7d6d774 100644
--- a/include/commands/cmd_list.h
+++ b/include/commands/cmd_list.h
@@ -31,7 +31,7 @@
class cmd_list : public command_t
{
public:
- cmd_list () : command_t("LIST",0,0) { }
+ cmd_list (InspIRCd* Instance) : command_t(Instance,"LIST",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_loadmodule.h b/include/commands/cmd_loadmodule.h
index 0aa7d566b..4e86058ce 100644
--- a/include/commands/cmd_loadmodule.h
+++ b/include/commands/cmd_loadmodule.h
@@ -31,7 +31,7 @@
class cmd_loadmodule : public command_t
{
public:
- cmd_loadmodule () : command_t("LOADMODULE",'o',1) { syntax = "<modulename>"; }
+ cmd_loadmodule (InspIRCd* Instance) : command_t(Instance,"LOADMODULE",'o',1) { syntax = "<modulename>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_lusers.h b/include/commands/cmd_lusers.h
index 156635af0..3600cb8e9 100644
--- a/include/commands/cmd_lusers.h
+++ b/include/commands/cmd_lusers.h
@@ -31,7 +31,7 @@
class cmd_lusers : public command_t
{
public:
- cmd_lusers () : command_t("LUSERS",0,0) { }
+ cmd_lusers (InspIRCd* Instance) : command_t(Instance,"LUSERS",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_map.h b/include/commands/cmd_map.h
index c560198df..c472bada4 100644
--- a/include/commands/cmd_map.h
+++ b/include/commands/cmd_map.h
@@ -31,7 +31,7 @@
class cmd_map : public command_t
{
public:
- cmd_map () : command_t("MAP",0,0) { }
+ cmd_map (InspIRCd* Instance) : command_t(Instance,"MAP",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_modules.h b/include/commands/cmd_modules.h
index eb8b1c882..75b24d108 100644
--- a/include/commands/cmd_modules.h
+++ b/include/commands/cmd_modules.h
@@ -31,7 +31,7 @@
class cmd_modules : public command_t
{
public:
- cmd_modules () : command_t("MODULES",0,0) { syntax = "[debug]"; }
+ cmd_modules (InspIRCd* Instance) : command_t(Instance,"MODULES",0,0) { syntax = "[debug]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_motd.h b/include/commands/cmd_motd.h
index c3401b127..9389ea61e 100644
--- a/include/commands/cmd_motd.h
+++ b/include/commands/cmd_motd.h
@@ -31,7 +31,7 @@
class cmd_motd : public command_t
{
public:
- cmd_motd () : command_t("MOTD",0,0) { syntax = "[<servername>]"; }
+ cmd_motd (InspIRCd* Instance) : command_t(Instance,"MOTD",0,0) { syntax = "[<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_names.h b/include/commands/cmd_names.h
index fdcf2ea40..1ec8e811c 100644
--- a/include/commands/cmd_names.h
+++ b/include/commands/cmd_names.h
@@ -31,7 +31,7 @@
class cmd_names : public command_t
{
public:
- cmd_names () : command_t("NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; }
+ cmd_names (InspIRCd* Instance) : command_t(Instance,"NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_nick.h b/include/commands/cmd_nick.h
index a90930558..ee9195f0b 100644
--- a/include/commands/cmd_nick.h
+++ b/include/commands/cmd_nick.h
@@ -31,7 +31,7 @@
class cmd_nick : public command_t
{
public:
- cmd_nick () : command_t("NICK",0,1) { syntax = "<newnick>"; }
+ cmd_nick (InspIRCd* Instance) : command_t(Instance,"NICK",0,1) { syntax = "<newnick>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_notice.h b/include/commands/cmd_notice.h
index e91c65bb1..19fbc3365 100644
--- a/include/commands/cmd_notice.h
+++ b/include/commands/cmd_notice.h
@@ -31,7 +31,7 @@
class cmd_notice : public command_t
{
public:
- cmd_notice () : command_t("NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; }
+ cmd_notice (InspIRCd* Instance) : command_t(Instance,"NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_oper.h b/include/commands/cmd_oper.h
index 40bab6b06..afb10e3cb 100644
--- a/include/commands/cmd_oper.h
+++ b/include/commands/cmd_oper.h
@@ -33,7 +33,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist);
class cmd_oper : public command_t
{
public:
- cmd_oper () : command_t("OPER",0,2) { syntax = "<username> <password>"; }
+ cmd_oper (InspIRCd* Instance) : command_t(Instance,"OPER",0,2) { syntax = "<username> <password>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_part.h b/include/commands/cmd_part.h
index 1aaa7bca6..59af15a87 100644
--- a/include/commands/cmd_part.h
+++ b/include/commands/cmd_part.h
@@ -31,7 +31,7 @@
class cmd_part : public command_t
{
public:
- cmd_part () : command_t("PART",0,1) { syntax = "<channel>{,<channel>} [<reason>]"; }
+ cmd_part (InspIRCd* Instance) : command_t(Instance,"PART",0,1) { syntax = "<channel>{,<channel>} [<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_pass.h b/include/commands/cmd_pass.h
index f2399f57c..412710a2b 100644
--- a/include/commands/cmd_pass.h
+++ b/include/commands/cmd_pass.h
@@ -31,7 +31,7 @@
class cmd_pass : public command_t
{
public:
- cmd_pass () : command_t("PASS",0,1) { syntax = "<password>"; }
+ cmd_pass (InspIRCd* Instance) : command_t(Instance,"PASS",0,1) { syntax = "<password>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_ping.h b/include/commands/cmd_ping.h
index c131af628..7afabc816 100644
--- a/include/commands/cmd_ping.h
+++ b/include/commands/cmd_ping.h
@@ -31,7 +31,7 @@
class cmd_ping : public command_t
{
public:
- cmd_ping () : command_t("PING",0,1) { syntax = "<servername> [:<servername>]"; }
+ cmd_ping (InspIRCd* Instance) : command_t(Instance,"PING",0,1) { syntax = "<servername> [:<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_pong.h b/include/commands/cmd_pong.h
index 9d2006e0f..2857f0b86 100644
--- a/include/commands/cmd_pong.h
+++ b/include/commands/cmd_pong.h
@@ -31,7 +31,7 @@
class cmd_pong : public command_t
{
public:
- cmd_pong () : command_t("PONG",0,1) { syntax = "<ping-text>"; }
+ cmd_pong (InspIRCd* Instance) : command_t(Instance,"PONG",0,1) { syntax = "<ping-text>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_privmsg.h b/include/commands/cmd_privmsg.h
index 12b11cb22..8ed0bbe8d 100644
--- a/include/commands/cmd_privmsg.h
+++ b/include/commands/cmd_privmsg.h
@@ -31,7 +31,7 @@
class cmd_privmsg : public command_t
{
public:
- cmd_privmsg () : command_t("PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; }
+ cmd_privmsg (InspIRCd* Instance) : command_t(Instance,"PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_qline.h b/include/commands/cmd_qline.h
index 65232ee28..365561929 100644
--- a/include/commands/cmd_qline.h
+++ b/include/commands/cmd_qline.h
@@ -31,7 +31,7 @@
class cmd_qline : public command_t
{
public:
- cmd_qline () : command_t("QLINE",'o',1) { syntax = "<nick> [<duration> :<reason>]"; }
+ cmd_qline (InspIRCd* Instance) : command_t(Instance,"QLINE",'o',1) { syntax = "<nick> [<duration> :<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_quit.h b/include/commands/cmd_quit.h
index 891b2f0a3..937836e81 100644
--- a/include/commands/cmd_quit.h
+++ b/include/commands/cmd_quit.h
@@ -31,7 +31,7 @@
class cmd_quit : public command_t
{
public:
- cmd_quit () : command_t("QUIT",0,0) { syntax = "[<message>]"; }
+ cmd_quit (InspIRCd* Instance) : command_t(Instance,"QUIT",0,0) { syntax = "[<message>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_rehash.h b/include/commands/cmd_rehash.h
index f9690a3ee..cb2d2e666 100644
--- a/include/commands/cmd_rehash.h
+++ b/include/commands/cmd_rehash.h
@@ -31,7 +31,7 @@
class cmd_rehash : public command_t
{
public:
- cmd_rehash () : command_t("REHASH",'o',0) { syntax = "[<servermask>]"; }
+ cmd_rehash (InspIRCd* Instance) : command_t(Instance,"REHASH",'o',0) { syntax = "[<servermask>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_restart.h b/include/commands/cmd_restart.h
index 394cf0df2..6d7e82f23 100644
--- a/include/commands/cmd_restart.h
+++ b/include/commands/cmd_restart.h
@@ -31,7 +31,7 @@
class cmd_restart : public command_t
{
public:
- cmd_restart () : command_t("RESTART",'o',1) { syntax = "<password>"; }
+ cmd_restart (InspIRCd* Instance) : command_t(Instance,"RESTART",'o',1) { syntax = "<password>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_rules.h b/include/commands/cmd_rules.h
index 36ccda645..ae6bc86c7 100644
--- a/include/commands/cmd_rules.h
+++ b/include/commands/cmd_rules.h
@@ -31,7 +31,7 @@
class cmd_rules : public command_t
{
public:
- cmd_rules () : command_t("RULES",0,0) { syntax = "[<servername>]"; }
+ cmd_rules (InspIRCd* Instance) : command_t(Instance,"RULES",0,0) { syntax = "[<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_server.h b/include/commands/cmd_server.h
index 05e1d57d0..548c361a8 100644
--- a/include/commands/cmd_server.h
+++ b/include/commands/cmd_server.h
@@ -31,7 +31,7 @@
class cmd_server : public command_t
{
public:
- cmd_server () : command_t("SERVER",0,0) { }
+ cmd_server (InspIRCd* Instance) : command_t(Instance,"SERVER",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_squit.h b/include/commands/cmd_squit.h
index d22ee9264..11da3d832 100644
--- a/include/commands/cmd_squit.h
+++ b/include/commands/cmd_squit.h
@@ -31,7 +31,7 @@
class cmd_squit : public command_t
{
public:
- cmd_squit () : command_t("SQUIT",'o',1) { syntax = "<servername> [<reason>]"; }
+ cmd_squit (InspIRCd* Instance) : command_t(Instance,"SQUIT",'o',1) { syntax = "<servername> [<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_stats.h b/include/commands/cmd_stats.h
index 8f98ad599..7e4cf905a 100644
--- a/include/commands/cmd_stats.h
+++ b/include/commands/cmd_stats.h
@@ -33,7 +33,7 @@ void DoStats(char statschar, userrec* user, string_list &results);
class cmd_stats : public command_t
{
public:
- cmd_stats () : command_t("STATS",0,1) { syntax = "[<servername>] <stats-symbol>"; }
+ cmd_stats (InspIRCd* Instance) : command_t(Instance,"STATS",0,1) { syntax = "[<servername>] <stats-symbol>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_summon.h b/include/commands/cmd_summon.h
index 467b1f71a..c0bc6e17a 100644
--- a/include/commands/cmd_summon.h
+++ b/include/commands/cmd_summon.h
@@ -31,7 +31,7 @@
class cmd_summon : public command_t
{
public:
- cmd_summon () : command_t("SUMMON",0,0) { }
+ cmd_summon (InspIRCd* Instance) : command_t(Instance,"SUMMON",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_time.h b/include/commands/cmd_time.h
index 9a3dd0c32..506bb8527 100644
--- a/include/commands/cmd_time.h
+++ b/include/commands/cmd_time.h
@@ -31,7 +31,7 @@
class cmd_time : public command_t
{
public:
- cmd_time () : command_t("TIME",0,0) { syntax = "[<servername>]"; }
+ cmd_time (InspIRCd* Instance) : command_t(Instance,"TIME",0,0) { syntax = "[<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_topic.h b/include/commands/cmd_topic.h
index 2b6348803..6475adb43 100644
--- a/include/commands/cmd_topic.h
+++ b/include/commands/cmd_topic.h
@@ -31,7 +31,7 @@
class cmd_topic : public command_t
{
public:
- cmd_topic () : command_t("TOPIC",0,1) { syntax = "<channel> [<topic>]"; }
+ cmd_topic (InspIRCd* Instance) : command_t(Instance,"TOPIC",0,1) { syntax = "<channel> [<topic>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_trace.h b/include/commands/cmd_trace.h
index 44f308012..84ea8b6c3 100644
--- a/include/commands/cmd_trace.h
+++ b/include/commands/cmd_trace.h
@@ -31,7 +31,7 @@
class cmd_trace : public command_t
{
public:
- cmd_trace () : command_t("TRACE",'o',0) { syntax = "[<object>]"; }
+ cmd_trace (InspIRCd* Instance) : command_t(Instance,"TRACE",'o',0) { syntax = "[<object>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_unloadmodule.h b/include/commands/cmd_unloadmodule.h
index 05c5c32d6..222464525 100644
--- a/include/commands/cmd_unloadmodule.h
+++ b/include/commands/cmd_unloadmodule.h
@@ -31,7 +31,7 @@
class cmd_unloadmodule : public command_t
{
public:
- cmd_unloadmodule () : command_t("UNLOADMODULE",'o',1) { syntax = "<modulename>"; }
+ cmd_unloadmodule (InspIRCd* Instance) : command_t(Instance,"UNLOADMODULE",'o',1) { syntax = "<modulename>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_user.h b/include/commands/cmd_user.h
index b8e3201c1..f529f6108 100644
--- a/include/commands/cmd_user.h
+++ b/include/commands/cmd_user.h
@@ -31,7 +31,7 @@
class cmd_user : public command_t
{
public:
- cmd_user () : command_t("USER",0,4) { syntax = "<username> <localhost> <remotehost> <GECOS>"; }
+ cmd_user (InspIRCd* Instance) : command_t(Instance,"USER",0,4) { syntax = "<username> <localhost> <remotehost> <GECOS>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_userhost.h b/include/commands/cmd_userhost.h
index e50813b4e..f065b468c 100644
--- a/include/commands/cmd_userhost.h
+++ b/include/commands/cmd_userhost.h
@@ -31,7 +31,7 @@
class cmd_userhost : public command_t
{
public:
- cmd_userhost () : command_t("USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
+ cmd_userhost (InspIRCd* Instance) : command_t(Instance,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_users.h b/include/commands/cmd_users.h
index a5e92f1a2..552a42382 100644
--- a/include/commands/cmd_users.h
+++ b/include/commands/cmd_users.h
@@ -31,7 +31,7 @@
class cmd_users : public command_t
{
public:
- cmd_users () : command_t("USERS",0,0) { }
+ cmd_users (InspIRCd* Instance) : command_t(Instance,"USERS",0,0) { }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_version.h b/include/commands/cmd_version.h
index 55b643f6e..478577a68 100644
--- a/include/commands/cmd_version.h
+++ b/include/commands/cmd_version.h
@@ -31,7 +31,7 @@
class cmd_version : public command_t
{
public:
- cmd_version () : command_t("VERSION",0,0) { syntax = "[<servername>]"; }
+ cmd_version (InspIRCd* Instance) : command_t(Instance,"VERSION",0,0) { syntax = "[<servername>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_wallops.h b/include/commands/cmd_wallops.h
index b8a4f690a..c637e6e98 100644
--- a/include/commands/cmd_wallops.h
+++ b/include/commands/cmd_wallops.h
@@ -31,7 +31,7 @@
class cmd_wallops : public command_t
{
public:
- cmd_wallops () : command_t("WALLOPS",'o',1) { syntax = "<any-text>"; }
+ cmd_wallops (InspIRCd* Instance) : command_t(Instance,"WALLOPS",'o',1) { syntax = "<any-text>"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_who.h b/include/commands/cmd_who.h
index d76e92aec..1181ac0e1 100644
--- a/include/commands/cmd_who.h
+++ b/include/commands/cmd_who.h
@@ -31,7 +31,7 @@
class cmd_who : public command_t
{
public:
- cmd_who () : command_t("WHO",0,1) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohur]"; }
+ cmd_who (InspIRCd* Instance) : command_t(Instance,"WHO",0,1) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohur]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h
index 0daa1144c..5f44e3530 100644
--- a/include/commands/cmd_whois.h
+++ b/include/commands/cmd_whois.h
@@ -33,7 +33,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i
class cmd_whois : public command_t
{
public:
- cmd_whois () : command_t("WHOIS",0,1) { syntax = "<nick>{,<nick>}"; }
+ cmd_whois (InspIRCd* Instance) : command_t(Instance,"WHOIS",0,1) { syntax = "<nick>{,<nick>}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h
index 6ef30324f..951ba0f28 100644
--- a/include/commands/cmd_whowas.h
+++ b/include/commands/cmd_whowas.h
@@ -31,7 +31,7 @@
class cmd_whowas : public command_t
{
public:
- cmd_whowas () : command_t("WHOWAS",0,1) { syntax = "<nick>{,<nick>}"; }
+ cmd_whowas (InspIRCd* Instance) : command_t(Instance,"WHOWAS",0,1) { syntax = "<nick>{,<nick>}"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/commands/cmd_zline.h b/include/commands/cmd_zline.h
index d27defa0f..0e2f1041d 100644
--- a/include/commands/cmd_zline.h
+++ b/include/commands/cmd_zline.h
@@ -31,7 +31,7 @@
class cmd_zline : public command_t
{
public:
- cmd_zline () : command_t("ZLINE",'o',1) { syntax = "<ipmask> [<duration> :<reason>]"; }
+ cmd_zline (InspIRCd* Instance) : command_t(Instance,"ZLINE",'o',1) { syntax = "<ipmask> [<duration> :<reason>]"; }
void Handle(const char** parameters, int pcnt, userrec *user);
};
diff --git a/include/ctables.h b/include/ctables.h
index 0b523a77f..c997cf68a 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -23,6 +23,7 @@
#include "base.h"
class userrec;
+class InspIRCd;
/*typedef void (handlerfunc) (char**, int, userrec*);*/
@@ -30,6 +31,8 @@ class userrec;
*/
class command_t : public Extensible
{
+ protected:
+ InspIRCd* ServerInstance;
public:
/** Command name
*/
@@ -57,7 +60,7 @@ class command_t : public Extensible
*/
std::string syntax;
- command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
+ command_t(InspIRCd* Instance, const std::string &cmd, char flags, int minpara) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
{
use_count = total_bytes = 0;
source = "<core>";
diff --git a/include/mode.h b/include/mode.h
index 2e51946d0..121969fef 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -400,7 +400,7 @@ class cmd_mode : public command_t
/**
* Standard constructor
*/
- cmd_mode () : command_t("MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; }
+ cmd_mode (InspIRCd* Instance) : command_t(Instance,"MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; }
/**
* Handle MODE
*/
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 4d8251fa5..aaafe3e30 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -330,63 +330,64 @@ void CommandParser::SetupCommandTable()
* full user registration) and so are saved
* for later use.
*/
- command_user = new cmd_user;
- command_nick = new cmd_nick;
- command_pass = new cmd_pass;
+ command_user = new cmd_user(ServerInstance);
+ command_nick = new cmd_nick(ServerInstance);
+ command_pass = new cmd_pass(ServerInstance);
this->CreateCommand(command_user);
this->CreateCommand(command_nick);
this->CreateCommand(command_pass);
/* The rest of these arent special. boo hoo.
*/
- this->CreateCommand(new cmd_quit);
- this->CreateCommand(new cmd_version);
- this->CreateCommand(new cmd_ping);
- this->CreateCommand(new cmd_pong);
- this->CreateCommand(new cmd_admin);
- this->CreateCommand(new cmd_privmsg);
- this->CreateCommand(new cmd_info);
- this->CreateCommand(new cmd_time);
- this->CreateCommand(new cmd_whois);
- this->CreateCommand(new cmd_wallops);
- this->CreateCommand(new cmd_notice);
- this->CreateCommand(new cmd_join);
- this->CreateCommand(new cmd_names);
- this->CreateCommand(new cmd_part);
- this->CreateCommand(new cmd_kick);
- this->CreateCommand(new cmd_mode);
- this->CreateCommand(new cmd_topic);
- this->CreateCommand(new cmd_who);
- this->CreateCommand(new cmd_motd);
- this->CreateCommand(new cmd_rules);
- this->CreateCommand(new cmd_oper);
- this->CreateCommand(new cmd_list);
- this->CreateCommand(new cmd_die);
- this->CreateCommand(new cmd_restart);
- this->CreateCommand(new cmd_kill);
- this->CreateCommand(new cmd_rehash);
- this->CreateCommand(new cmd_lusers);
- this->CreateCommand(new cmd_stats);
- this->CreateCommand(new cmd_userhost);
- this->CreateCommand(new cmd_away);
- this->CreateCommand(new cmd_ison);
- this->CreateCommand(new cmd_summon);
- this->CreateCommand(new cmd_users);
- this->CreateCommand(new cmd_invite);
- this->CreateCommand(new cmd_trace);
- this->CreateCommand(new cmd_whowas);
- this->CreateCommand(new cmd_connect);
- this->CreateCommand(new cmd_squit);
- this->CreateCommand(new cmd_modules);
- this->CreateCommand(new cmd_links);
- this->CreateCommand(new cmd_map);
- this->CreateCommand(new cmd_kline);
- this->CreateCommand(new cmd_gline);
- this->CreateCommand(new cmd_zline);
- this->CreateCommand(new cmd_qline);
- this->CreateCommand(new cmd_eline);
- this->CreateCommand(new cmd_loadmodule);
- this->CreateCommand(new cmd_unloadmodule);
- this->CreateCommand(new cmd_server);
- this->CreateCommand(new cmd_commands);
+ this->CreateCommand(new cmd_quit(ServerInstance));
+ this->CreateCommand(new cmd_version(ServerInstance));
+ this->CreateCommand(new cmd_ping(ServerInstance));
+ this->CreateCommand(new cmd_pong(ServerInstance));
+ this->CreateCommand(new cmd_admin(ServerInstance));
+ this->CreateCommand(new cmd_privmsg(ServerInstance));
+ this->CreateCommand(new cmd_info(ServerInstance));
+ this->CreateCommand(new cmd_time(ServerInstance));
+ this->CreateCommand(new cmd_whois(ServerInstance));
+ this->CreateCommand(new cmd_wallops(ServerInstance));
+ this->CreateCommand(new cmd_notice(ServerInstance));
+ this->CreateCommand(new cmd_join(ServerInstance));
+ this->CreateCommand(new cmd_names(ServerInstance));
+ this->CreateCommand(new cmd_part(ServerInstance));
+ this->CreateCommand(new cmd_kick(ServerInstance));
+ this->CreateCommand(new cmd_mode(ServerInstance));
+ this->CreateCommand(new cmd_topic(ServerInstance));
+ this->CreateCommand(new cmd_who(ServerInstance));
+ this->CreateCommand(new cmd_motd(ServerInstance));
+ this->CreateCommand(new cmd_rules(ServerInstance));
+ this->CreateCommand(new cmd_oper(ServerInstance));
+ this->CreateCommand(new cmd_list(ServerInstance));
+ this->CreateCommand(new cmd_die(ServerInstance));
+ this->CreateCommand(new cmd_restart(ServerInstance));
+ this->CreateCommand(new cmd_kill(ServerInstance));
+ this->CreateCommand(new cmd_rehash(ServerInstance));
+ this->CreateCommand(new cmd_lusers(ServerInstance));
+ this->CreateCommand(new cmd_stats(ServerInstance));
+ this->CreateCommand(new cmd_userhost(ServerInstance));
+ this->CreateCommand(new cmd_away(ServerInstance));
+ this->CreateCommand(new cmd_ison(ServerInstance));
+ this->CreateCommand(new cmd_summon(ServerInstance));
+ this->CreateCommand(new cmd_users(ServerInstance));
+ this->CreateCommand(new cmd_invite(ServerInstance));
+ this->CreateCommand(new cmd_trace(ServerInstance));
+ this->CreateCommand(new cmd_whowas(ServerInstance));
+ this->CreateCommand(new cmd_connect(ServerInstance));
+ this->CreateCommand(new cmd_squit(ServerInstance));
+ this->CreateCommand(new cmd_modules(ServerInstance));
+ this->CreateCommand(new cmd_links(ServerInstance));
+ this->CreateCommand(new cmd_map(ServerInstance));
+ this->CreateCommand(new cmd_kline(ServerInstance));
+ this->CreateCommand(new cmd_gline(ServerInstance));
+ this->CreateCommand(new cmd_zline(ServerInstance));
+ this->CreateCommand(new cmd_qline(ServerInstance));
+ this->CreateCommand(new cmd_eline(ServerInstance));
+ this->CreateCommand(new cmd_loadmodule(ServerInstance));
+ this->CreateCommand(new cmd_unloadmodule(ServerInstance));
+ this->CreateCommand(new cmd_server(ServerInstance));
+ this->CreateCommand(new cmd_commands(ServerInstance));
}
+
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 217db32c8..10193a2ad 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -63,11 +63,8 @@ cbanlist cbans;
class cmd_cban : public command_t
{
- private:
- InspIRCd* ServerInstance;
-
public:
- cmd_cban(InspIRCd* Me) : command_t("CBAN", 'o', 1), ServerInstance(Me)
+ cmd_cban(InspIRCd* Me) : command_t(Me, "CBAN", 'o', 1)
{
this->source = "m_cban.so";
this->
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 692a7113a..b8dc89f7c 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
class cmd_check : public command_t
{
public:
- cmd_check() : command_t("CHECK", 'o', 1)
+ cmd_check (InspIRCd* Instance) : command_t(Instance,"CHECK", 'o', 1)
{
this->source = "m_check.so";
syntax = "<nickname>|<ip>|<hostmask>|<channel>";
@@ -189,7 +189,7 @@ class ModuleCheck : public Module
ModuleCheck(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_check();
+ mycommand = new cmd_check(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index d4e7edb51..b4d7e53c8 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
class cmd_chghost : public command_t
{
public:
- cmd_chghost () : command_t("CHGHOST",'o',2)
+ cmd_chghost (InspIRCd* Instance) : command_t(Instance,"CHGHOST",'o',2)
{
this->source = "m_chghost.so";
syntax = "<nick> <newhost>";
@@ -78,7 +78,7 @@ class ModuleChgHost : public Module
: Module::Module(Me)
{
- mycommand = new cmd_chghost();
+ mycommand = new cmd_chghost(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp
index 039eb1022..cca24372a 100644
--- a/src/modules/m_chgident.cpp
+++ b/src/modules/m_chgident.cpp
@@ -11,7 +11,7 @@ extern InspIRCd* ServerInstance;
class cmd_chgident : public command_t
{
public:
- cmd_chgident() : command_t("CHGIDENT", 'o', 2)
+ cmd_chgident (InspIRCd* Instance) : command_t(Instance,"CHGIDENT", 'o', 2)
{
this->source = "m_chgident.so";
syntax = "<nick> <newident>";
@@ -48,7 +48,7 @@ class ModuleChgIdent : public Module
public:
ModuleChgIdent(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_chgident();
+ mycommand = new cmd_chgident(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 5b60752f3..45cb0372d 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -34,7 +34,7 @@ extern InspIRCd* ServerInstance;
class cmd_devoice : public command_t
{
public:
- cmd_devoice () : command_t("DEVOICE", 0, 1)
+ cmd_devoice (InspIRCd* Instance) : command_t(Instance,"DEVOICE", 0, 1)
{
this->source = "m_devoice.so";
syntax = "<channel>";
@@ -64,7 +64,7 @@ class ModuleDeVoice : public Module
ModuleDeVoice(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_devoice();
+ mycommand = new cmd_devoice(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index c552cb346..8514f03dc 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -30,7 +30,7 @@ extern InspIRCd *ServerInstance;
class cmd_gloadmodule : public command_t
{
public:
- cmd_gloadmodule () : command_t("GLOADMODULE", 'o', 1)
+ cmd_gloadmodule (InspIRCd* Instance) : command_t(Instance,"GLOADMODULE", 'o', 1)
{
this->source = "m_globalload.so";
syntax = "<modulename>";
@@ -53,7 +53,7 @@ class cmd_gloadmodule : public command_t
class cmd_gunloadmodule : public command_t
{
public:
- cmd_gunloadmodule () : command_t("GUNLOADMODULE", 'o', 1)
+ cmd_gunloadmodule (InspIRCd* Instance) : command_t(Instance,"GUNLOADMODULE", 'o', 1)
{
this->source = "m_globalload.so";
syntax = "<modulename>";
@@ -82,8 +82,8 @@ class ModuleGlobalLoad : public Module
ModuleGlobalLoad(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_gloadmodule();
- mycommand2 = new cmd_gunloadmodule();
+ mycommand = new cmd_gloadmodule(ServerInstance);
+ mycommand2 = new cmd_gunloadmodule(ServerInstance);
ServerInstance->AddCommand(mycommand);
ServerInstance->AddCommand(mycommand2);
}
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index d86b8ab13..2e081ead8 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_globops : public command_t
{
public:
- cmd_globops () : command_t("GLOBOPS",'o',1)
+ cmd_globops (InspIRCd* Instance) : command_t(Instance,"GLOBOPS",'o',1)
{
this->source = "m_globops.so";
syntax = "<any-text>";
@@ -89,7 +89,7 @@ class ModuleGlobops : public Module
mg = new ModeGlobops(ServerInstance);
ServerInstance->AddMode(mg, 'g');
- mycommand = new cmd_globops();
+ mycommand = new cmd_globops(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index fa3f4eed9..4d4263d28 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -63,7 +63,7 @@ class Helpop : public ModeHandler
class cmd_helpop : public command_t
{
public:
- cmd_helpop () : command_t("HELPOP",0,1)
+ cmd_helpop (InspIRCd* Instance) : command_t(Instance, "HELPOP", 0, 1)
{
this->source = "m_helpop.so";
syntax = "[?|!]<any-text>";
@@ -206,7 +206,7 @@ class ModuleHelpop : public Module
ReadConfig();
ho = new Helpop(ServerInstance);
ServerInstance->AddMode(ho, 'h');
- mycommand = new cmd_helpop();
+ mycommand = new cmd_helpop(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index f79520df7..0121f04f4 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_knock : public command_t
{
public:
- cmd_knock () : command_t("KNOCK", 0, 2)
+ cmd_knock (InspIRCd* Instance) : command_t(Instance,"KNOCK", 0, 2)
{
this->source = "m_knock.so";
syntax = "<channel> <reason>";
@@ -114,7 +114,7 @@ class ModuleKnock : public Module
kn = new Knock(ServerInstance);
ServerInstance->AddMode(kn, 'K');
- mycommand = new cmd_knock();
+ mycommand = new cmd_knock(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 2f80e0d51..d63c74633 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -33,7 +33,7 @@ class cmd_nicklock : public command_t
{
char* dummy;
public:
- cmd_nicklock () : command_t("NICKLOCK", 'o', 2)
+ cmd_nicklock (InspIRCd* Instance) : command_t(Instance,"NICKLOCK", 'o', 2)
{
this->source = "m_nicklock.so";
syntax = "<oldnick> <newnick>";
@@ -70,7 +70,7 @@ class cmd_nicklock : public command_t
class cmd_nickunlock : public command_t
{
public:
- cmd_nickunlock () : command_t("NICKUNLOCK", 'o', 1)
+ cmd_nickunlock (InspIRCd* Instance) : command_t(Instance,"NICKUNLOCK", 'o', 1)
{
this->source = "m_nickunlock.so";
syntax = "<locked-nick>";
@@ -99,8 +99,8 @@ class ModuleNickLock : public Module
: Module::Module(Me)
{
- cmd1 = new cmd_nicklock();
- cmd2 = new cmd_nickunlock();
+ cmd1 = new cmd_nicklock(ServerInstance);
+ cmd2 = new cmd_nickunlock(ServerInstance);
ServerInstance->AddCommand(cmd1);
ServerInstance->AddCommand(cmd2);
}
diff --git a/src/modules/m_opermd5.cpp b/src/modules/m_opermd5.cpp
index f6b482eb4..3cfb74961 100644
--- a/src/modules/m_opermd5.cpp
+++ b/src/modules/m_opermd5.cpp
@@ -272,7 +272,7 @@ void GenHash(const char* src, char* dest)
class cmd_mkpasswd : public command_t
{
public:
- cmd_mkpasswd () : command_t("MKPASSWD", 'o', 1)
+ cmd_mkpasswd (InspIRCd* Instance) : command_t(Instance,"MKPASSWD", 'o', 1)
{
this->source = "m_opermd5.so";
syntax = "<any-text>";
@@ -296,7 +296,7 @@ class ModuleOperMD5 : public Module
: Module::Module(Me)
{
- mycommand = new cmd_mkpasswd();
+ mycommand = new cmd_mkpasswd(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index b28dc49ed..b988dd00e 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -47,7 +47,7 @@ void ShowOperMOTD(userrec* user)
class cmd_opermotd : public command_t
{
public:
- cmd_opermotd () : command_t("OPERMOTD", 'o', 0)
+ cmd_opermotd (InspIRCd* Instance) : command_t(Instance,"OPERMOTD", 'o', 0)
{
this->source = "m_opermotd.so";
syntax = "[<servername>]";
@@ -67,7 +67,7 @@ class ModuleOpermotd : public Module
: Module::Module(Me)
{
- mycommand = new cmd_opermotd();
+ mycommand = new cmd_opermotd(ServerInstance);
ServerInstance->AddCommand(mycommand);
opermotd = new FileReader();
LoadOperMOTD();
diff --git a/src/modules/m_opersha256.cpp b/src/modules/m_opersha256.cpp
index 451a2c195..6ab8f6d16 100644
--- a/src/modules/m_opersha256.cpp
+++ b/src/modules/m_opersha256.cpp
@@ -228,7 +228,7 @@ void SHA256(const char *src, char *dest, int len)
class cmd_mksha256 : public command_t
{
public:
- cmd_mksha256() : command_t("MKSHA256", 'o', 1)
+ cmd_mksha256 (InspIRCd* Instance) : command_t(Instance,"MKSHA256", 'o', 1)
{
this->source = "m_opersha256.so";
syntax = "<any-text>";
@@ -250,7 +250,7 @@ public:
ModuleOperSHA256(InspIRCd* Me) : Module::Module(Me)
{
- mksha256cmd = new cmd_mksha256();
+ mksha256cmd = new cmd_mksha256(ServerInstance);
ServerInstance->AddCommand(mksha256cmd);
}
diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp
index 41f39f1d4..798c4edd8 100644
--- a/src/modules/m_park.cpp
+++ b/src/modules/m_park.cpp
@@ -61,7 +61,7 @@ parkedinfo pi;
class cmd_park : public command_t
{
public:
- cmd_park () : command_t("PARK", 0, 0)
+ cmd_park (InspIRCd* Instance) : command_t(Instance,"PARK", 0, 0)
{
this->source = "m_park.so";
}
@@ -106,7 +106,7 @@ class cmd_park : public command_t
class cmd_parkstats : public command_t
{
public:
- cmd_parkstats () : command_t("PARKSTATS", 'o', 0)
+ cmd_parkstats (InspIRCd* Instance) : command_t(Instance,"PARKSTATS", 'o', 0)
{
this->source = "m_park.so";
}
@@ -122,7 +122,7 @@ class cmd_parkstats : public command_t
class cmd_unpark : public command_t
{
public:
- cmd_unpark () : command_t("UNPARK", 0, 2)
+ cmd_unpark (InspIRCd* Instance) : command_t(Instance,"UNPARK", 0, 2)
{
this->source = "m_park.so";
syntax = "<nick> <key>";
@@ -232,9 +232,9 @@ class ModulePark : public Module
pinfo.clear();
this->ReadSettings();
- cmd1 = new cmd_park();
- cmd2 = new cmd_unpark();
- cmd3 = new cmd_parkstats();
+ cmd1 = new cmd_park(ServerInstance);
+ cmd2 = new cmd_unpark(ServerInstance);
+ cmd3 = new cmd_parkstats(ServerInstance);
ServerInstance->AddCommand(cmd1);
ServerInstance->AddCommand(cmd2);
ServerInstance->AddCommand(cmd3);
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 90ba8b4f2..c1353ef09 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -34,7 +34,7 @@ std::string suffix = "";
class cmd_randquote : public command_t
{
public:
- cmd_randquote () : command_t("RANDQUOTE", 0, 0)
+ cmd_randquote (InspIRCd* Instance) : command_t(Instance,"RANDQUOTE", 0, 0)
{
this->source = "m_randquote.so";
}
@@ -108,7 +108,7 @@ class ModuleRandQuote : public Module
else
{
/* Hidden Command -- Mode clients assume /quote sends raw data to an IRCd >:D */
- mycommand = new cmd_randquote();
+ mycommand = new cmd_randquote(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
}
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index a1533d64f..58f64c83d 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -207,7 +207,7 @@ class RemoveBase
class cmd_remove : public command_t, public RemoveBase
{
public:
- cmd_remove(bool& snk) : command_t("REMOVE", 0, 2), RemoveBase(snk)
+ cmd_remove(InspIRCd* Instance, bool& snk) : command_t(Instance, "REMOVE", 0, 2), RemoveBase(snk)
{
this->source = "m_remove.so";
syntax = "<nick> <channel> [<reason>]";
@@ -222,7 +222,7 @@ class cmd_remove : public command_t, public RemoveBase
class cmd_fpart : public command_t, public RemoveBase
{
public:
- cmd_fpart(bool& snk) : command_t("FPART", 0, 2), RemoveBase(snk)
+ cmd_fpart(InspIRCd* Instance, bool& snk) : command_t(Instance, "FPART", 0, 2), RemoveBase(snk)
{
this->source = "m_remove.so";
syntax = "<channel> <nick> [<reason>]";
@@ -245,8 +245,8 @@ class ModuleRemove : public Module
ModuleRemove(InspIRCd* Me)
: Module::Module(Me)
{
- mycommand = new cmd_remove(supportnokicks);
- mycommand2 = new cmd_fpart(supportnokicks);
+ mycommand = new cmd_remove(ServerInstance, supportnokicks);
+ mycommand2 = new cmd_fpart(ServerInstance, supportnokicks);
ServerInstance->AddCommand(mycommand);
ServerInstance->AddCommand(mycommand2);
OnRehash("");
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 0dc507220..d73e29f7b 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_sajoin : public command_t
{
public:
- cmd_sajoin() : command_t("SAJOIN", 'o', 2)
+ cmd_sajoin (InspIRCd* Instance) : command_t(Instance,"SAJOIN", 'o', 2)
{
this->source = "m_sajoin.so";
syntax = "<nick> <channel>";
@@ -69,7 +69,7 @@ class ModuleSajoin : public Module
: Module::Module(Me)
{
- mycommand = new cmd_sajoin();
+ mycommand = new cmd_sajoin(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 6ac963fa0..f1d246d71 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -43,7 +43,7 @@ extern InspIRCd* ServerInstance;
class cmd_samode : public command_t
{
public:
- cmd_samode () : command_t("SAMODE", 'o', 2)
+ cmd_samode (InspIRCd* Instance) : command_t(Instance,"SAMODE", 'o', 2)
{
this->source = "m_samode.so";
syntax = "<target> <modes> {<mode-parameters>}";
@@ -80,7 +80,7 @@ class ModuleSaMode : public Module
: Module::Module(Me)
{
- mycommand = new cmd_samode();
+ mycommand = new cmd_samode(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index b83be8f49..2856133d8 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
class cmd_sanick : public command_t
{
public:
- cmd_sanick () : command_t("SANICK", 'o', 2)
+ cmd_sanick (InspIRCd* Instance) : command_t(Instance,"SANICK", 'o', 2)
{
this->source = "m_sanick.so";
syntax = "<nick> <new-nick>";
@@ -72,7 +72,7 @@ class ModuleSanick : public Module
: Module::Module(Me)
{
- mycommand = new cmd_sanick();
+ mycommand = new cmd_sanick(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index b8a218bc3..590c22c67 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_sapart : public command_t
{
public:
- cmd_sapart () : command_t("SAPART", 'o', 2)
+ cmd_sapart (InspIRCd* Instance) : command_t(Instance,"SAPART", 'o', 2)
{
this->source = "m_sapart.so";
syntax = "<nick> <channel>";
@@ -65,7 +65,7 @@ class ModuleSapart : public Module
: Module::Module(Me)
{
- mycommand = new cmd_sapart();
+ mycommand = new cmd_sapart(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 7b216a6e8..2bb30be30 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -41,7 +41,7 @@ extern InspIRCd* ServerInstance;
class cmd_saquit : public command_t
{
public:
- cmd_saquit () : command_t("SAQUIT",'o',2)
+ cmd_saquit (InspIRCd* Instance) : command_t(Instance,"SAQUIT",'o',2)
{
this->source = "m_saquit.so";
syntax = "<nick> <reason>";
@@ -78,7 +78,7 @@ class ModuleSaquit : public Module
: Module::Module(Me)
{
- mycommand = new cmd_saquit();
+ mycommand = new cmd_saquit(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 65b03c3d0..3803c716c 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_sethost : public command_t
{
public:
- cmd_sethost() : command_t("SETHOST",'o',1)
+ cmd_sethost (InspIRCd* Instance) : command_t(Instance,"SETHOST",'o',1)
{
this->source = "m_sethost.so";
syntax = "<new-hostname>";
@@ -70,7 +70,7 @@ class ModuleSetHost : public Module
: Module::Module(Me)
{
- mycommand = new cmd_sethost();
+ mycommand = new cmd_sethost(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index 828f25792..883755598 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -11,7 +11,7 @@ extern InspIRCd* ServerInstance;
class cmd_setident : public command_t
{
public:
- cmd_setident() : command_t("SETIDENT", 'o', 1)
+ cmd_setident (InspIRCd* Instance) : command_t(Instance,"SETIDENT", 'o', 1)
{
this->source = "m_setident.so";
syntax = "<new-ident>";
@@ -42,7 +42,7 @@ class ModuleSetIdent : public Module
ModuleSetIdent(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_setident();
+ mycommand = new cmd_setident(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 678c5f6f9..9b22506ac 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
class cmd_setidle : public command_t
{
public:
- cmd_setidle () : command_t("SETIDLE", 'o', 1)
+ cmd_setidle (InspIRCd* Instance) : command_t(Instance,"SETIDLE", 'o', 1)
{
this->source = "m_setidle.so";
syntax = "<idle-seconds>";
@@ -62,7 +62,7 @@ class ModuleSetIdle : public Module
: Module::Module(Me)
{
- mycommand = new cmd_setidle();
+ mycommand = new cmd_setidle(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index b07f9a391..244c48818 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
class cmd_setname : public command_t
{
public:
- cmd_setname () : command_t("SETNAME", 0, 1)
+ cmd_setname (InspIRCd* Instance) : command_t(Instance,"SETNAME", 0, 1)
{
this->source = "m_setname.so";
syntax = "<new-gecos>";
@@ -58,7 +58,7 @@ class ModuleSetName : public Module
: Module::Module(Me)
{
- mycommand = new cmd_setname();
+ mycommand = new cmd_setname(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index cc73f8ead..e39c0a7ea 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -37,7 +37,7 @@ typedef std::vector<std::string> silencelist;
class cmd_silence : public command_t
{
public:
- cmd_silence() : command_t("SILENCE", 0, 0)
+ cmd_silence (InspIRCd* Instance) : command_t(Instance,"SILENCE", 0, 0)
{
this->source = "m_silence.so";
syntax = "{[+|-]<nick>}";
@@ -142,7 +142,7 @@ class ModuleSilence : public Module
: Module::Module(Me)
{
- mycommand = new cmd_silence();
+ mycommand = new cmd_silence(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 62cd341b1..1e59d906b 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -599,7 +599,7 @@ class cmd_rconnect : public command_t
{
Module* Creator;
public:
- cmd_rconnect (Module* Callback) : command_t("RCONNECT", 'o', 2), Creator(Callback)
+ cmd_rconnect (InspIRCd* Instance, Module* Callback) : command_t(Instance, "RCONNECT", 'o', 2), Creator(Callback)
{
this->source = "m_spanningtree.so";
syntax = "<remote-server-mask> <servermask>";
@@ -3431,7 +3431,7 @@ class ModuleSpanningTree : public Module
ReadConfiguration(true);
- command_rconnect = new cmd_rconnect(this);
+ command_rconnect = new cmd_rconnect(ServerInstance, this);
ServerInstance->AddCommand(command_rconnect);
}
diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp
index aa88fced6..96cffd91a 100644
--- a/src/modules/m_spy.cpp
+++ b/src/modules/m_spy.cpp
@@ -85,7 +85,7 @@ void spy_userlist(userrec *user,chanrec *c)
class cmd_spylist : public command_t
{
public:
- cmd_spylist () : command_t("SPYLIST", 'o', 0)
+ cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0)
{
this->source = "m_spy.so";
syntax = "";
@@ -106,7 +106,7 @@ class cmd_spylist : public command_t
class cmd_spynames : public command_t
{
public:
- cmd_spynames () : command_t("SPYNAMES", 'o', 0)
+ cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0)
{
this->source = "m_spy.so";
syntax = "{<channel>{,<channel>}}";
@@ -148,8 +148,8 @@ class ModuleSpy : public Module
ModuleSpy(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_spylist();
- mycommand2 = new cmd_spynames();
+ mycommand = new cmd_spylist(ServerInstance);
+ mycommand2 = new cmd_spynames(ServerInstance);
ServerInstance->AddCommand(mycommand);
ServerInstance->AddCommand(mycommand2);
}
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index e9a4f8903..b1199e878 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -28,7 +28,7 @@ class cmd_swhois : public command_t
{
public:
- cmd_swhois() : command_t("SWHOIS",'o',2)
+ cmd_swhois (InspIRCd* Instance) : command_t(Instance,"SWHOIS",'o',2)
{
this->source = "m_swhois.so";
syntax = "<nick> <swhois>";
@@ -85,7 +85,7 @@ class ModuleSWhois : public Module
{
Conf = new ConfigReader();
- mycommand = new cmd_swhois();
+ mycommand = new cmd_swhois(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp
index 5e3e57aa6..acffe2ee4 100644
--- a/src/modules/m_testcommand.cpp
+++ b/src/modules/m_testcommand.cpp
@@ -53,7 +53,7 @@ class MyV6Resolver : public Resolver
class cmd_woot : public command_t
{
public:
- cmd_woot () : command_t("WOOT", 0, 0)
+ cmd_woot (InspIRCd* Instance) : command_t(Instance,"WOOT", 0, 0)
{
this->source = "m_testcommand.so";
}
@@ -91,7 +91,7 @@ class ModuleTestCommand : public Module
// 0 in the modes parameter signifies that
// anyone can issue the command, and the
// command takes only one parameter.
- newcommand = new cmd_woot();
+ newcommand = new cmd_woot(ServerInstance);
ServerInstance->AddCommand(newcommand);
}
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index a778ab4c6..3d38affab 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -45,7 +45,7 @@ timedbans TimedBanList;
class cmd_tban : public command_t
{
public:
- cmd_tban () : command_t("TBAN", 0, 3)
+ cmd_tban (InspIRCd* Instance) : command_t(Instance,"TBAN", 0, 3)
{
this->source = "m_timedbans.so";
syntax = "<channel> <duration> <banmask>";
@@ -120,7 +120,7 @@ class ModuleTimedBans : public Module
: Module::Module(Me)
{
- mycommand = new cmd_tban();
+ mycommand = new cmd_tban(ServerInstance);
ServerInstance->AddCommand(mycommand);
TimedBanList.clear();
}
diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp
index 8ee58bc0c..a52584661 100644
--- a/src/modules/m_tline.cpp
+++ b/src/modules/m_tline.cpp
@@ -33,7 +33,7 @@ extern InspIRCd* ServerInstance;
class cmd_tline : public command_t
{
public:
- cmd_tline () : command_t("TLINE", 'o', 1)
+ cmd_tline (InspIRCd* Instance) : command_t(Instance,"TLINE", 'o', 1)
{
this->source = "m_tline.so";
this->syntax = "<mask>";
@@ -81,7 +81,7 @@ class ModuleTLine : public Module
: Module::Module(Me)
{
- newcommand = new cmd_tline();
+ newcommand = new cmd_tline(ServerInstance);
ServerInstance->AddCommand(newcommand);
}
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 697e46908..a1b483690 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_uninvite : public command_t
{
public:
- cmd_uninvite () : command_t("UNINVITE", 0, 2)
+ cmd_uninvite (InspIRCd* Instance) : command_t(Instance,"UNINVITE", 0, 2)
{
this->source = "m_uninvite.so";
syntax = "<nick> <channel>";
@@ -95,7 +95,7 @@ class ModuleUninvite : public Module
ModuleUninvite(InspIRCd* Me) : Module::Module(Me)
{
- mycommand = new cmd_uninvite();
+ mycommand = new cmd_uninvite(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index 35368d57f..48c343fa9 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
class cmd_userip : public command_t
{
public:
- cmd_userip () : command_t("USERIP", 'o', 1)
+ cmd_userip (InspIRCd* Instance) : command_t(Instance,"USERIP", 'o', 1)
{
this->source = "m_userip.so";
syntax = "<nick>{,<nick>}";
@@ -63,7 +63,7 @@ class ModuleUserIP : public Module
: Module::Module(Me)
{
- mycommand = new cmd_userip();
+ mycommand = new cmd_userip(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp
index cff56d4b1..af2dd2bb9 100644
--- a/src/modules/m_vhost.cpp
+++ b/src/modules/m_vhost.cpp
@@ -30,7 +30,7 @@ static ConfigReader *Conf;
class cmd_vhost : public command_t
{
public:
- cmd_vhost() : command_t("VHOST", 0, 2)
+ cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2)
{
this->source = "m_vhost.so";
syntax = "<username> <password>";
@@ -68,7 +68,7 @@ class ModuleVHost : public Module
{
Conf = new ConfigReader;
- mycommand = new cmd_vhost();
+ mycommand = new cmd_vhost(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index a01f58227..5b911632c 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -44,7 +44,7 @@ watchlist watches;
class cmd_watch : public command_t
{
public:
- cmd_watch() : command_t("WATCH",0,0)
+ cmd_watch (InspIRCd* Instance) : command_t(Instance,"WATCH",0,0)
{
this->source = "m_watch.so";
syntax = "[C|L|S]|[+|-<nick>]";
@@ -206,7 +206,7 @@ class Modulewatch : public Module
: Module::Module(Me)
{
- mycommand = new cmd_watch();
+ mycommand = new cmd_watch(ServerInstance);
ServerInstance->AddCommand(mycommand);
}