From 449bbb6e04f73685341fc22acb4b579794bd56ac Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 13 Feb 2008 10:39:25 +0000 Subject: Slight API tweak. Change Command to take char * instead of char in it's constructor, this avoids confusion/generates a compile error if someone mixes up flags with number of params, instead of working but not working as expected in a weird manner. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8918 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/ctables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ctables.h') diff --git a/include/ctables.h b/include/ctables.h index 8daddf192..1464494a3 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -89,14 +89,14 @@ class CoreExport Command : public Extensible /** Create a new command. * @param Instance Pointer to creator class * @param cmd Command name. This must be UPPER CASE. - * @param flags User modes required to execute the command. + * @param flags User mode required to execute the command. May ONLY be one mode - it's a string to give warnings if people mix params up. * For oper only commands, set this to 'o', otherwise use 0. * @param minpara Minimum parameters required for the command. * @param before_reg If this is set to true, the command will * be allowed before the user is 'registered' (has sent USER, * NICK, optionally PASS, and been resolved). */ - Command(InspIRCd* Instance, const std::string &cmd, char flags, int minpara, int before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false), works_before_reg(before_reg), Penalty(penalty) + Command(InspIRCd* Instance, const std::string &cmd, char *flags, int minpara, int before_reg = false, int penalty = 1) : ServerInstance(Instance), command(cmd), flags_needed(*flags), min_params(minpara), disabled(false), works_before_reg(before_reg), Penalty(penalty) { use_count = 0; total_bytes = 0; -- cgit v1.2.3