diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-26 15:06:30 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-26 15:06:30 +0200 |
commit | 1ecc6b3155f6acb9fcc1c0049792408be4f9e913 (patch) | |
tree | 3caa2f49e104ba2f0969e2e721a4fe770869af92 /src/common | |
parent | e38c6696cddae354c709d1bb9011b27365aa108c (diff) |
g_str_hash is inconsistent, always recalculate it
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/servlist.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/common/servlist.c b/src/common/servlist.c index 6529b162..1a262a54 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -992,6 +992,7 @@ servlist_load_defaults (void) { int i = 0, j = 0; ircnet *net = NULL; + guint def_hash = g_str_hash ("freenode"); while (1) { @@ -1000,21 +1001,27 @@ servlist_load_defaults (void) net = servlist_net_add (def[i].network, def[i].host, FALSE); net->encoding = strdup (IRC_DEFAULT_CHARSET); if (def[i].channel) + { net->autojoin = strdup (def[i].channel); + } if (def[i].charset) { free (net->encoding); net->encoding = strdup (def[i].charset); } - /* 0x8e1b96f7 = ChatJunkies, 0xa45aae6e = freenode */ - if (g_str_hash (def[i].network) == 0xa45aae6e) + if (g_str_hash (def[i].network) == def_hash) + { prefs.hex_gui_slist_select = j; + } j++; - } else + } + else { servlist_server_add (net, def[i].host); if (!def[i+1].host && !def[i+1].network) + { break; + } } i++; } |