diff options
author | Adam <Adam@anope.org> | 2012-11-22 00:50:33 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-22 00:50:33 -0500 |
commit | d33a0f75a5c0c584fbb7cc0076da36d494f39494 (patch) | |
tree | 7b2274cc833c793c0f5595660cbd4d715de52ffd /include/commands.h | |
parent | 368d469631763e9c8bf399980d0ac7c5b5664d39 (diff) |
Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each
other
Diffstat (limited to 'include/commands.h')
-rw-r--r-- | include/commands.h | 24 |
1 files changed, 12 insertions, 12 deletions
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<CommandInfo> 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<User> u; + Reference<User> u; public: /* The account executing the command */ - dynamic_reference<NickCore> nc; + Reference<NickCore> nc; /* Where the reply should go */ CommandReply *reply; /* Channel the command was executed on (fantasy) */ - dynamic_reference<Channel> c; + Reference<Channel> c; /* The service this command is on */ - dynamic_reference<BotInfo> service; + Reference<BotInfo> 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<CommandFlag> 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; |