Add OnSend hook

This commit is contained in:
ShadowNinja 2013-06-17 11:38:48 -04:00
parent ddb788883e
commit 9206f01b88
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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>