From 4a8a96e8fd6296f45dec382c65dbd8234a6672c3 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Tue, 26 Jan 2016 17:17:32 +0100 Subject: Add strict_away With strict_away enabled RPL_NOWAWAY and RPL_UNAWAY will send the exact text from RFC 1459 instead of the default. --- irc_commands.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'irc_commands.c') diff --git a/irc_commands.c b/irc_commands.c index d3971df9..d7b31406 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -743,10 +743,18 @@ static void irc_cmd_away(irc_t *irc, char **cmd) } away[j] = '\0'; - irc_send_num(irc, 306, ":You're now away: %s", away); + if (set_getbool(&irc->b->set, "strict_away")) { + irc_send_num(irc, 306, ":You're now away: %s", away); + } else { + irc_send_num(irc, 306, ":You have been masked as being away"); + } set_setstr(&irc->b->set, "away", away); } else { - irc_send_num(irc, 305, ":Welcome back"); + if (set_getbool(&irc->b->set, "strict_away")) { + irc_send_num(irc, 305, ":You are no longer marked as being away"); + } else { + irc_send_num(irc, 305, ":Welcome back"); + } set_setstr(&irc->b->set, "away", NULL); } } -- cgit v1.2.3