summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alltime.cpp6
-rw-r--r--src/modules/m_callerid.cpp4
-rw-r--r--src/modules/m_cap.cpp11
-rw-r--r--src/modules/m_cban.cpp6
-rw-r--r--src/modules/m_cgiirc.cpp7
-rw-r--r--src/modules/m_check.cpp6
-rw-r--r--src/modules/m_chghost.cpp7
-rw-r--r--src/modules/m_chgident.cpp6
-rw-r--r--src/modules/m_chgname.cpp6
-rw-r--r--src/modules/m_clones.cpp6
-rw-r--r--src/modules/m_close.cpp6
-rw-r--r--src/modules/m_customtitle.cpp4
-rw-r--r--src/modules/m_cycle.cpp6
-rw-r--r--src/modules/m_dccallow.cpp4
-rw-r--r--src/modules/m_devoice.cpp4
-rw-r--r--src/modules/m_filter.cpp7
-rw-r--r--src/modules/m_globalload.cpp14
-rw-r--r--src/modules/m_globops.cpp6
-rw-r--r--src/modules/m_helpop.cpp4
-rw-r--r--src/modules/m_jumpserver.cpp7
-rw-r--r--src/modules/m_knock.cpp4
-rw-r--r--src/modules/m_lockserv.cpp12
-rw-r--r--src/modules/m_nicklock.cpp6
-rw-r--r--src/modules/m_ojoin.cpp6
-rw-r--r--src/modules/m_opermotd.cpp6
-rw-r--r--src/modules/m_password_hash.cpp5
-rw-r--r--src/modules/m_randquote.cpp4
-rw-r--r--src/modules/m_remove.cpp15
-rw-r--r--src/modules/m_rline.cpp6
-rw-r--r--src/modules/m_sajoin.cpp6
-rw-r--r--src/modules/m_sakick.cpp6
-rw-r--r--src/modules/m_samode.cpp6
-rw-r--r--src/modules/m_sanick.cpp6
-rw-r--r--src/modules/m_sapart.cpp6
-rw-r--r--src/modules/m_saquit.cpp6
-rw-r--r--src/modules/m_sasl.cpp10
-rw-r--r--src/modules/m_satopic.cpp7
-rw-r--r--src/modules/m_sethost.cpp6
-rw-r--r--src/modules/m_setident.cpp6
-rw-r--r--src/modules/m_setidle.cpp6
-rw-r--r--src/modules/m_setname.cpp4
-rw-r--r--src/modules/m_showwhois.cpp8
-rw-r--r--src/modules/m_shun.cpp6
-rw-r--r--src/modules/m_silence.cpp6
-rw-r--r--src/modules/m_spanningtree/main.cpp4
-rw-r--r--src/modules/m_spanningtree/rconnect.cpp5
-rw-r--r--src/modules/m_spanningtree/rconnect.h2
-rw-r--r--src/modules/m_spanningtree/rsquit.cpp5
-rw-r--r--src/modules/m_spanningtree/rsquit.h2
-rw-r--r--src/modules/m_sslinfo.cpp4
-rw-r--r--src/modules/m_svshold.cpp6
-rw-r--r--src/modules/m_swhois.cpp6
-rw-r--r--src/modules/m_timedbans.cpp4
-rw-r--r--src/modules/m_tline.cpp6
-rw-r--r--src/modules/m_uninvite.cpp4
-rw-r--r--src/modules/m_userip.cpp6
-rw-r--r--src/modules/m_vhost.cpp4
-rw-r--r--src/modules/m_watch.cpp7
58 files changed, 175 insertions, 176 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 063e18798..abf3c0b1b 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -18,9 +18,9 @@
class CommandAlltime : public Command
{
public:
- CommandAlltime(InspIRCd *Instance, Module* Creator) : Command(Instance, Creator, "ALLTIME", "o", 0)
+ CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0)
{
- syntax.clear();
+ flags_needed = 'o'; syntax.clear();
translation.push_back(TR_END);
}
@@ -50,7 +50,7 @@ class Modulealltime : public Module
CommandAlltime mycommand;
public:
Modulealltime(InspIRCd *Me)
- : Module(Me), mycommand(Me, this)
+ : Module(Me), mycommand(this)
{
ServerInstance->AddCommand(&mycommand);
}
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index dab0d3d43..9248a5a31 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -136,7 +136,7 @@ class CommandAccept : public Command
public:
CallerIDExtInfo extInfo;
unsigned int maxaccepts;
- CommandAccept(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "ACCEPT", 0, 1),
+ CommandAccept(Module* Creator) : Command(Creator, "ACCEPT", 1),
extInfo(Creator)
{
syntax = "{[+|-]<nicks>}|*}";
@@ -342,7 +342,7 @@ private:
}
public:
- ModuleCallerID(InspIRCd* Me) : Module(Me), cmd(Me, this), myumode(Me, this)
+ ModuleCallerID(InspIRCd* Me) : Module(Me), cmd(this), myumode(Me, this)
{
OnRehash(NULL);
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 160c7a9c9..355c6d0fb 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -36,9 +36,10 @@ class CommandCAP : public Command
{
public:
LocalIntExt reghold;
- CommandCAP (InspIRCd* Instance, Module* mod) : Command(Instance, mod, "CAP", 0, 1, true),
+ CommandCAP (Module* mod) : Command(mod, "CAP", 1),
reghold("CAP_REGHOLD", mod)
{
+ works_before_reg = true;
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -68,7 +69,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, "cap_req");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
if (Data.ack.size() > 0)
{
@@ -96,7 +97,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, subcommand == "LS" ? "cap_ls" : "cap_list");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
std::string Result;
if (Data.wanted.size() > 0)
@@ -116,7 +117,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, "cap_clear");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
std::string Result = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined();
user->WriteServ("CAP * ACK :%s", Result.c_str());
@@ -135,7 +136,7 @@ class ModuleCAP : public Module
CommandCAP cmd;
public:
ModuleCAP(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
Extensible::Register(&cmd.reghold);
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 025540d9f..d5e62c98b 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -84,9 +84,9 @@ class CBanFactory : public XLineFactory
class CommandCBan : public Command
{
public:
- CommandCBan(InspIRCd* Me, Module* Creator) : Command(Me, Creator, "CBAN", "o", 1, 3)
+ CommandCBan(Module* Creator) : Command(Creator, "CBAN", 1, 3)
{
- this->syntax = "<channel> [<duration> :<reason>]";
+ flags_needed = 'o'; this->syntax = "<channel> [<duration> :<reason>]";
TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END);
}
@@ -166,7 +166,7 @@ class ModuleCBan : public Module
CBanFactory f;
public:
- ModuleCBan(InspIRCd* Me) : Module(Me), mycommand(Me, this), f(Me)
+ ModuleCBan(InspIRCd* Me) : Module(Me), mycommand(this), f(Me)
{
ServerInstance->XLines->RegisterFactory(&f);
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index c72e18390..3dc7c627d 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -61,11 +61,12 @@ class CommandWebirc : public Command
LocalStringExt webirc_ip;
CGIHostlist Hosts;
- CommandWebirc(InspIRCd* Instance, Module* Creator, bool bnotify)
- : Command(Instance, Creator, "WEBIRC", 0, 4, true), notify(bnotify),
+ CommandWebirc(Module* Creator, bool bnotify)
+ : Command(Creator, "WEBIRC", 4), notify(bnotify),
realhost("cgiirc_realhost", Creator), realip("cgiirc_realip", Creator),
webirc_hostname("cgiirc_webirc_hostname", Creator), webirc_ip("cgiirc_webirc_ip", Creator)
{
+ works_before_reg = true;
this->syntax = "password client hostname ip";
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
@@ -145,7 +146,7 @@ class ModuleCgiIRC : public Module
CommandWebirc cmd;
bool NotifyOpers;
public:
- ModuleCgiIRC(InspIRCd* Me) : Module(Me), cmd(Me, this, NotifyOpers)
+ ModuleCgiIRC(InspIRCd* Me) : Module(Me), cmd(this, NotifyOpers)
{
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 847e9d5c9..a84bd4dc6 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -20,9 +20,9 @@
class CommandCheck : public Command
{
public:
- CommandCheck (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"CHECK", "o", 1)
+ CommandCheck(Module* parent) : Command(parent,"CHECK", 1)
{
- syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
+ flags_needed = 'o'; syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
}
std::string timestring(time_t time)
@@ -198,7 +198,7 @@ class ModuleCheck : public Module
private:
CommandCheck mycommand;
public:
- ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(Me, this)
+ ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(this)
{
ServerInstance->AddCommand(&mycommand);
}
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 0d509b7d9..ef3155cb6 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -22,9 +22,9 @@ class CommandChghost : public Command
private:
char* hostmap;
public:
- CommandChghost (InspIRCd* Instance, Module* Creator, char* hmap) : Command(Instance,Creator,"CHGHOST","o",2), hostmap(hmap)
+ CommandChghost(Module* Creator, char* hmap) : Command(Creator,"CHGHOST", 2), hostmap(hmap)
{
- syntax = "<nick> <newhost>";
+ flags_needed = 'o'; syntax = "<nick> <newhost>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -86,8 +86,7 @@ class ModuleChgHost : public Module
CommandChghost cmd;
char hostmap[256];
public:
- ModuleChgHost(InspIRCd* Me)
- : Module(Me), cmd(Me, this, hostmap)
+ ModuleChgHost(InspIRCd* Me) : cmd(this, hostmap)
{
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp
index d52691054..b570feb46 100644
--- a/src/modules/m_chgident.cpp
+++ b/src/modules/m_chgident.cpp
@@ -20,9 +20,9 @@
class CommandChgident : public Command
{
public:
- CommandChgident (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CHGIDENT", "o", 2)
+ CommandChgident(Module* Creator) : Command(Creator,"CHGIDENT", 2)
{
- syntax = "<nick> <newident>";
+ flags_needed = 'o'; syntax = "<nick> <newident>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -80,7 +80,7 @@ class ModuleChgIdent : public Module
CommandChgident cmd;
public:
- ModuleChgIdent(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleChgIdent(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp
index 0f9302a76..11e7f4c9c 100644
--- a/src/modules/m_chgname.cpp
+++ b/src/modules/m_chgname.cpp
@@ -20,9 +20,9 @@
class CommandChgname : public Command
{
public:
- CommandChgname (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CHGNAME", "o", 2, 2)
+ CommandChgname(Module* Creator) : Command(Creator,"CHGNAME", 2, 2)
{
- syntax = "<nick> <newname>";
+ flags_needed = 'o'; syntax = "<nick> <newname>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -72,7 +72,7 @@ class ModuleChgName : public Module
CommandChgname cmd;
public:
- ModuleChgName(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleChgName(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp
index 407ef7ef3..5a96a08a7 100644
--- a/src/modules/m_clones.cpp
+++ b/src/modules/m_clones.cpp
@@ -20,9 +20,9 @@
class CommandClones : public Command
{
public:
- CommandClones (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CLONES", "o", 1)
+ CommandClones(Module* Creator) : Command(Creator,"CLONES", 1)
{
- syntax = "<limit>";
+ flags_needed = 'o'; syntax = "<limit>";
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -61,7 +61,7 @@ class ModuleClones : public Module
private:
CommandClones cmd;
public:
- ModuleClones(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleClones(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp
index 1da88c3d5..e81c29d20 100644
--- a/src/modules/m_close.cpp
+++ b/src/modules/m_close.cpp
@@ -29,9 +29,9 @@ class CommandClose : public Command
{
public:
/* Command 'close', needs operator */
- CommandClose (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CLOSE", "o", 0)
+ CommandClose(Module* Creator) : Command(Creator,"CLOSE", 0)
{
- }
+ flags_needed = 'o'; }
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
@@ -67,7 +67,7 @@ class ModuleClose : public Module
CommandClose cmd;
public:
ModuleClose(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index fc99cd29f..aa5749a04 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -21,7 +21,7 @@ class CommandTitle : public Command
{
public:
StringExtItem ctitle;
- CommandTitle (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TITLE",0,2),
+ CommandTitle(Module* Creator) : Command(Creator,"TITLE", 2),
ctitle("ctitle", Creator)
{
syntax = "<user> <password>";
@@ -86,7 +86,7 @@ class ModuleCustomTitle : public Module
CommandTitle cmd;
public:
- ModuleCustomTitle(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleCustomTitle(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
Extensible::Register(&cmd.ctitle);
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 8caa07b62..55548be95 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -20,9 +20,9 @@
class CommandCycle : public Command
{
public:
- CommandCycle (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CYCLE", 0, 1, false, 3)
+ CommandCycle(Module* Creator) : Command(Creator,"CYCLE", 1)
{
- syntax = "<channel> :[reason]";
+ Penalty = 3; syntax = "<channel> :[reason]";
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
@@ -81,7 +81,7 @@ class ModuleCycle : public Module
CommandCycle cmd;
public:
ModuleCycle(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index a61582629..fb6847872 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -48,7 +48,7 @@ SimpleExtItem<dccallowlist>* ext;
class CommandDccallow : public Command
{
public:
- CommandDccallow(InspIRCd* Me, Module* parent) : Command(Me, parent, "DCCALLOW", 0, 0)
+ CommandDccallow(Module* parent) : Command(parent, "DCCALLOW", 0)
{
syntax = "{[+|-]<nick> <time>|HELP|LIST}";
/* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */
@@ -240,7 +240,7 @@ class ModuleDCCAllow : public Module
public:
ModuleDCCAllow(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
Conf = new ConfigReader(ServerInstance);
ext = new SimpleExtItem<dccallowlist>("dccallow", this);
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index ff85dbd67..edc2140e8 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -25,7 +25,7 @@
class CommandDevoice : public Command
{
public:
- CommandDevoice (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"DEVOICE", 0, 1)
+ CommandDevoice(Module* Creator) : Command(Creator,"DEVOICE", 1)
{
syntax = "<channel>";
TRANSLATE2(TR_TEXT, TR_END);
@@ -54,7 +54,7 @@ class ModuleDeVoice : public Module
{
CommandDevoice cmd;
public:
- ModuleDeVoice(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleDeVoice(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index b2986e436..35b72d24c 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -101,9 +101,10 @@ class CommandFilter : public Command
{
FilterBase* Base;
public:
- CommandFilter(FilterBase* f, InspIRCd* Me, const std::string &ssource)
- : Command(Me, reinterpret_cast<Module*>(f), "FILTER", "o", 1, 5), Base(f)
+ CommandFilter(FilterBase* f, const std::string &ssource)
+ : Command(reinterpret_cast<Module*>(f), "FILTER", 1, 5), Base(f)
{
+ flags_needed = 'o';
this->syntax = "<filter-definition> <action> <flags> [<gline-duration>] :<reason>";
}
CmdResult Handle(const std::vector<std::string>&, User*);
@@ -241,7 +242,7 @@ bool FilterBase::AppliesToMe(User* user, FilterResult* filter, int iflags)
return true;
}
-FilterBase::FilterBase(InspIRCd* Me, const std::string &source) : Module(Me), filtcommand(this, Me, source)
+FilterBase::FilterBase(InspIRCd* Me, const std::string &source) : Module(Me), filtcommand(this, source)
{
Me->Modules->UseInterface("RegularExpression");
ServerInstance->AddCommand(&filtcommand);
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 817e9cdfc..229a79b97 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -20,9 +20,9 @@
class CommandGloadmodule : public Command
{
public:
- CommandGloadmodule (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"GLOADMODULE", "o", 1)
+ CommandGloadmodule(Module* Creator) : Command(Creator,"GLOADMODULE", 1)
{
- syntax = "<modulename> [servermask]";
+ flags_needed = 'o'; syntax = "<modulename> [servermask]";
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
@@ -59,9 +59,9 @@ class CommandGloadmodule : public Command
class CommandGunloadmodule : public Command
{
public:
- CommandGunloadmodule (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"GUNLOADMODULE", "o", 1)
+ CommandGunloadmodule(Module* Creator) : Command(Creator,"GUNLOADMODULE", 1)
{
- syntax = "<modulename> [servermask]";
+ flags_needed = 'o'; syntax = "<modulename> [servermask]";
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -97,9 +97,9 @@ class CommandGunloadmodule : public Command
class CommandGreloadmodule : public Command
{
public:
- CommandGreloadmodule (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "GRELOADMODULE", "o", 1)
+ CommandGreloadmodule(Module* Creator) : Command(Creator, "GRELOADMODULE", 1)
{
- syntax = "<modulename> [servermask]";
+ flags_needed = 'o'; syntax = "<modulename> [servermask]";
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
@@ -143,7 +143,7 @@ class ModuleGlobalLoad : public Module
public:
ModuleGlobalLoad(InspIRCd* Me)
- : Module(Me), cmd1(Me, this), cmd2(Me, this), cmd3(Me, this)
+ : Module(Me), cmd1(this), cmd2(this), cmd3(this)
{
ServerInstance->AddCommand(&cmd1);
ServerInstance->AddCommand(&cmd2);
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index fafe19e6e..3798828a7 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -22,9 +22,9 @@
class CommandGlobops : public Command
{
public:
- CommandGlobops (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"GLOBOPS","o",1,1)
+ CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1)
{
- syntax = "<any-text>";
+ flags_needed = 'o'; syntax = "<any-text>";
TRANSLATE2(TR_TEXT, TR_END);
}
@@ -52,7 +52,7 @@ class ModuleGlobops : public Module
CommandGlobops cmd;
public:
ModuleGlobops(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
ServerInstance->SNO->EnableSnomask('g',"GLOBOPS");
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 30dd8bcb4..2ff22d4d3 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -55,7 +55,7 @@ class Helpop : public ModeHandler
class CommandHelpop : public Command
{
public:
- CommandHelpop (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "HELPOP", 0, 0)
+ CommandHelpop(Module* Creator) : Command(Creator, "HELPOP", 0)
{
syntax = "<any-text>";
}
@@ -121,7 +121,7 @@ class ModuleHelpop : public Module
public:
ModuleHelpop(InspIRCd* Me)
- : Module(Me), cmd(Me, this), ho(Me, this)
+ : Module(Me), cmd(this), ho(Me, this)
{
ReadConfig();
if (!ServerInstance->Modes->AddMode(&ho))
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index d8492fd5e..6dd8de99a 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -27,9 +27,9 @@ class CommandJumpserver : public Command
std::string reason;
int port;
- CommandJumpserver (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "JUMPSERVER", "o", 0, 4)
+ CommandJumpserver(Module* Creator) : Command(Creator, "JUMPSERVER", 0, 4)
{
- syntax = "[<server> <port> <+/-an> <reason>]";
+ flags_needed = 'o'; syntax = "[<server> <port> <+/-an> <reason>]";
redirect_to.clear();
reason.clear();
port = 0;
@@ -135,8 +135,7 @@ class ModuleJumpServer : public Module
{
CommandJumpserver js;
public:
- ModuleJumpServer(InspIRCd* Me)
- : Module(Me), js(Me, this)
+ ModuleJumpServer(InspIRCd* Me) : js(this)
{
ServerInstance->AddCommand(&js);
Implementation eventlist[] = { I_OnUserRegister };
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 718974908..46350d59d 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -20,7 +20,7 @@
class CommandKnock : public Command
{
public:
- CommandKnock (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"KNOCK", 0, 2)
+ CommandKnock(Module* Creator) : Command(Creator,"KNOCK", 2)
{
syntax = "<channel> <reason>";
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
@@ -85,7 +85,7 @@ class ModuleKnock : public Module
CommandKnock cmd;
Knock kn;
public:
- ModuleKnock(InspIRCd* Me) : Module(Me), cmd(Me, this), kn(Me, this)
+ ModuleKnock(InspIRCd* Me) : Module(Me), cmd(this), kn(Me, this)
{
if (!ServerInstance->Modes->AddMode(&kn))
throw ModuleException("Could not add new modes!");
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp
index ce3ab4c2b..7fa9d4c10 100644
--- a/src/modules/m_lockserv.cpp
+++ b/src/modules/m_lockserv.cpp
@@ -25,10 +25,9 @@ class CommandLockserv : public Command
{
bool& locked;
public:
- CommandLockserv (InspIRCd* Instance, Module* Creator, bool& lock)
- : Command(Instance, Creator, "LOCKSERV", "o", 0), locked(lock)
+ CommandLockserv(Module* Creator, bool& lock) : Command(Creator, "LOCKSERV", 0), locked(lock)
{
- syntax.clear();
+ flags_needed = 'o'; syntax.clear();
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -47,10 +46,9 @@ private:
bool& locked;
public:
- CommandUnlockserv (InspIRCd* Instance, Module* Creator, bool &lock)
- : Command(Instance, Creator, "UNLOCKSERV", "o", 0), locked(lock)
+ CommandUnlockserv(Module* Creator, bool &lock) : Command(Creator, "UNLOCKSERV", 0), locked(lock)
{
- syntax.clear();
+ flags_needed = 'o'; syntax.clear();
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -76,7 +74,7 @@ private:
}
public:
- ModuleLockserv(InspIRCd* Me) : Module(Me), lockcommand(Me, this, locked), unlockcommand(Me, this, locked)
+ ModuleLockserv(InspIRCd* Me) : lockcommand(this, locked), unlockcommand(this, locked)
{
ResetLocked();
ServerInstance->AddCommand(&lockcommand);
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 9a3eb3222..c10b9c798 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -21,9 +21,10 @@ class CommandNicklock : public Command
{
public:
LocalIntExt& locked;
- CommandNicklock (Module* Creator, LocalIntExt& ext) : Command(ServerInstance, Creator,"NICKLOCK", "o", 2),
+ CommandNicklock (Module* Creator, LocalIntExt& ext) : Command(Creator,"NICKLOCK", 2),
locked(ext)
{
+ flags_needed = 'o';
syntax = "<oldnick> <newnick>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -89,9 +90,10 @@ class CommandNickunlock : public Command
{
public:
LocalIntExt& locked;
- CommandNickunlock (Module* Creator, LocalIntExt& ext) : Command(ServerInstance, Creator,"NICKUNLOCK", "o", 1),
+ CommandNickunlock (Module* Creator, LocalIntExt& ext) : Command(Creator,"NICKUNLOCK", 1),
locked(ext)
{
+ flags_needed = 'o';
syntax = "<locked-nick>";
TRANSLATE2(TR_NICK, TR_END);
}
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index a5b4b6ffb..b8c12f00a 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -43,9 +43,9 @@ class CommandOjoin : public Command
{
public:
bool active;
- CommandOjoin (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"OJOIN", "o", 1, false, 0)
+ CommandOjoin(Module* parent) : Command(parent,"OJOIN", 1)
{
- syntax = "<channel>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<channel>";
active = false;
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -236,7 +236,7 @@ class ModuleOjoin : public Module
public:
ModuleOjoin(InspIRCd* Me)
- : Module(Me), np(NULL), mycommand(Me, this)
+ : Module(Me), np(NULL), mycommand(this)
{
/* Load config stuff */
OnRehash(NULL);
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 6eb3a0540..87e8874e3 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -43,9 +43,9 @@ CmdResult ShowOperMOTD(User* user)
class CommandOpermotd : public Command
{
public:
- CommandOpermotd (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"OPERMOTD", "o", 0)
+ CommandOpermotd(Module* Creator) : Command(Creator,"OPERMOTD", 0)
{
- syntax = "[<servername>]";
+ flags_needed = 'o'; syntax = "[<servername>]";
}
CmdResult Handle (const std::vector<std::string>& parameters, User* user)
@@ -77,7 +77,7 @@ class ModuleOpermotd : public Module
}
ModuleOpermotd(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
opermotd = NULL;
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp
index 94134e45e..61bc742c2 100644
--- a/src/modules/m_password_hash.cpp
+++ b/src/modules/m_password_hash.cpp
@@ -26,8 +26,7 @@ class CommandMkpasswd : public Command
hashymodules &hashers;
std::deque<std::string> &names;
public:
- CommandMkpasswd (InspIRCd* Instance, Module* Creator, hashymodules &h, std::deque<std::string> &n)
- : Command(Instance, Creator, "MKPASSWD", 0, 2), hashers(h), names(n)
+ CommandMkpasswd(Module* Creator, hashymodules &h, std::deque<std::string> &n) : Command(Creator, "MKPASSWD", 2), hashers(h), names(n)
{
syntax = "<hashtype> <any-text>";
}
@@ -77,7 +76,7 @@ class ModuleOperHash : public Module
public:
ModuleOperHash(InspIRCd* Me)
- : Module(Me), cmd(Me, this, hashers, names)
+ : Module(Me), cmd(this, hashers, names)
{
diduseiface = false;
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index fcdfa0226..3b8214865 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -26,7 +26,7 @@ std::string suffix;
class CommandRandquote : public Command
{
public:
- CommandRandquote (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"RANDQUOTE", 0, 0)
+ CommandRandquote(Module* Creator) : Command(Creator,"RANDQUOTE", 0)
{
}
@@ -58,7 +58,7 @@ class ModuleRandQuote : public Module
ConfigReader *conf;
public:
ModuleRandQuote(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
conf = new ConfigReader(ServerInstance);
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index d17deb742..70440e59d 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -29,8 +29,8 @@ class RemoveBase : public Command
bool& supportnokicks;
public:
- RemoveBase(InspIRCd* Instance, Module* Creator, bool& snk, const char* cmdn, const char* a, int b, int c, bool d, int e)
- : Command(Instance, Creator, cmdn, a,b,c,d,e), supportnokicks(snk)
+ RemoveBase(Module* Creator, bool& snk, const char* cmdn)
+ : Command(Creator, cmdn, 2, 2), supportnokicks(snk)
{
}
@@ -132,8 +132,8 @@ class RemoveBase : public Command
class CommandRemove : public RemoveBase
{
public:
- CommandRemove(InspIRCd* Instance, Module* Creator, bool& snk)
- : RemoveBase(Instance, Creator, snk, "REMOVE", 0, 2, 2, false, 0)
+ CommandRemove(Module* Creator, bool& snk)
+ : RemoveBase(Creator, snk, "REMOVE")
{
syntax = "<nick> <channel> [<reason>]";
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
@@ -158,8 +158,8 @@ class CommandRemove : public RemoveBase
class CommandFpart : public RemoveBase
{
public:
- CommandFpart(InspIRCd* Instance, Module* Creator, bool& snk)
- : RemoveBase(Instance, Creator, snk, "FPART", 0, 2, 2, false, 0)
+ CommandFpart(Module* Creator, bool& snk)
+ : RemoveBase(Creator, snk, "FPART")
{
syntax = "<channel> <nick> [<reason>]";
TRANSLATE4(TR_TEXT, TR_NICK, TR_TEXT, TR_END);
@@ -187,8 +187,7 @@ class ModuleRemove : public Module
public:
- ModuleRemove(InspIRCd* Me)
- : Module(Me), cmd1(Me, this, supportnokicks), cmd2(Me, this, supportnokicks)
+ ModuleRemove(InspIRCd*) : cmd1(this, supportnokicks), cmd2(this, supportnokicks)
{
ServerInstance->AddCommand(&cmd1);
ServerInstance->AddCommand(&cmd2);
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 007ac0246..f3f27a9fb 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -121,9 +121,9 @@ class CommandRLine : public Command
std::string rxengine;
public:
- CommandRLine (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"RLINE", "o", 1, 3)
+ CommandRLine(Module* Creator) : Command(Creator,"RLINE", 1, 3)
{
- this->syntax = "<regex> [<rline-duration>] :<reason>";
+ flags_needed = 'o'; this->syntax = "<regex> [<rline-duration>] :<reason>";
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -198,7 +198,7 @@ class ModuleRLine : public Module
std::string RegexEngine;
public:
- ModuleRLine(InspIRCd* Me) : Module(Me), r(Me, this), f(Me)
+ ModuleRLine(InspIRCd* Me) : Module(Me), r(this), f(Me)
{
mymodule = this;
OnRehash(NULL);
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 221c49328..bf1cbe450 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -20,9 +20,9 @@
class CommandSajoin : public Command
{
public:
- CommandSajoin (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SAJOIN", "o", 2, false, 0)
+ CommandSajoin(Module* Creator) : Command(Creator,"SAJOIN", 2)
{
- syntax = "<nick> <channel>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -98,7 +98,7 @@ class ModuleSajoin : public Module
CommandSajoin cmd;
public:
ModuleSajoin(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp
index 8b94c934c..d8eda0956 100644
--- a/src/modules/m_sakick.cpp
+++ b/src/modules/m_sakick.cpp
@@ -20,9 +20,9 @@
class CommandSakick : public Command
{
public:
- CommandSakick (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SAKICK", "o", 2, 3, false, 0)
+ CommandSakick(Module* Creator) : Command(Creator,"SAKICK", 2, 3)
{
- syntax = "<channel> <nick> [reason]";
+ flags_needed = 'o'; Penalty = 0; syntax = "<channel> <nick> [reason]";
TRANSLATE4(TR_TEXT, TR_NICK, TR_TEXT, TR_END);
}
@@ -98,7 +98,7 @@ class ModuleSakick : public Module
CommandSakick cmd;
public:
ModuleSakick(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 2a185680d..92894f5b8 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -21,9 +21,9 @@ class CommandSamode : public Command
{
public:
bool active;
- CommandSamode (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SAMODE", "o", 2, false, 0)
+ CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2)
{
- syntax = "<target> <modes> {<mode-parameters>}";
+ flags_needed = 'o'; Penalty = 0; syntax = "<target> <modes> {<mode-parameters>}";
active = false;
}
@@ -43,7 +43,7 @@ class ModuleSaMode : public Module
CommandSamode cmd;
public:
ModuleSaMode(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
ServerInstance->Modules->Attach(I_OnPreMode, this);
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 51797892d..82d1fd3a5 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -20,9 +20,9 @@
class CommandSanick : public Command
{
public:
- CommandSanick (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SANICK", "o", 2, false, 0)
+ CommandSanick(Module* Creator) : Command(Creator,"SANICK", 2)
{
- syntax = "<nick> <new-nick>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<nick> <new-nick>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -87,7 +87,7 @@ class ModuleSanick : public Module
CommandSanick cmd;
public:
ModuleSanick(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 0c0ac7e13..576ec6e7b 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -20,9 +20,9 @@
class CommandSapart : public Command
{
public:
- CommandSapart (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SAPART", "o", 2, 3, false, 0)
+ CommandSapart(Module* Creator) : Command(Creator,"SAPART", 2, 3)
{
- syntax = "<nick> <channel> [reason]";
+ flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel> [reason]";
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
}
@@ -98,7 +98,7 @@ class ModuleSapart : public Module
CommandSapart cmd;
public:
ModuleSapart(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index cbd7dfc77..ee49b37ef 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -20,9 +20,9 @@
class CommandSaquit : public Command
{
public:
- CommandSaquit (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "SAQUIT", "o", 2, 2, false, 0)
+ CommandSaquit(Module* Creator) : Command(Creator, "SAQUIT", 2, 2)
{
- syntax = "<nick> <reason>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<nick> <reason>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -67,7 +67,7 @@ class ModuleSaquit : public Module
CommandSaquit cmd;
public:
ModuleSaquit(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 6c439bc86..8a4d772cc 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -152,9 +152,10 @@ class CommandAuthenticate : public Command
public:
SimpleExtItem<SaslAuthenticator>& authExt;
GenericCap& cap;
- CommandAuthenticate (InspIRCd* Instance, Module* Creator, SimpleExtItem<SaslAuthenticator>& ext, GenericCap& Cap)
- : Command(Instance, Creator, "AUTHENTICATE", 0, 1, true), authExt(ext), cap(Cap)
+ CommandAuthenticate(Module* Creator, SimpleExtItem<SaslAuthenticator>& ext, GenericCap& Cap)
+ : Command(Creator, "AUTHENTICATE", 1), authExt(ext), cap(Cap)
{
+ works_before_reg = true;
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -182,8 +183,7 @@ class CommandSASL : public Command
{
public:
SimpleExtItem<SaslAuthenticator>& authExt;
- CommandSASL(InspIRCd* Instance, Module* Creator, SimpleExtItem<SaslAuthenticator>& ext)
- : Command(Instance, Creator, "SASL", 0, 2), authExt(ext)
+ CommandSASL(Module* Creator, SimpleExtItem<SaslAuthenticator>& ext) : Command(Creator, "SASL", 2), authExt(ext)
{
this->disabled = true; // should not be called by users
}
@@ -224,7 +224,7 @@ class ModuleSASL : public Module
CommandSASL sasl;
public:
ModuleSASL(InspIRCd* Me)
- : Module(Me), authExt("sasl_auth", this), cap(this, "sasl"), auth(Me, this, authExt, cap), sasl(Me, this, authExt)
+ : Module(Me), authExt("sasl_auth", this), cap(this, "sasl"), auth(this, authExt, cap), sasl(this, authExt)
{
Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnPostConnect, I_OnUserDisconnect, I_OnCleanup };
ServerInstance->Modules->Attach(eventlist, this, 5);
diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp
index 542e8f30d..3a68a98d8 100644
--- a/src/modules/m_satopic.cpp
+++ b/src/modules/m_satopic.cpp
@@ -20,10 +20,9 @@
class CommandSATopic : public Command
{
public:
- CommandSATopic (InspIRCd* Instance, Module* Creator)
- : Command(Instance,Creator,"SATOPIC", "o", 2, 2, false, 0)
+ CommandSATopic(Module* Creator) : Command(Creator,"SATOPIC", 2, 2)
{
- syntax = "<target> <topic>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<target> <topic>";
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -57,7 +56,7 @@ class ModuleSATopic : public Module
CommandSATopic cmd;
public:
ModuleSATopic(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 8e397c0e1..af9443efd 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -22,9 +22,9 @@ class CommandSethost : public Command
private:
char* hostmap;
public:
- CommandSethost (InspIRCd* Instance, Module* Creator, char* hmap) : Command(Instance,Creator,"SETHOST","o",1), hostmap(hmap)
+ CommandSethost(Module* Creator, char* hmap) : Command(Creator,"SETHOST", 1), hostmap(hmap)
{
- syntax = "<new-hostname>";
+ flags_needed = 'o'; syntax = "<new-hostname>";
TRANSLATE2(TR_TEXT, TR_END);
}
@@ -67,7 +67,7 @@ class ModuleSetHost : public Module
char hostmap[256];
public:
ModuleSetHost(InspIRCd* Me)
- : Module(Me), cmd(Me, this, hostmap)
+ : Module(Me), cmd(this, hostmap)
{
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index 64fd0a689..26d4254b8 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -20,9 +20,9 @@
class CommandSetident : public Command
{
public:
- CommandSetident (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SETIDENT", "o", 1)
+ CommandSetident(Module* Creator) : Command(Creator,"SETIDENT", 1)
{
- syntax = "<new-ident>";
+ flags_needed = 'o'; syntax = "<new-ident>";
TRANSLATE2(TR_TEXT, TR_END);
}
@@ -59,7 +59,7 @@ class ModuleSetIdent : public Module
CommandSetident cmd;
public:
- ModuleSetIdent(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleSetIdent(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 17570d989..d5d397321 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -20,9 +20,9 @@
class CommandSetidle : public Command
{
public:
- CommandSetidle (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SETIDLE", "o", 1)
+ CommandSetidle(Module* Creator) : Command(Creator,"SETIDLE", 1)
{
- syntax = "<duration>";
+ flags_needed = 'o'; syntax = "<duration>";
TRANSLATE2(TR_TEXT, TR_END);
}
@@ -51,7 +51,7 @@ class ModuleSetIdle : public Module
CommandSetidle cmd;
public:
ModuleSetIdle(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index 97bb1cfcf..49b0741f0 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -20,7 +20,7 @@
class CommandSetname : public Command
{
public:
- CommandSetname (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SETNAME", 0, 1, 1)
+ CommandSetname(Module* Creator) : Command(Creator,"SETNAME", 1, 1)
{
syntax = "<new-gecos>";
TRANSLATE2(TR_TEXT, TR_END);
@@ -56,7 +56,7 @@ class ModuleSetName : public Module
CommandSetname cmd;
public:
ModuleSetName(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 8b55c3e96..e42e5fa36 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -20,7 +20,7 @@
class SeeWhois : public ModeHandler
{
public:
- SeeWhois(InspIRCd* Instance, Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, 'W', PARAM_NONE, MODETYPE_USER)
+ SeeWhois(Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, 'W', PARAM_NONE, MODETYPE_USER)
{
oper = IsOpersOnly;
}
@@ -51,7 +51,7 @@ class SeeWhois : public ModeHandler
class WhoisNoticeCmd : public Command
{
public:
- WhoisNoticeCmd(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"WHOISNOTICE", 0, 1)
+ WhoisNoticeCmd(Module* Creator) : Command(Creator,"WHOISNOTICE", 1)
{
}
@@ -81,13 +81,13 @@ class ModuleShowwhois : public Module
public:
- ModuleShowwhois(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleShowwhois(InspIRCd* Me) : cmd(this)
{
ConfigReader conf(ServerInstance);
bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", "yes", 0);
ShowWhoisFromOpers = conf.ReadFlag("showwhois", "showfromopers", "yes", 0);
- sw = new SeeWhois(ServerInstance, this, OpersOnly);
+ sw = new SeeWhois(this, OpersOnly);
if (!ServerInstance->Modes->AddMode(sw))
throw ModuleException("Could not add new modes!");
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 3a5901028..193c39349 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -87,9 +87,9 @@ class ShunFactory : public XLineFactory
class CommandShun : public Command
{
public:
- CommandShun(InspIRCd* Me, Module* Creator) : Command(Me, Creator, "SHUN", "o", 1, 3)
+ CommandShun(Module* Creator) : Command(Creator, "SHUN", 1, 3)
{
- this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
+ flags_needed = 'o'; this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
}
CmdResult Handle(const std::vector<std::string>& parameters, User *user)
@@ -187,7 +187,7 @@ class ModuleShun : public Module
bool affectopers;
public:
- ModuleShun(InspIRCd* Me) : Module(Me), cmd(Me, this), f(Me)
+ ModuleShun(InspIRCd* Me) : Module(Me), cmd(this), f(Me)
{
ServerInstance->XLines->RegisterFactory(&f);
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 3b0709539..be1477a16 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -53,7 +53,7 @@ static int SILENCE_EXCLUDE = 0x0040; /* x exclude this pattern */
class CommandSVSSilence : public Command
{
public:
- CommandSVSSilence(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SVSSILENCE", 0, 2)
+ CommandSVSSilence(Module* Creator) : Command(Creator,"SVSSILENCE", 2)
{
syntax = "<target> {[+|-]<mask> <p|c|i|n|t|a|x>}";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
@@ -94,7 +94,7 @@ class CommandSilence : public Command
unsigned int& maxsilence;
public:
SimpleExtItem<silencelist> ext;
- CommandSilence (InspIRCd* Instance, Module* Creator, unsigned int &max) : Command(Instance, Creator, "SILENCE", 0, 0),
+ CommandSilence(Module* Creator, unsigned int &max) : Command(Creator, "SILENCE", 0),
maxsilence(max), ext("silence_list", Creator)
{
syntax = "{[+|-]<mask> <p|c|i|n|t|a|x>}";
@@ -271,7 +271,7 @@ class ModuleSilence : public Module
public:
ModuleSilence(InspIRCd* Me)
- : Module(Me), maxsilence(32), cmdsilence(Me, this, maxsilence), cmdsvssilence(Me, this)
+ : Module(Me), maxsilence(32), cmdsilence(this, maxsilence), cmdsvssilence(this)
{
OnRehash(NULL);
ServerInstance->AddCommand(&cmdsilence);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index ee8c82c8b..8866e8d6d 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -36,9 +36,9 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
{
ServerInstance->Modules->UseInterface("BufferedSocketHook");
Utils = new SpanningTreeUtilities(ServerInstance, this);
- command_rconnect = new CommandRConnect(ServerInstance, this, Utils);
+ command_rconnect = new CommandRConnect(this, Utils);
ServerInstance->AddCommand(command_rconnect);
- command_rsquit = new CommandRSQuit(ServerInstance, this, Utils);
+ command_rsquit = new CommandRSQuit(this, Utils);
ServerInstance->AddCommand(command_rsquit);
RefreshTimer = new CacheRefreshTimer(ServerInstance, Utils);
ServerInstance->Timers->AddTimer(RefreshTimer);
diff --git a/src/modules/m_spanningtree/rconnect.cpp b/src/modules/m_spanningtree/rconnect.cpp
index 1811d73a1..a62ef5cf3 100644
--- a/src/modules/m_spanningtree/rconnect.cpp
+++ b/src/modules/m_spanningtree/rconnect.cpp
@@ -26,9 +26,10 @@
/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */
-CommandRConnect::CommandRConnect (InspIRCd* Instance, Module* Creator, SpanningTreeUtilities* Util)
- : Command(Instance, Creator, "RCONNECT", "o", 2), Utils(Util)
+CommandRConnect::CommandRConnect (Module* Creator, SpanningTreeUtilities* Util)
+ : Command(Creator, "RCONNECT", 2), Utils(Util)
{
+ flags_needed = 'o';
syntax = "<remote-server-mask> <target-server-mask>";
}
diff --git a/src/modules/m_spanningtree/rconnect.h b/src/modules/m_spanningtree/rconnect.h
index f038f5c22..dc62d231d 100644
--- a/src/modules/m_spanningtree/rconnect.h
+++ b/src/modules/m_spanningtree/rconnect.h
@@ -20,7 +20,7 @@ class CommandRConnect : public Command
{
SpanningTreeUtilities* Utils; /* Utility class */
public:
- CommandRConnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
+ CommandRConnect (Module* Callback, SpanningTreeUtilities* Util);
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
};
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp
index 7de539905..25b3c54d1 100644
--- a/src/modules/m_spanningtree/rsquit.cpp
+++ b/src/modules/m_spanningtree/rsquit.cpp
@@ -24,9 +24,10 @@
/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */
-CommandRSQuit::CommandRSQuit (InspIRCd* Instance, Module* Creator, SpanningTreeUtilities* Util)
- : Command(Instance, Creator, "RSQUIT", "o", 1), Utils(Util)
+CommandRSQuit::CommandRSQuit (Module* Creator, SpanningTreeUtilities* Util)
+ : Command(Creator, "RSQUIT", 1), Utils(Util)
{
+ flags_needed = 'o';
syntax = "<target-server-mask> [reason]";
}
diff --git a/src/modules/m_spanningtree/rsquit.h b/src/modules/m_spanningtree/rsquit.h
index 92f6eb159..48abd5c5c 100644
--- a/src/modules/m_spanningtree/rsquit.h
+++ b/src/modules/m_spanningtree/rsquit.h
@@ -20,7 +20,7 @@ class CommandRSQuit : public Command
{
SpanningTreeUtilities* Utils; /* Utility class */
public:
- CommandRSQuit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
+ CommandRSQuit (Module* Callback, SpanningTreeUtilities* Util);
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
void NoticeUser(User* user, const std::string &msg);
};
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp
index 952fcf4a1..cca32d4da 100644
--- a/src/modules/m_sslinfo.cpp
+++ b/src/modules/m_sslinfo.cpp
@@ -72,7 +72,7 @@ class CommandSSLInfo : public Command
public:
SSLCertExt CertExt;
- CommandSSLInfo(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator, "SSLINFO", 0, 1), CertExt(Creator)
+ CommandSSLInfo(Module* Creator) : Command(Creator, "SSLINFO", 1), CertExt(Creator)
{
this->syntax = "<nick>";
}
@@ -117,7 +117,7 @@ class ModuleSSLInfo : public Module
public:
ModuleSSLInfo(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index e8cd82806..cbe980d05 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -79,9 +79,9 @@ class SVSHoldFactory : public XLineFactory
class CommandSvshold : public Command
{
public:
- CommandSvshold(InspIRCd* Me, Module* Creator) : Command(Me, Creator, "SVSHOLD", "o", 1)
+ CommandSvshold(Module* Creator) : Command(Creator, "SVSHOLD", 1)
{
- this->syntax = "<nickname> [<duration> :<reason>]";
+ flags_needed = 'o'; this->syntax = "<nickname> [<duration> :<reason>]";
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
}
@@ -153,7 +153,7 @@ class ModuleSVSHold : public Module
public:
- ModuleSVSHold(InspIRCd* Me) : Module(Me), cmd(Me, this), s(Me)
+ ModuleSVSHold(InspIRCd* Me) : Module(Me), cmd(this), s(Me)
{
ServerInstance->XLines->RegisterFactory(&s);
ServerInstance->AddCommand(&cmd);
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 918d00e14..272a73758 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -21,9 +21,9 @@ class CommandSwhois : public Command
{
public:
StringExtItem swhois;
- CommandSwhois (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SWHOIS","o",2,2), swhois("swhois", Creator)
+ CommandSwhois(Module* Creator) : Command(Creator,"SWHOIS", 2,2), swhois("swhois", Creator)
{
- syntax = "<nick> :<swhois>";
+ flags_needed = 'o'; syntax = "<nick> :<swhois>";
Extensible::Register(&swhois);
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
@@ -75,7 +75,7 @@ class ModuleSWhois : public Module
CommandSwhois cmd;
public:
- ModuleSWhois(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleSWhois(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnWhoisLine, I_OnPostCommand };
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 11ff23a12..c4f8feafe 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -33,7 +33,7 @@ timedbans TimedBanList;
class CommandTban : public Command
{
public:
- CommandTban (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TBAN", 0, 3)
+ CommandTban(Module* Creator) : Command(Creator,"TBAN", 3)
{
syntax = "<channel> <duration> <banmask>";
TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
@@ -119,7 +119,7 @@ class ModuleTimedBans : public Module
CommandTban cmd;
public:
ModuleTimedBans(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
TimedBanList.clear();
diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp
index b08d5b6c0..2d44a049a 100644
--- a/src/modules/m_tline.cpp
+++ b/src/modules/m_tline.cpp
@@ -20,9 +20,9 @@
class CommandTline : public Command
{
public:
- CommandTline (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TLINE", "o", 1)
+ CommandTline(Module* Creator) : Command(Creator,"TLINE", 1)
{
- this->syntax = "<mask>";
+ flags_needed = 'o'; this->syntax = "<mask>";
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -64,7 +64,7 @@ class ModuleTLine : public Module
CommandTline cmd;
public:
ModuleTLine(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index e659ffa23..495ec0511 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -20,7 +20,7 @@
class CommandUninvite : public Command
{
public:
- CommandUninvite (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"UNINVITE", 0, 2)
+ CommandUninvite(Module* Creator) : Command(Creator,"UNINVITE", 2)
{
syntax = "<nick> <channel>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
@@ -87,7 +87,7 @@ class ModuleUninvite : public Module
public:
- ModuleUninvite(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleUninvite(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index c58f4a73b..ff4da2828 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -20,9 +20,9 @@
class CommandUserip : public Command
{
public:
- CommandUserip (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"USERIP", "o", 1)
+ CommandUserip(Module* Creator) : Command(Creator,"USERIP", 1)
{
- syntax = "<nick>{,<nick>}";
+ flags_needed = 'o'; syntax = "<nick>{,<nick>}";
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -58,7 +58,7 @@ class ModuleUserIP : public Module
CommandUserip cmd;
public:
ModuleUserIP(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_On005Numeric };
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp
index 6c630622c..dcba12874 100644
--- a/src/modules/m_vhost.cpp
+++ b/src/modules/m_vhost.cpp
@@ -20,7 +20,7 @@
class CommandVhost : public Command
{
public:
- CommandVhost (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"VHOST", 0, 2)
+ CommandVhost(Module* Creator) : Command(Creator,"VHOST", 2)
{
syntax = "<username> <password>";
}
@@ -60,7 +60,7 @@ class ModuleVHost : public Module
CommandVhost cmd;
public:
- ModuleVHost(InspIRCd* Me) : Module(Me), cmd(Me, this)
+ ModuleVHost(InspIRCd* Me) : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index ab32c6740..92e4116ec 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -103,7 +103,7 @@ watchentries* whos_watching_me;
class CommandSVSWatch : public Command
{
public:
- CommandSVSWatch (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SVSWATCH", 0, 2)
+ CommandSVSWatch(Module* Creator) : Command(Creator,"SVSWATCH", 2)
{
syntax = "<target> [C|L|S]|[+|-<nick>]";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
@@ -248,8 +248,7 @@ class CommandWatch : public Command
return CMD_SUCCESS;
}
- CommandWatch (InspIRCd* Instance, Module* parent, unsigned int &maxwatch)
- : Command(Instance,parent,"WATCH",0,0), MAX_WATCH(maxwatch), ext("watchlist", parent)
+ CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", parent)
{
syntax = "[C|L|S]|[+|-<nick>]";
TRANSLATE2(TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
@@ -369,7 +368,7 @@ class Modulewatch : public Module
public:
Modulewatch(InspIRCd* Me)
- : Module(Me), maxwatch(32), cmdw(Me, this, maxwatch), sw(Me,this)
+ : Module(Me), maxwatch(32), cmdw(this, maxwatch), sw(this)
{
OnRehash(NULL);
whos_watching_me = new watchentries();