diff options
author | Timo Sirainen <cras@irssi.org> | 2000-08-27 23:07:01 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-08-27 23:07:01 +0000 |
commit | 3e2f19b030cadaa0f2a032fd138641064838431d (patch) | |
tree | b1640b4ebc44bf0fde083381705aa0da8ee24d98 /src/core/servers.c | |
parent | af59f544921a49b9984dd591077dc1ade106c567 (diff) | |
download | irssi-3e2f19b030cadaa0f2a032fd138641064838431d.zip |
updates
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@634 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/servers.c')
-rw-r--r-- | src/core/servers.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/servers.c b/src/core/servers.c index f6f353d6..b8168f05 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -206,6 +206,23 @@ int server_start_connect(SERVER_REC *server) MODULE_DATA_INIT(server); server->type = module_get_uniq_id("SERVER", 0); + server->nick = g_strdup(server->connrec->nick); + if (server->connrec->port <= 0) server->connrec->port = 6667; + if (server->connrec->username == NULL || *server->connrec->username == '\0') { + g_free_not_null(server->connrec->username); + + server->connrec->username = g_get_user_name(); + if (*server->connrec->username == '\0') server->connrec->username = "-"; + server->connrec->username = g_strdup(server->connrec->username); + } + if (server->connrec->realname == NULL || *server->connrec->realname == '\0') { + g_free_not_null(server->connrec->realname); + + server->connrec->realname = g_get_real_name(); + if (*server->connrec->realname == '\0') server->connrec->realname = "-"; + server->connrec->realname = g_strdup(server->connrec->realname); + } + if (pipe(server->connect_pipe) != 0) { g_warning("server_connect(): pipe() failed."); return FALSE; |