From d33a0f75a5c0c584fbb7cc0076da36d494f39494 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 22 Nov 2012 00:50:33 -0500 Subject: Pretty large coding style cleanup, in source doc cleanup, and allow protocol mods to depend on each other --- include/commands.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include/commands.h') diff --git a/include/commands.h b/include/commands.h index 333d6882a..5c8664147 100644 --- a/include/commands.h +++ b/include/commands.h @@ -22,20 +22,20 @@ enum CommandFlag CFLAG_STRIP_CHANNEL }; -const Anope::string CommandFlagStrings[] = { - "CFLAG_ALLOW_UNREGISTERED", - "CFLAG_STRIP_CHANNEL", - "" -}; - +/* Used in BotInfo::commands */ struct CommandInfo { typedef Anope::map map; + /* Service name of the command */ Anope::string name; + /* Permission required to execute the command */ Anope::string permission; }; +/* Where the replies from commands go to. User inheits from this and is the normal + * source of a CommandReply + */ struct CommandReply { virtual void SendMessage(const BotInfo *source, const Anope::string &msg) = 0; @@ -47,16 +47,16 @@ class CoreExport CommandSource /* The nick executing the command */ Anope::string nick; /* User executing the command, may be NULL */ - dynamic_reference u; + Reference u; public: /* The account executing the command */ - dynamic_reference nc; + Reference nc; /* Where the reply should go */ CommandReply *reply; /* Channel the command was executed on (fantasy) */ - dynamic_reference c; + Reference c; /* The service this command is on */ - dynamic_reference service; + Reference service; /* The actual name of the command being executed */ Anope::string command; /* The permission of the command being executed */ @@ -88,9 +88,9 @@ class CoreExport Command : public Service, public Flags public: /* Maximum paramaters accepted by this command */ - size_t MaxParams; + size_t max_params; /* Minimum parameters required to use this command */ - size_t MinParams; + size_t min_params; /* Module which owns us */ Module *module; -- cgit