mod_ircd: added role check for who sets the topic, to make sure that who sets the topic is actually a moderator.
--- 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)