Mercurial > cabal
comparison sources/parser.cpp @ 7:8d54d9fdeca3
fixed comments
removed daemonization verbose
strings' size() -> length()
| author | Vlad Glagolev <enqlave@gmail.com> |
|---|---|
| date | Sun, 03 Feb 2008 21:29:41 +0300 |
| parents | 9be05a31b7f9 |
| children |
comparison
equal
deleted
inserted
replaced
| 6:9be05a31b7f9 | 7:8d54d9fdeca3 |
|---|---|
| 1 /** | 1 /** parser.cpp (2007-05-13) |
| 2 * parser.cpp (2007-05-13) | |
| 3 * | 2 * |
| 4 * -- CABAL -- irc commands parser | 3 * -- CABAL -- irc commands parser |
| 5 * | 4 * |
| 6 * Copyright (c) 2007-2008 Vlad Glagolev <enqlave@gmail.com> | 5 * Copyright (c) 2007-2008 Vlad Glagolev <enqlave@gmail.com> |
| 7 * All rights reserved. | 6 * All rights reserved. |
| 34 char *who = strtok(line, " "); | 33 char *who = strtok(line, " "); |
| 35 char *what = strtok(NULL, " "); | 34 char *what = strtok(NULL, " "); |
| 36 char *where = strtok(NULL, " "); | 35 char *where = strtok(NULL, " "); |
| 37 char *data = strtok(NULL, "\n"); | 36 char *data = strtok(NULL, "\n"); |
| 38 | 37 |
| 39 if (strchr(who, '!')) { | 38 if (strchr(who, '!')) |
| 40 id = strchr(who, '!'); | 39 id = strchr(who, '!'), id = id.substr(1); |
| 41 id = id.substr(1); | |
| 42 } | |
| 43 | 40 |
| 44 if (strtok(who, "!")) | 41 if (strtok(who, "!")) |
| 45 name = strtok(who, "!"); | 42 name = strtok(who, "!"); |
| 46 | 43 |
| 47 action = what; | 44 action = what; |
