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
This commit is contained in:
Tim Cava
2010-06-30 05:50:12 +00:00
parent 60d451fa92
commit 7269d14c75

View File

@@ -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)