From 0ef248759c73f13f348bbc8d1e25f57728c382ba Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 29 Jun 2009 23:22:13 +0200 Subject: [PATCH] Minor cleanups. Enabled !crash command if compiled with debug (not release). --- src/commands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands.c b/src/commands.c index 55c9b0a..e362330 100644 --- a/src/commands.c +++ b/src/commands.c @@ -19,6 +19,10 @@ #include "uhub.h" +#ifdef DEBUG +#define CRASH_DEBUG +#endif + struct hub_command { const char* message; @@ -99,7 +103,7 @@ static void send_message(struct hub_info* hub, struct user* user, const char* me static int command_access_denied(struct hub_info* hub, struct user* user, struct hub_command* cmd) { char temp[128]; - snprintf(temp, 128, "*** %s: Access denied!", cmd->prefix); + snprintf(temp, 128, "*** %s: Access denied.", cmd->prefix); send_message(hub, user, temp); return 0; } @@ -314,6 +318,8 @@ int command_dipatcher(struct hub_info* hub, struct user* user, const char* messa { size_t n = 0; int rc; + + /* Parse and validate the command */ struct hub_command* cmd = command_create(message); if (!cmd) return 1;