diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 16:41:13 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 16:41:13 +0000 |
commit | dcfd227ffbfb11833663c1f96490d41537b4f496 (patch) | |
tree | 7a3160c5aad410c547688f571381057c939a0a5f /src/modules | |
parent | 5b91ea259b0c01e2c936f1be8ee1f888d2704aa1 (diff) |
Fix a number of commands to have max_params field. This means in practice, that colons on gline reasons (etc) are no longer mandatory, provided the command tells the core how many parameters at max it has.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10718 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_cban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_chgname.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_globops.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rline.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_sapart.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_saquit.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_satopic.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_setname.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_shun.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_swhois.cpp | 2 |
11 files changed, 13 insertions, 11 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 472b5ad09..1350a0afb 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -81,7 +81,7 @@ class CBanFactory : public XLineFactory class CommandCBan : public Command { public: - CommandCBan(InspIRCd* Me) : Command(Me, "CBAN", "o", 1) + CommandCBan(InspIRCd* Me) : Command(Me, "CBAN", "o", 1, 3) { this->source = "m_cban.so"; this->syntax = "<channel> [<duration> :<reason>]"; diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index 37c7e9ff8..66aa53c6c 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -20,7 +20,7 @@ class CommandChgname : public Command { public: - CommandChgname (InspIRCd* Instance) : Command(Instance,"CHGNAME", "o", 2) + CommandChgname (InspIRCd* Instance) : Command(Instance,"CHGNAME", "o", 2, 2) { this->source = "m_chgname.so"; syntax = "<nick> <newname>"; diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 3521f6687..3c53cccd7 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -130,7 +130,7 @@ class CommandFilter : public Command { FilterBase* Base; public: - CommandFilter(FilterBase* f, InspIRCd* Me, const std::string &ssource) : Command(Me, "FILTER", "o", 1), Base(f) + CommandFilter(FilterBase* f, InspIRCd* Me, const std::string &ssource) : Command(Me, "FILTER", "o", 1, 5), Base(f) { this->source = ssource; this->syntax = "<filter-definition> <type> <flags> [<gline-duration>] :<reason>"; diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index b487d4a74..8def83bf3 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -22,7 +22,7 @@ class CommandGlobops : public Command { public: - CommandGlobops (InspIRCd* Instance) : Command(Instance,"GLOBOPS","o",1) + CommandGlobops (InspIRCd* Instance) : Command(Instance,"GLOBOPS","o",1,1) { this->source = "m_globops.so"; syntax = "<any-text>"; diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 86af010de..b3ccfe8ef 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -116,9 +116,10 @@ class CommandRLine : public Command std::string rxengine; public: - CommandRLine (InspIRCd* Instance) : Command(Instance,"RLINE", "o", 1) + CommandRLine (InspIRCd* Instance) : Command(Instance,"RLINE", "o", 1, 3) { this->source = "m_rline.so"; + this->syntax = "<regex> [<rline-duration>] :<reason>"; } CmdResult Handle (const std::vector<std::string>& parameters, User *user) diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index c010b289f..732376661 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -20,7 +20,7 @@ class CommandSapart : public Command { public: - CommandSapart (InspIRCd* Instance) : Command(Instance,"SAPART", "o", 2, false, 0) + CommandSapart (InspIRCd* Instance) : Command(Instance,"SAPART", "o", 2, 3, false, 0) { this->source = "m_sapart.so"; syntax = "<nick> <channel> [reason]"; diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index f96c19890..7248b10ae 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -20,7 +20,7 @@ class CommandSaquit : public Command { public: - CommandSaquit (InspIRCd* Instance) : Command(Instance, "SAQUIT", "o", 2, false, 0) + CommandSaquit (InspIRCd* Instance) : Command(Instance, "SAQUIT", "o", 2, 3, false, 0) { this->source = "m_saquit.so"; syntax = "<nick> <reason>"; diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp index 855a5ca56..69a9090cf 100644 --- a/src/modules/m_satopic.cpp +++ b/src/modules/m_satopic.cpp @@ -21,7 +21,7 @@ class CommandSATopic : public Command { public: CommandSATopic (InspIRCd* Instance) - : Command(Instance,"SATOPIC", "o", 2, false, 0) + : Command(Instance,"SATOPIC", "o", 2, 2, false, 0) { this->source = "m_satopic.so"; syntax = "<target> <topic>"; diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 1e8bceb8a..0a325161c 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) : Command(Instance,"SETNAME", 0, 1) + CommandSetname (InspIRCd* Instance) : Command(Instance,"SETNAME", 0, 1, 1) { this->source = "m_setname.so"; syntax = "<new-gecos>"; diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 739bfb36a..c39962658 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -73,9 +73,10 @@ class cmd_shun : public Command InspIRCd *Srv; public: - cmd_shun(InspIRCd* Me) : Command(Me, "SHUN", "o", 1), Srv(Me) + cmd_shun(InspIRCd* Me) : Command(Me, "SHUN", "o", 1, 3), Srv(Me) { this->source = "m_shun.so"; + this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>"; } CmdResult Handle(const std::vector<std::string>& parameters, User *user) diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 4ed178278..50bd4095d 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -21,7 +21,7 @@ class CommandSwhois : public Command { public: - CommandSwhois (InspIRCd* Instance) : Command(Instance,"SWHOIS","o",2) + CommandSwhois (InspIRCd* Instance) : Command(Instance,"SWHOIS","o",2, 2) { this->source = "m_swhois.so"; syntax = "<nick> :<swhois>"; |