From 7269d14c750027055019785041bc184321d6fb12 Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Wed, 30 Jun 2010 05:50:12 +0000 Subject: [PATCH] When /AWAYMSG is used without an argument, tell the user their auto-away msg was unset, instead of saying it was set to "nothing". (From BX2) git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@91 13b04d17-f746-0410-82c6-800466cd88b0 --- source/commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/commands.c b/source/commands.c index b290590..d66d372 100644 --- a/source/commands.c +++ b/source/commands.c @@ -3177,10 +3177,15 @@ BUILT_IN_COMMAND(away) { extern char *awaymsg; if (args && *args) + { malloc_strcpy(&awaymsg, args); + bitchsay("Your auto-away msg has been set to \"%s\"", awaymsg); + } else + { new_free(&awaymsg); - bitchsay("Your auto-away msg has been set to \"%s\"", awaymsg? awaymsg : "nothing"); + bitchsay("Your auto-away msg has been unset"); + } return; } if (*args)