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/irc/core | |
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/irc/core')
-rw-r--r-- | src/irc/core/irc-channels.c | 2 | ||||
-rw-r--r-- | src/irc/core/irc-channels.h | 3 | ||||
-rw-r--r-- | src/irc/core/irc-commands.c | 8 | ||||
-rw-r--r-- | src/irc/core/irc-nicklist.h | 2 | ||||
-rw-r--r-- | src/irc/core/irc-servers-setup.c | 2 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 19 |
6 files changed, 10 insertions, 26 deletions
diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c index 72a5d8ec..ba44a7d5 100644 --- a/src/irc/core/irc-channels.c +++ b/src/irc/core/irc-channels.c @@ -61,7 +61,7 @@ IRC_CHANNEL_REC *irc_channel_create(IRC_SERVER_REC *server, return rec; } -void sig_channel_destroyed(IRC_CHANNEL_REC *channel) +static void sig_channel_destroyed(IRC_CHANNEL_REC *channel) { if (!IS_IRC_CHANNEL(channel)) return; diff --git a/src/irc/core/irc-channels.h b/src/irc/core/irc-channels.h index aaaf73a7..9a331082 100644 --- a/src/irc/core/irc-channels.h +++ b/src/irc/core/irc-channels.h @@ -37,6 +37,7 @@ IRC_CHANNEL_REC *irc_channel_create(IRC_SERVER_REC *server, IRC_CHANNEL(channel_find(SERVER(server), name)) /* Join to channels. `data' contains channels and channel keys */ -void irc_channels_join(IRC_SERVER_REC *server, const char *data, int automatic); +void irc_channels_join(IRC_SERVER_REC *server, + const char *data, int automatic); #endif diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 4b75e24e..860e4737 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -86,10 +86,10 @@ IRC_SERVER_REC *irccmd_options_get_server(const char *cmd, return (IRC_SERVER_REC *) server; } -static IRC_SERVER_REC *connect_server(const char *data) +static SERVER_REC *connect_server(const char *data) { SERVER_CONNECT_REC *conn; - IRC_SERVER_REC *server; + SERVER_REC *server; GHashTable *optlist; char *addr, *portstr, *password, *nick, *ircnet, *host; void *free_arg; @@ -126,7 +126,7 @@ static IRC_SERVER_REC *connect_server(const char *data) memcpy(conn->own_ip, &ip, sizeof(IPADDR)); } } - server = irc_server_connect(IRC_SERVER_CONNECT(conn)); + server = server_connect(conn); cmd_params_free(free_arg); return server; @@ -202,7 +202,7 @@ static void cmd_server(const char *data, IRC_SERVER_REC *server) cmd_disconnect("* Changing server", server); } - server = connect_server(data); + server = IRC_SERVER(connect_server(data)); if (*addr == '+' || server == NULL || (ircnet != NULL && server->connrec->chatnet != NULL && g_strcasecmp(ircnet, server->connrec->chatnet) != 0)) { diff --git a/src/irc/core/irc-nicklist.h b/src/irc/core/irc-nicklist.h index d5cf78d3..e4172b89 100644 --- a/src/irc/core/irc-nicklist.h +++ b/src/irc/core/irc-nicklist.h @@ -9,7 +9,7 @@ void irc_nicklist_deinit(void); /* Remove all "extra" characters from `nick'. Like _nick_ -> nick */ char *irc_nick_strip(const char *nick); -/* Check is `msg' is meant for `nick'. */ +/* Check if `msg' is meant for `nick'. */ int irc_nick_match(const char *nick, const char *msg); #endif diff --git a/src/irc/core/irc-servers-setup.c b/src/irc/core/irc-servers-setup.c index 7ccf29e3..73a3fa9b 100644 --- a/src/irc/core/irc-servers-setup.c +++ b/src/irc/core/irc-servers-setup.c @@ -1,5 +1,5 @@ /* - servers-setup.c : irssi + irc-servers-setup.c : irssi Copyright (C) 1999-2000 Timo Sirainen diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index aeb3070d..3f9593b8 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -113,25 +113,8 @@ IRC_SERVER_REC *irc_server_connect(IRC_SERVER_CONNECT_REC *conn) server = g_new0(IRC_SERVER_REC, 1); server->chat_type = module_get_uniq_id("IRC SERVER", 0); - server->connrec = conn; - if (conn->port <= 0) conn->port = 6667; - if (conn->username == NULL || *conn->username == '\0') { - g_free_not_null(conn->username); - - conn->username = g_get_user_name(); - if (*conn->username == '\0') conn->username = "-"; - conn->username = g_strdup(conn->username); - } - if (conn->realname == NULL || *conn->realname == '\0') { - g_free_not_null(conn->realname); - - conn->realname = g_get_real_name(); - if (*conn->realname == '\0') conn->realname = "-"; - conn->realname = g_strdup(conn->realname); - } - - server->nick = g_strdup(conn->nick); + if (server->connrec->port <= 0) server->connrec->port = 6667; server->cmd_queue_speed = conn->cmd_queue_speed > 0 ? conn->cmd_queue_speed : settings_get_int("cmd_queue_speed"); |