mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 12:53:42 +02:00
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:
parent
2afaadb2d7
commit
5707140938
6 changed files with 26 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue