From 2a190859bd31ee6210fcb191c4e0dcbe9afefaeb Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Wed, 21 Dec 2011 14:44:37 +0100 Subject: [PATCH] Remove the configuration options 'file_motd' and 'file_rules'. Use mod_welcome instead. --- src/core/commands.c | 16 ----------- src/core/config.xml | 37 ------------------------- src/core/gen_config.c | 32 ---------------------- src/core/gen_config.h | 2 -- src/core/hub.c | 63 ------------------------------------------- src/core/hub.h | 15 ----------- src/core/hubevent.c | 12 ++------- 7 files changed, 2 insertions(+), 175 deletions(-) diff --git a/src/core/commands.c b/src/core/commands.c index 0cef4ff..508fa2d 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -898,20 +898,6 @@ static int command_userpass(struct command_base* cbase, struct hub_user* user, s return command_status(cbase, user, cmd, cbuf_create_const("Not implemented!")); } -static int command_rules(struct command_base* cbase, struct hub_user* user, struct hub_command* cmd) -{ - if (!hub_send_rules(cbase->hub, user)) - return command_status(cbase, user, cmd, cbuf_create_const("no rules defined.")); - return 0; -} - -static int command_motd(struct command_base* cbase, struct hub_user* user, struct hub_command* cmd) -{ - if (!hub_send_motd(cbase->hub, user)) - return command_status(cbase, user, cmd, cbuf_create_const("no motd defined.")); - return 0; -} - #ifdef CRASH_DEBUG static int command_crash(struct command_base* cbase, struct hub_user* user, struct hub_command* cmd) { @@ -965,12 +951,10 @@ void commands_builtin_add(struct command_base* cbase) ADD_COMMAND("history", 7, "?N",auth_cred_guest, command_history, "Show the last chat messages." ); ADD_COMMAND("kick", 4, "n", auth_cred_operator, command_kick, "Kick a user" ); ADD_COMMAND("log", 3, "", auth_cred_operator, command_log, "Display log" ); - ADD_COMMAND("motd", 4, "", auth_cred_guest, command_motd, "Show the message of the day" ); ADD_COMMAND("mute", 4, "n", auth_cred_operator, command_mute, "Mute user" ); ADD_COMMAND("myip", 4, "", auth_cred_guest, command_myip, "Show your own IP." ); ADD_COMMAND("register", 8, "p", auth_cred_guest, command_register, "Register your username." ); ADD_COMMAND("reload", 6, "", auth_cred_admin, command_reload, "Reload configuration files." ); - ADD_COMMAND("rules", 5, "", auth_cred_guest, command_rules, "Show the hub rules" ); ADD_COMMAND("password", 8, "p", auth_cred_user, command_password, "Change your own password." ); ADD_COMMAND("shutdown", 8, "", auth_cred_admin, command_shutdown_hub, "Shutdown hub." ); ADD_COMMAND("stats", 5, "", auth_cred_super, command_stats, "Show hub statistics." ); diff --git a/src/core/config.xml b/src/core/config.xml index 8e81403..990683e 100644 --- a/src/core/config.xml +++ b/src/core/config.xml @@ -453,24 +453,6 @@ 0.3.0 - - - -