diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-02 22:55:20 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-02 22:55:20 +0000 |
commit | 94adc5ef62521524e0cf0239ad18bf42b57d39cc (patch) | |
tree | 9f05fa971d656242865b146c35a7b9457734d5f2 /src/irc | |
parent | ba69fc3ae722ff6db1e8a7ca8e9c821b8ec04026 (diff) | |
download | irssi-94adc5ef62521524e0cf0239ad18bf42b57d39cc.zip |
/SET hostname didn't affect until restart.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@282 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/server-setup.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/irc/core/server-setup.c b/src/irc/core/server-setup.c index c7c39236..603d7142 100644 --- a/src/irc/core/server-setup.c +++ b/src/irc/core/server-setup.c @@ -357,11 +357,16 @@ static void read_servers(void) } } -void servers_setup_init(void) +static void read_settings(void) { + g_free_and_null(source_host_ip); + source_host_ok = FALSE; - source_host_ip = NULL; + get_source_host_ip(); +} +void servers_setup_init(void) +{ settings_add_int("server", "server_reconnect_time", 300); settings_add_str("server", "hostname", ""); settings_add_bool("server", "skip_motd", FALSE); @@ -377,15 +382,22 @@ void servers_setup_init(void) settings_add_str("ircproxy", "proxy_string", "CONNECT %s %d"); init_userinfo(); - read_servers(); + + source_host_ip = NULL; + read_settings(); + + signal_add("setup changed", (SIGNAL_FUNC) read_settings); signal_add("setup reread", (SIGNAL_FUNC) read_servers); } void servers_setup_deinit(void) { + g_free_not_null(source_host_ip); + while (setupservers != NULL) setupserver_destroy(setupservers->data); + signal_remove("setup changed", (SIGNAL_FUNC) read_settings); signal_remove("setup reread", (SIGNAL_FUNC) read_servers); } |