From 77343d3c215c85993b7b86d50d7238f00d8fdc55 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Fri, 20 Mar 2009 18:38:42 +0100 Subject: [PATCH] Remove duplicate access_denied checks. Signed-off-by: Jan Vidar Krey --- src/commands.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/commands.c b/src/commands.c index 968a028..a6af1a6 100644 --- a/src/commands.c +++ b/src/commands.c @@ -51,9 +51,6 @@ static int command_access_denied(struct user* user) static int command_stats(struct user* user, const char* message) { - if (user->credentials < cred_super) - return command_access_denied(user); - char temp[128]; snprintf(temp, 128, "*** Stats: %zu users, peak: %zu. Network (up/down): %d/%d KB/s, peak: %d/%d KB/s", user->hub->users->count, @@ -127,18 +124,12 @@ static int command_uptime(struct user* user, const char* message) static int command_kick(struct user* user, const char* message) { - if (user->credentials < cred_operator) - return command_access_denied(user); - send_message(user, "*** Kick not implemented!"); return 0; } static int command_reload(struct user* user, const char* message) { - if (user->credentials < cred_admin) - return command_access_denied(user); - send_message(user, "*** Reloading configuration"); user->hub->status = hub_status_restart; return 0; @@ -146,9 +137,6 @@ static int command_reload(struct user* user, const char* message) static int command_shutdown(struct user* user, const char* message) { - if (user->credentials < cred_admin) - return command_access_denied(user); - send_message(user, "*** Hub shuting down..."); user->hub->status = hub_status_shutdown; return 0;