From 9080a58e2184eeb36b30e6dc653ec5459b3acfb1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 17 May 2013 13:53:41 -0300 Subject: MOTD redesign much more flexible, as per community suggestion in http://hercules.ws/board/topic/320-motd-change-suggestion/ dropped motd_type config new motd is at npc/MOTD.txt dropped @motd, @gmotd commands Signed-off-by: shennetsind --- src/map/atcommand.c | 54 +---------------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 8a6399568..1f234911e 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3713,16 +3713,6 @@ ACMD(reloadpcdb) return true; } -/*========================================== - * @reloadmotd - reloads motd.txt - *------------------------------------------*/ -ACMD(reloadmotd) -{ - pc_read_motd(); - clif->message(fd, msg_txt(268)); - return true; -} - /*========================================== * @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...) *------------------------------------------*/ @@ -6593,47 +6583,7 @@ ACMD(identify) return true; } -/*========================================== - * @gmotd (Global MOTD) - * by davidsiaw :P - *------------------------------------------*/ -ACMD(gmotd) -{ - FILE* fp; - - if( ( fp = fopen(motd_txt, "r") ) != NULL ) - { - char buf[CHAT_SIZE_MAX]; - size_t len; - - while( fgets(buf, sizeof(buf), fp) ) - { - if( buf[0] == '/' && buf[1] == '/' ) - { - continue; - } - - len = strlen(buf); - - while( len && ( buf[len-1] == '\r' || buf[len-1] == '\n' ) ) - {// strip trailing EOL characters - len--; - } - - if( len ) - { - buf[len] = 0; - - intif_broadcast(buf, len+1, 0); - } - } - fclose(fp); - } - return true; -} - -ACMD(misceffect) -{ +ACMD(misceffect) { int effect = 0; nullpo_retr(-1, sd); if (!message || !*message) @@ -9553,7 +9503,6 @@ void atcommand_basecommands(void) { ACMD_DEF(reloadbattleconf), ACMD_DEF(reloadstatusdb), ACMD_DEF(reloadpcdb), - ACMD_DEF(reloadmotd), ACMD_DEF(mapinfo), ACMD_DEF(dye), ACMD_DEF2("hairstyle", hair_style), @@ -9615,7 +9564,6 @@ void atcommand_basecommands(void) { ACMD_DEF(refresh), ACMD_DEF(refreshall), ACMD_DEF(identify), - ACMD_DEF(gmotd), ACMD_DEF(misceffect), ACMD_DEF(mobsearch), ACMD_DEF(cleanmap), -- cgit v1.2.3-60-g2f50