# HG changeset patch # User Marco Cirillo # Date 1322496437 0 # Node ID 0b75c7d41b82c5a002e1ac31411452f3beada353 # Parent f4ada087c743b596e7c0f6991a65c6a98eb4b9c7 mod_ircd: added role check for who sets the topic, to make sure that who sets the topic is actually a moderator. diff -r f4ada087c743 -r 0b75c7d41b82 mod_ircd/mod_ircd.in.lua --- a/mod_ircd/mod_ircd.in.lua Mon Nov 28 15:28:10 2011 +0000 +++ b/mod_ircd/mod_ircd.in.lua Mon Nov 28 16:07:17 2011 +0000 @@ -458,10 +458,7 @@ if not channel then return end local room = session.rooms[channel]; - if topic then - room:set_subject(topic) - session.send((":%s TOPIC %s :%s"):format(room.nick, room.channel, room.subject or "")); - end + if topic and room.occupants[room.nick]["role"] == "moderator" then room:set_subject(topic); end end function commands.WHO(session, args)