mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 07:02:12 +02:00
Don't set the usermode field if blank
Fixes FS#919
This commit is contained in:
parent
fb6375c6f9
commit
cfff402fe6
2 changed files with 13 additions and 4 deletions
|
|
@ -35,10 +35,13 @@ void ircnet_create(IRC_CHATNET_REC *rec)
|
|||
|
||||
static void sig_chatnet_read(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
|
||||
{
|
||||
char *value;
|
||||
|
||||
if (!IS_IRC_CHATNET(rec))
|
||||
return;
|
||||
|
||||
rec->usermode = g_strdup(config_node_get_str(node, "usermode", NULL));
|
||||
value = config_node_get_str(node, "usermode", NULL);
|
||||
rec->usermode = (value != NULL && *value != '\0') ? g_strdup(value) : NULL;
|
||||
|
||||
rec->max_cmds_at_once = config_node_get_int(node, "cmdmax", 0);
|
||||
rec->cmd_queue_speed = config_node_get_int(node, "cmdspeed", 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue