mirror of
https://github.com/moparisthebest/hexchat
synced 2025-01-10 21:48:26 -05:00
g_str_hash is inconsistent, always recalculate it
This commit is contained in:
parent
e38c6696cd
commit
1ecc6b3155
@ -992,6 +992,7 @@ servlist_load_defaults (void)
|
|||||||
{
|
{
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
ircnet *net = NULL;
|
ircnet *net = NULL;
|
||||||
|
guint def_hash = g_str_hash ("freenode");
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@ -1000,21 +1001,27 @@ servlist_load_defaults (void)
|
|||||||
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
||||||
net->encoding = strdup (IRC_DEFAULT_CHARSET);
|
net->encoding = strdup (IRC_DEFAULT_CHARSET);
|
||||||
if (def[i].channel)
|
if (def[i].channel)
|
||||||
|
{
|
||||||
net->autojoin = strdup (def[i].channel);
|
net->autojoin = strdup (def[i].channel);
|
||||||
|
}
|
||||||
if (def[i].charset)
|
if (def[i].charset)
|
||||||
{
|
{
|
||||||
free (net->encoding);
|
free (net->encoding);
|
||||||
net->encoding = strdup (def[i].charset);
|
net->encoding = strdup (def[i].charset);
|
||||||
}
|
}
|
||||||
/* 0x8e1b96f7 = ChatJunkies, 0xa45aae6e = freenode */
|
if (g_str_hash (def[i].network) == def_hash)
|
||||||
if (g_str_hash (def[i].network) == 0xa45aae6e)
|
{
|
||||||
prefs.hex_gui_slist_select = j;
|
prefs.hex_gui_slist_select = j;
|
||||||
|
}
|
||||||
j++;
|
j++;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
servlist_server_add (net, def[i].host);
|
servlist_server_add (net, def[i].host);
|
||||||
if (!def[i+1].host && !def[i+1].network)
|
if (!def[i+1].host && !def[i+1].network)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user