summaryrefslogtreecommitdiff
path: root/include/ctables.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:48 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:48 +0000
commit24731c63b6320be22f7b3220236271fa7476b975 (patch)
tree615959bfd36dd30bc5c067c4501dbfb8a2e8cb8b /include/ctables.h
parent79f9faeec84fbcb704b45811b9851148ab1cb20b (diff)
Add Module* creator to Command and ModeHandler
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11631 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/ctables.h')
-rw-r--r--include/ctables.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/ctables.h b/include/ctables.h
index a543b7e37..315b38f43 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -79,7 +79,10 @@ class CoreExport Command : public Extensible
public:
/** Command name
*/
- std::string command;
+ std::string command;
+
+ /** Creator module, NULL for core commands */
+ Module* creator;
/** User flags needed to execute the command or 0
*/
@@ -100,12 +103,8 @@ class CoreExport Command : public Extensible
long double use_count;
/** used by /stats m
- */
- long double total_bytes;
-
- /** used for resource tracking between modules
*/
- std::string source;
+ long double total_bytes;
/** True if the command is disabled to non-opers
*/
@@ -140,22 +139,20 @@ class CoreExport Command : public Extensible
* be allowed before the user is 'registered' (has sent USER,
* NICK, optionally PASS, and been resolved).
*/
- Command(InspIRCd* Instance, const std::string &cmd, const char *flags, int minpara, bool before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(flags ? *flags : 0), min_params(minpara), max_params(0), disabled(false), works_before_reg(before_reg), Penalty(penalty)
+ Command(InspIRCd* Instance, Module* me, const std::string &cmd, const char *flags, int minpara, bool before_reg = false, int penalty = 1) :
+ ServerInstance(Instance), command(cmd), creator(me), flags_needed(flags ? *flags : 0),
+ min_params(minpara), max_params(0), disabled(false), works_before_reg(before_reg), Penalty(penalty)
{
use_count = 0;
total_bytes = 0;
- source = "<core>";
- syntax = "";
- translation.clear();
}
- Command(InspIRCd* Instance, const std::string &cmd, const char *flags, int minpara, int maxpara, bool before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(flags ? *flags : 0), min_params(minpara), max_params(maxpara), disabled(false), works_before_reg(before_reg), Penalty(penalty)
+ Command(InspIRCd* Instance, Module* me, const std::string &cmd, const char *flags, int minpara, int maxpara, bool before_reg = false, int penalty = 1) :
+ ServerInstance(Instance), command(cmd), creator(me), flags_needed(flags ? *flags : 0),
+ min_params(minpara), max_params(maxpara), disabled(false), works_before_reg(before_reg), Penalty(penalty)
{
use_count = 0;
total_bytes = 0;
- source = "<core>";
- syntax = "";
- translation.clear();
}
/** Handle the command from a user.