From eff61c7a9708013f9617282c4f327bbe2b1bfb79 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 5 Oct 2012 05:03:55 -0400 Subject: Add an event for when nick or channel options are set --- modules/commands/cs_set_private.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/commands/cs_set_private.cpp') diff --git a/modules/commands/cs_set_private.cpp b/modules/commands/cs_set_private.cpp index b912779ff..37a5dbbc9 100644 --- a/modules/commands/cs_set_private.cpp +++ b/modules/commands/cs_set_private.cpp @@ -31,7 +31,12 @@ class CommandCSSetPrivate : public Command return; } - if (source.permission.empty() && !source.AccessFor(ci).HasPriv("SET")) + EventReturn MOD_RESULT; + FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1])); + if (MOD_RESULT == EVENT_STOP) + return; + + if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && !source.AccessFor(ci).HasPriv("SET")) { source.Reply(ACCESS_DENIED); return; -- cgit