[hackers] [ii] fix parsing of JOIN messages for certain servers, thanks van Kanakarakis || Nico Golde
changeset: 97:2fd831556669
tag: tip
user: Nico Golde <nion_AT_suckless.org>
date: Thu Jun 28 15:41:57 2012 +0200
files: CHANGES ii.c
description:
fix parsing of JOIN messages for certain servers, thanks van Kanakarakis
diff -r 83d2a1798523 -r 2fd831556669 CHANGES
--- a/CHANGES Sat Jun 16 17:00:51 2012 +0200
+++ b/CHANGES Thu Jun 28 15:41:57 2012 +0200
_AT_@ -2,6 +2,8 @@
- -k now specifies an environment variable that contains the
server key. This behaviour has been changed in order to not
expose the password in the process list.
+ - Fix parsing of JOIN messages for certain servers.
+ Thanks Ivan Kanakarakis!
1.6 (2011-01-31):
- fix regression introduced for handling unknown commands
diff -r 83d2a1798523 -r 2fd831556669 ii.c
--- a/ii.c Sat Jun 16 17:00:51 2012 +0200
+++ b/ii.c Thu Jun 28 15:41:57 2012 +0200
_AT_@ -347,13 +347,9 @@
} else if(!strncmp("ERROR", argv[TOK_CMD], 6))
snprintf(message, PIPE_BUF, "-!- error %s", argv[TOK_TEXT] ? argv[TOK_TEXT] : "unknown");
else if(!strncmp("JOIN", argv[TOK_CMD], 5)) {
- if(argv[TOK_TEXT] != NULL){
- p = strchr(argv[TOK_TEXT], ' ');
- if(p)
- *p = 0;
- }
- argv[TOK_CHAN] = argv[TOK_TEXT];
- snprintf(message, PIPE_BUF, "-!- %s(%s) has joined %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_TEXT]);
+ if (argv[TOK_TEXT] != NULL)
+ argv[TOK_CHAN] = argv[TOK_TEXT];
+ snprintf(message, PIPE_BUF, "-!- %s(%s) has joined %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_CHAN]);
} else if(!strncmp("PART", argv[TOK_CMD], 5)) {
snprintf(message, PIPE_BUF, "-!- %s(%s) has left %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_CHAN]);
} else if(!strncmp("MODE", argv[TOK_CMD], 5))
Received on Thu Jun 28 2012 - 15:42:11 CEST
This archive was generated by hypermail 2.3.0
: Thu Jun 28 2012 - 15:48:06 CEST