aboutsummaryrefslogtreecommitdiffstats
path: root/irc_commands.c
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-01-26 17:17:32 +0100
committerMarius Halden <marius.h@lden.org>2016-05-07 14:27:54 +0200
commit4a8a96e8fd6296f45dec382c65dbd8234a6672c3 (patch)
tree2f1f5715c057dfa4a49de41cb82cd54c61e432d6 /irc_commands.c
parent5ec1c43861ee72c43b3ad0d2a143dd996a1590e7 (diff)
Add strict_away
With strict_away enabled RPL_NOWAWAY and RPL_UNAWAY will send the exact text from RFC 1459 instead of the default.
Diffstat (limited to 'irc_commands.c')
-rw-r--r--irc_commands.c12
1 files changed, 10 insertions, 2 deletions
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);
}
}