From a2cc9e73ca3e5d20418ccc2922576b9f5cee357e Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 5 Jul 2017 22:46:48 +0200 Subject: weechat: Update for id in history --- weechat/net.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'weechat') diff --git a/weechat/net.c b/weechat/net.c index 1618130..bab7f3a 100644 --- a/weechat/net.c +++ b/weechat/net.c @@ -273,8 +273,9 @@ void net_handle_recv(int fd,const char *msg){ } const char *roomp=p+1; p=strchr(roomp,' '); - const char *q,*r; - if(p==NULL||(q=strchr(p+1,' '))==NULL||(r=strchr(q+1,' '))==NULL){ + const char *q,*r,*s; + if(p==NULL||(q=strchr(p+1,' '))==NULL||(r=strchr(q+1,' '))==NULL + ||(s=strchr(r+1,' '))==NULL){ fprintf(debugf,"net_handle_recv: not enough arguments to 'history_message' <%s>\n",msg); return; } @@ -283,9 +284,13 @@ void net_handle_recv(int fd,const char *msg){ i64 usernamelen=q-usernamep; const char *stampp=q+1; i64 stamplen=r-stampp; - const char *textp=r+1; + const char *msgidp=r+1; + i64 msgidlen=s-msgidp; + const char *textp=s+1; i64 textlen=msglen-(textp-msg); + (void)msgidp; (void)msgidlen; + struct net_response res; res.type=NET_HISTORY; const char *endp; -- cgit v1.2.3-70-g09d2