aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 17:42:10 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 17:42:10 -0500
commit86181fed18da97e22425ee087320a044a56baaf5 (patch)
tree93398a523b278e4ba399d77bc6ffcd375a249f6d /src
parente31b3aadf5ae7d59d0c976f0e3c1d18dd9a3a872 (diff)
downloadluairc-86181fed18da97e22425ee087320a044a56baaf5.tar.gz
luairc-86181fed18da97e22425ee087320a044a56baaf5.zip
document message module
Diffstat (limited to 'src')
-rw-r--r--src/irc/message.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/irc/message.lua b/src/irc/message.lua
index 27698d8..d6f5837 100644
--- a/src/irc/message.lua
+++ b/src/irc/message.lua
@@ -1,3 +1,5 @@
+---
+-- Implementation of IRC server message parsing
-- initialization {{{
local base = _G
local constants = require 'irc.constants'
@@ -9,10 +11,27 @@ local string = require 'string'
local table = require 'table'
-- }}}
+---
+-- This module contains parsing functions for IRC server messages.
module 'irc.message'
-- local functions {{{
--- parse() - parse a server command {{{
+-- parse {{{
+--
+-- Parse a server command.
+-- @param str Command to parse
+-- @return Table containing the parsed message. It contains:
+-- <ul>
+-- <li><i>from:</i> The source of this message, in full usermask
+-- form (nick!user@host) for messages originating
+-- from users, and as a hostname for messages from
+-- servers</li>
+-- <li><i>command:</i> The command sent, in name form if possible,
+-- otherwise as a numeric code</li>
+-- <li><i>args:</i> Array of strings corresponding to the arguments
+-- to the received command</li>
+--
+-- </ul>
function parse(str)
-- low-level ctcp quoting {{{
str = ctcp.low_dequote(str)