mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Still some event_received() fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2397 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f8114c834f
commit
a3ccfb08d4
@ -760,12 +760,19 @@ static void event_received(IRC_SERVER_REC *server, const char *data)
|
|||||||
ptr = strchr(data, ' ');
|
ptr = strchr(data, ' ');
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
ptr++;
|
||||||
|
|
||||||
/* param1 param2 ... :last parameter */
|
/* param1 param2 ... :last parameter */
|
||||||
args = g_strdup(ptr);
|
if (*ptr == ':') {
|
||||||
ptr = strstr(args, " :");
|
/* only one parameter */
|
||||||
if (ptr != NULL)
|
args = g_strdup(ptr+1);
|
||||||
g_memmove(ptr+1, ptr+2, strlen(ptr+1));
|
} else {
|
||||||
|
args = g_strdup(ptr);
|
||||||
|
ptr = strstr(args, " :");
|
||||||
|
if (ptr != NULL)
|
||||||
|
g_memmove(ptr+1, ptr+2, strlen(ptr+1));
|
||||||
|
}
|
||||||
|
|
||||||
printtext(server, NULL, MSGLEVEL_CRAP, "%s", args);
|
printtext(server, NULL, MSGLEVEL_CRAP, "%s", args);
|
||||||
g_free(args);
|
g_free(args);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user