diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-14 02:02:08 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-14 02:02:08 +0000 |
commit | 6ec7d152b064d343f541c24410385f4db836de07 (patch) | |
tree | 991e74c00f7edd6fdced999ec6560852f4f14c07 /src/irc | |
parent | 6774b4b30f0b43fc7c9942bf4f4f39c953b5ef6e (diff) | |
download | irssi-6ec7d152b064d343f541c24410385f4db836de07.zip |
Fixed some asserts.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2244 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index f5aea94c..64ce4af6 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -50,6 +50,10 @@ void irc_send_cmd_full(IRC_SERVER_REC *server, const char *cmd, char str[513]; int len; + g_return_if_fail(server != NULL); + g_return_if_fail(cmd != NULL); + if (server->disconnected) return; + len = strlen(cmd); server->cmdcount++; @@ -108,9 +112,6 @@ void irc_send_cmd(IRC_SERVER_REC *server, const char *cmd) GTimeVal now; int send_now; - g_return_if_fail(cmd != NULL); - if (server == NULL) return; - g_get_current_time(&now); send_now = g_timeval_cmp(&now, &server->wait_cmd) >= 0 && (server->cmdcount < server->max_cmds_at_once || @@ -139,7 +140,6 @@ void irc_send_cmdv(IRC_SERVER_REC *server, const char *cmd, ...) void irc_send_cmd_now(IRC_SERVER_REC *server, const char *cmd) { g_return_if_fail(cmd != NULL); - if (server == NULL) return; irc_send_cmd_full(server, cmd, TRUE, TRUE, FALSE); } |