mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-09 17:40:29 +01:00
Add OnSend hook
This commit is contained in:
parent
ddb788883e
commit
9206f01b88
@ -10,6 +10,8 @@ function meta:send(msg, ...)
|
||||
if select("#", ...) > 0 then
|
||||
msg = msg:format(...)
|
||||
end
|
||||
self:invoke("OnSend", msg)
|
||||
|
||||
local bytes, err = self.socket:send(msg .. "\r\n")
|
||||
|
||||
if not bytes and err ~= "timeout" and err ~= "wantwrite" then
|
||||
|
@ -127,6 +127,7 @@ function irc:shutdown()
|
||||
-- <ul>
|
||||
-- <li><code>PreRegister(connection)</code>Useful for CAP commands and SASL.</li>
|
||||
-- <li><code>OnRaw(line) - (any non false/nil return value assumes line handled and will not be further processed)</code></li>
|
||||
-- <li><code>OnSend(line)</code></li>
|
||||
-- <li><code>OnDisconnect(message, errorOccurred)</code></li>
|
||||
-- <li><code>OnChat(user, channel, message)</code></li>
|
||||
-- <li><code>OnNotice(user, channel, message)</code></li>
|
||||
|
Loading…
Reference in New Issue
Block a user