/* modcmd.h - Generalized module command support
- * Copyright 2002-2004 srvx Development Team
+ * Copyright 2002-2006 srvx Development Team
*
* This file is part of srvx.
*
#define MODCMD_FUNC(NAME) int NAME(struct userNode *user, UNUSED_ARG(struct chanNode *channel), UNUSED_ARG(unsigned int argc), UNUSED_ARG(char **argv), UNUSED_ARG(struct svccmd *cmd))
typedef MODCMD_FUNC(modcmd_func_t);
-#define SVCMSG_HOOK(NAME) int NAME(struct userNode *user, struct userNode *target, char *text, int server_qualified);
+#define SVCMSG_HOOK(NAME) int NAME(struct userNode *user, struct userNode *target, const char *text, int server_qualified)
typedef SVCMSG_HOOK(svcmsg_hook_t);
DECLARE_LIST(svccmd_list, struct svccmd*);
#define SVCCMD_DEBIT 0x000002
#define SVCCMD_NOISY 0x000004
+/* We do not use constants for 0 (no logging) and 1 (regular logging) as those
+ * are used very often and are intuitive enough.
+ */
+#define CMD_LOG_STAFF 0x02
+#define CMD_LOG_OVERRIDE 0x04
+
/* Modularized commands work like this:
*
* Modules define commands. Services contain "bindings" of those
struct module *module_find(const char *name);
/* Register a command-using service. */
-struct service *service_register(struct userNode *bot, char trigger);
+struct service *service_register(struct userNode *bot);
/* Find a service by name. */
struct service *service_find(const char *name);
/* Bind one command to a service. */