summaryrefslogtreecommitdiff
path: root/include/ctables.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-03 00:09:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-03 00:09:38 +0000
commit1b7c615062a7b203c7fc3ce4c56e16eb671f7c15 (patch)
treee5b6369422834d66285e987cfb152d87d5b56943 /include/ctables.h
parentf5a50a0b6d89ff786c288453d58b7d8f01006954 (diff)
Auto loading of commands as shared objects via dlsym (very lightweight interface, just expects a command_t* pointer)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5118 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/ctables.h')
-rw-r--r--include/ctables.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/ctables.h b/include/ctables.h
index c997cf68a..870efadac 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -55,12 +55,15 @@ class command_t : public Extensible
/** True if the command is disabled to non-opers
*/
bool disabled;
+ /** True if the command can be issued before registering
+ */
+ bool works_before_reg;
/** Syntax string for the command, displayed if non-empty string.
* This takes place of the text in the 'not enough parameters' numeric.
*/
std::string syntax;
- command_t(InspIRCd* Instance, const std::string &cmd, char flags, int minpara) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
+ command_t(InspIRCd* Instance, const std::string &cmd, char flags, int minpara, int before_reg = false) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false), works_before_reg(before_reg)
{
use_count = total_bytes = 0;
source = "<core>";
@@ -79,6 +82,11 @@ class command_t : public Extensible
return disabled;
}
+ bool WorksBeforeReg()
+ {
+ return works_before_reg;
+ }
+
virtual ~command_t() {}
};