A few checks to check that we really are dealing with IRC servers.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@465 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-07-15 13:08:39 +00:00 committed by cras
commit 5707140938
6 changed files with 26 additions and 4 deletions

View file

@ -159,6 +159,9 @@ IRC_SERVER_REC *irc_server_connect(IRC_SERVER_CONNECT_REC *conn)
static void sig_connected(IRC_SERVER_REC *server)
{
if (!irc_server_check(server))
return;
server->eventtable = g_hash_table_new((GHashFunc) g_istr_hash, (GCompareFunc) g_istr_equal);
server->eventgrouptable = g_hash_table_new((GHashFunc) g_direct_hash, (GCompareFunc) g_direct_equal);
server->cmdtable = g_hash_table_new((GHashFunc) g_istr_hash, (GCompareFunc) g_istr_equal);
@ -196,6 +199,9 @@ static void sig_disconnected(IRC_SERVER_REC *server)
{
int chans;
if (!irc_server_check(server))
return;
/* close all channels */
chans = server_remove_channels(server);
@ -235,6 +241,9 @@ static void server_cmd_timeout(IRC_SERVER_REC *server, GTimeVal *now)
char *cmd;
int len, ret, add_rawlog;
if (!irc_server_check(server))
return;
if (server->cmdcount == 0 && server->cmdqueue == NULL)
return;