mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Accept CAPs with an empty value (KEY=)
This commit is contained in:
parent
b0b40be82e
commit
260733475c
@ -91,19 +91,13 @@ static gboolean parse_cap_name(char *name, char **key, char **val)
|
|||||||
if (eq == NULL) {
|
if (eq == NULL) {
|
||||||
*key = g_strdup(name);
|
*key = g_strdup(name);
|
||||||
*val = NULL;
|
*val = NULL;
|
||||||
return TRUE;
|
|
||||||
/* Some values are in a KEY=VALUE form, parse them */
|
/* Some values are in a KEY=VALUE form, parse them */
|
||||||
} else if (eq[1] != '\0') {
|
} else {
|
||||||
*key = g_strndup(name, (gsize)(eq - name));
|
*key = g_strndup(name, (gsize)(eq - name));
|
||||||
*val = g_strdup(eq + 1);
|
*val = g_strdup(eq + 1);
|
||||||
return TRUE;
|
|
||||||
/* If the string ends after the '=' consider the value
|
|
||||||
* as invalid */
|
|
||||||
} else {
|
|
||||||
*key = NULL;
|
|
||||||
*val = NULL;
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *address)
|
static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *address)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user