mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-09 17:40:29 +01:00
Adding OnModeChange hook
This commit is contained in:
parent
98ccd99f4d
commit
04dbe436f3
@ -139,6 +139,7 @@ function irc:shutdown()
|
||||
-- <li><code>OnKick(channel, nick, kicker, reason)</code>* (kicker is a <code>user</code> table)</li>
|
||||
-- <li><code>OnUserModeIs(modes)</code></li>
|
||||
-- <li><code>OnChannelModeIs(user, channel, modes)</code></li>
|
||||
-- <li><code>OnModeChange(user, target, modes)</code>*</li>
|
||||
-- </ul>
|
||||
-- * Event also invoked for yourself.
|
||||
-- † Channel passed only when user tracking is enabled
|
||||
|
4
init.lua
4
init.lua
@ -298,6 +298,10 @@ handlers["324"] = function(o, prefix, user, channel, modes)
|
||||
o:invoke("OnChannelModeIs", channel, modes)
|
||||
end
|
||||
|
||||
handlers["MODE"] = function(o, prefix, target, modes)
|
||||
o:invoke("OnModeChange", parsePrefix(prefix), target, modes)
|
||||
end
|
||||
|
||||
handlers["ERROR"] = function(o, prefix, message)
|
||||
o:invoke("OnDisconnect", message, true)
|
||||
o:shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user