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_misc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/commands/cs_set_misc.cpp') diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp index 251a2b480..b5a01174e 100644 --- a/modules/commands/cs_set_misc.cpp +++ b/modules/commands/cs_set_misc.cpp @@ -81,7 +81,13 @@ class CommandCSSetMisc : public Command source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str()); return; } - else 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