[Telepathy-commits] [telepathy-idle/master] Add documentation for IRC message spec
Jonathon Jongsma
jonathon.jongsma at collabora.co.uk
Fri Feb 13 15:35:11 PST 2009
If you haven't worked with it in a little while, it can be a little challenging
to remember what the different characters mean for the IRC message spec. This
just adds a small comment describing each of the format letters so that it's
easier to add new IRC message types in the future.
---
src/idle-parser.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/idle-parser.c b/src/idle-parser.c
index 5b5214b..6a1972f 100644
--- a/src/idle-parser.c
+++ b/src/idle-parser.c
@@ -59,6 +59,17 @@ struct _MessageSpec {
IdleParserMessageCode code;
};
+/* Message spec key:
+ * 'I' - ignore token
+ * 'r' - token is a room name
+ * 'c' - token is a contact (nick)
+ * 'C' - token is a contact (nick) with mode characters
+ * 'v' - following token is repeated multiple times
+ * 's' - token is a string
+ * ':' - Consume all remaining tokens as a single string prefixed by ':'
+ * (e.g. ':this is a message string')
+ * '.' - Same as ':', but optional
+ */
static const MessageSpec message_specs[] = {
{"PING", "Is", IDLE_PARSER_CMD_PING},
--
1.5.6.5
More information about the telepathy-commits
mailing list