diff options
Diffstat (limited to 'vchat-protocol.c')
| -rwxr-xr-x | vchat-protocol.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vchat-protocol.c b/vchat-protocol.c index d04d9b0..5113365 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c | |||
| @@ -61,6 +61,7 @@ static void login (unsigned char *message); | |||
| 61 | static void anonlogin (unsigned char *message); | 61 | static void anonlogin (unsigned char *message); |
| 62 | static void topicinfo (unsigned char *message); | 62 | static void topicinfo (unsigned char *message); |
| 63 | static void pubaction (unsigned char *message); | 63 | static void pubaction (unsigned char *message); |
| 64 | static void pubthoughts (unsigned char *message); | ||
| 64 | static void idleprompt (unsigned char *message); | 65 | static void idleprompt (unsigned char *message); |
| 65 | static void topicchange (unsigned char *message); | 66 | static void topicchange (unsigned char *message); |
| 66 | static void pmnotsent (unsigned char *message); | 67 | static void pmnotsent (unsigned char *message); |
| @@ -387,6 +388,26 @@ pubaction (unsigned char *message) | |||
| 387 | writechan (tmpstr); | 388 | writechan (tmpstr); |
| 388 | } | 389 | } |
| 389 | 390 | ||
| 391 | /* parse and handle an thought string | ||
| 392 | * format: 124 %s %s | ||
| 393 | * vars: %s nick | ||
| 394 | * %s thought */ | ||
| 395 | static void | ||
| 396 | pubthoughts (unsigned char *message) | ||
| 397 | { | ||
| 398 | unsigned char *nick = NULL, *thoughts = NULL; | ||
| 399 | nick = strchr (message, ' '); | ||
| 400 | nick[0] = '\0'; | ||
| 401 | nick++; | ||
| 402 | |||
| 403 | thoughts = strchr (nick, ' '); | ||
| 404 | thoughts[0] = '\0'; | ||
| 405 | thoughts++; | ||
| 406 | |||
| 407 | snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBTHOUGHT),nick,thoughts); | ||
| 408 | writechan (tmpstr); | ||
| 409 | } | ||
| 410 | |||
| 390 | /* parse and handle an idle message | 411 | /* parse and handle an idle message |
| 391 | * format: 305 | 412 | * format: 305 |
| 392 | * vars: %s message */ | 413 | * vars: %s message */ |
