0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-10 20:48:34 +02:00

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.
This commit is contained in:
Jilles Tjoelker 2009-06-04 00:01:57 +02:00
parent 50325a6667
commit 72d36704fc

View file

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