mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -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, ' ');
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
ptr++;
|
||||
|
||||
/* param1 param2 ... :last parameter */
|
||||
args = g_strdup(ptr);
|
||||
ptr = strstr(args, " :");
|
||||
if (ptr != NULL)
|
||||
g_memmove(ptr+1, ptr+2, strlen(ptr+1));
|
||||
if (*ptr == ':') {
|
||||
/* only one parameter */
|
||||
args = g_strdup(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);
|
||||
g_free(args);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user