From 12a82a3daf3cd010f473d82b2fcd03c99435c58f Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 14 Aug 2003 11:28:48 +0000 Subject: Public thoughts --- vchat-protocol.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'vchat-protocol.c') 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); static void anonlogin (unsigned char *message); static void topicinfo (unsigned char *message); static void pubaction (unsigned char *message); +static void pubthoughts (unsigned char *message); static void idleprompt (unsigned char *message); static void topicchange (unsigned char *message); static void pmnotsent (unsigned char *message); @@ -387,6 +388,26 @@ pubaction (unsigned char *message) writechan (tmpstr); } +/* parse and handle an thought string + * format: 124 %s %s + * vars: %s nick + * %s thought */ +static void +pubthoughts (unsigned char *message) +{ + unsigned char *nick = NULL, *thoughts = NULL; + nick = strchr (message, ' '); + nick[0] = '\0'; + nick++; + + thoughts = strchr (nick, ' '); + thoughts[0] = '\0'; + thoughts++; + + snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBTHOUGHT),nick,thoughts); + writechan (tmpstr); +} + /* parse and handle an idle message * format: 305 * vars: %s message */ -- cgit v1.2.3