1
0
mirror of https://github.com/ShadowNinja/LuaIRC.git synced 2025-06-28 14:16:07 +02:00

Add Message class and constructors for common messages

This commit is contained in:
ShadowNinja
2014-03-17 18:52:09 +00:00
parent 9b74265690
commit e958a7242a
6 changed files with 170 additions and 27 deletions

View File

@ -70,24 +70,24 @@ function irc:whois(nick)
-- @param channel Channel to query.
function irc:topic(channel)
--- Send a raw line of IRC to the server.
-- @param msg Line to be sent, excluding newline characters.
--- Send a IRC message to the server.
-- @param msg Message or raw line to send, excluding newline characters.
-- @param ... Format parameters for <code>msg</code>, with <code>string.format</code> semantics. [optional]
function irc:send(msg, ...)
--- Send a message to a channel or user.
-- @param target Nick or channel to send to.
-- @param message Message to send.
-- @param message Message text.
function irc:sendChat(target, message)
--- Send a notice to a channel or user.
-- @param target Nick or channel to send to.
-- @param message Notice to send.
-- @param message Notice text.
function irc:sendNotice(target, message)
--- Join a channel.
-- @param channel Channel to join.
-- @param key Channel password. [optional]
-- @param key Channel key. [optional]
function irc:join(channel, key)
--- Leave a channel.
@ -123,6 +123,16 @@ function irc:shutdown()
-- @name Connection
-- @class table
--- Class representing an IRC message.
-- <ul>
-- <li><code>sender</code></li>
-- <li><code>command</code></li>
-- <li><code>args</code></li>
-- <li><code>toRFC1459()</code></li>
-- </ul>
-- @name Message
-- @class table
--- List of hooks you can use with irc:hook. The parameter list describes the parameters passed to the callback function.
-- <ul>
-- <li><code>PreRegister(connection)</code>Useful for CAP commands and SASL.</li>