Fix newest additions to keepnick module and write the test for it.

Fix the documentation.

See #1324 and #1325
This commit is contained in:
Alexey Sokolov
2016-10-04 01:20:47 +01:00
parent ac0048cc01
commit 222ae86fcc
3 changed files with 58 additions and 27 deletions
+15 -18
View File
@@ -41,27 +41,24 @@ class CIRCNetwork;
/**
* Here is a small explanation of how messages on IRC work, and how you can use
* this class to get useful information from the parsed message. The output varies
* greatly and this advice may not apply to every message type, but this will hopefully
* help you understand how it works more accurately.
* this class to get useful information from the parsed message. The output
* varies greatly and this advice may not apply to every message type, but this
* will hopefully help you understand how it works more accurately.
*
* @time=some-timestamp :server.network.net 366 something #channel :End of /NAMES list.
* tags nick 0 1 2 3
* @t=some-tag :server.network.net 366 something #channel :End of /NAMES list.
* tags nick cmd 0 1 2
*
* `tags` is the IRCv3 tags associated with the message, obtained with GetTag(s).
* the @time tag can also be obtained with GetTime(), some messages have other tags
* with them. Tags may not always be present. Refer to IRCv3 for documentation on tags.
* `nick` is the sender, which can be obtained with GetNick()
* `0` is the command, which is obtained via GetCommand, or with GetParam(0)
* `1` is the first parameter index, which usually includes a sender or a recipient.
* `2` is the target or element the message is about.
* `3` is likely to contain the message, but this may very per message type.
* - `tags` is the IRCv3 tags associated with the message, obtained with
* GetTag("t"). the @time tag can also be obtained with GetTime(), some
* messages have other tags with them. Tags may not always be present. Refer
* to IRCv3 for documentation on tags.
* - `nick` is the sender, which can be obtained with GetNick()
* - `cmd` is command, which is obtained via GetCommand()
* - `0`, `1`, ... are parameters, available via GetParam(n), which removes the
* leading colon (:). If you don't want to remove the colon, use GetParams().
*
* When using GetParam (which corresponds to the numbers given above), ZNC will remove the leading colon (:),
* this is not true for GetParams.
*
* For certain events, like a PRIVMSG, convienience commands like GetChan() and GetNick() are available,
* this is not true for all CMessage extensions.
* For certain events, like a PRIVMSG, convienience commands like GetChan() and
* GetNick() are available, this is not true for all CMessage extensions.
*/
class CMessage {
public: