diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-07-05 22:46:48 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-07-05 22:46:48 +0200 |
commit | a2cc9e73ca3e5d20418ccc2922576b9f5cee357e (patch) | |
tree | 04ea03734665923331092a81170aa7509bc03e65 | |
parent | e767f8f625728352c89ecfb059741b468d325dc6 (diff) |
weechat: Update for id in history
-rw-r--r-- | weechat/net.c | 11 |
1 files changed, 8 insertions, 3 deletions
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; |