diff options
Diffstat (limited to 'src')
37 files changed, 137 insertions, 139 deletions
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); } |