From f80e76cf2c978ddb052ef33787bb7ec5eac78315 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 4 Jun 2009 00:01:57 +0200 Subject: [PATCH] Disallow changing away status via /presence. Allowing this desynchronizes clients and servers that do not know about this extension without good reason. If you want to allow this, change it to spit out the usual AWAY protocol. --- modules/m_presence.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/m_presence.c b/modules/m_presence.c index a9a16b1..41c5e8a 100644 --- a/modules/m_presence.c +++ b/modules/m_presence.c @@ -65,6 +65,12 @@ m_presence(struct Client *client_p, struct Client *source_p, int parc, const cha if(!IsClient(source_p)) return 0; + if (!irccmp(parv[1], "away")) + { + sendto_one_notice(source_p, ":Please use /AWAY to change your away status"); + return 0; + } + if((parc < 3 || EmptyString(parv[2])) && !EmptyString(parv[1])) { if ((val = get_metadata(source_p, parv[1])) != NULL)