struct Message presence_msgtab = {
"PRESENCE", 0, 0, 0, MFLG_SLOW,
- {mg_unreg, {m_presence, 1}, {m_presence, 1}, mg_ignore, {me_presence, 1}, {m_presence, 1}}
+ {mg_unreg, {m_presence, 2}, {m_presence, 2}, mg_ignore, {me_presence, 2}, {m_presence, 2}}
};
mapi_clist_av1 presence_clist[] = { &presence_msgtab, NULL };
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)
return 0;
}
+ if (strlen(parv[1]) >= METADATAKEYLEN)
+ {
+ sendto_one_notice(source_p, ":Metadata key too long");
+ return 0;
+ }
+
if ((val = get_metadata(source_p, parv[1])) != NULL)
{
if (!strcmp(parv[2], val))
return 0;
}
+ if (strlen(parv[1]) >= METADATAKEYLEN)
+ return 0;
+
if ((val = get_metadata(source_p, parv[1])) != NULL)
{
if (!strcmp(parv[2], val))