From 24d51a694b1bca50f60048f90e44f9dbcb03428c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 11 Nov 2001 20:05:10 +0000 Subject: [PATCH] /RAWLOG commands should work immediately after connection to server was accepted (ie. don't wait for 001 event from server). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1982 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/rawlog.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/rawlog.c b/src/core/rawlog.c index 138875ea..d605ccb5 100644 --- a/src/core/rawlog.c +++ b/src/core/rawlog.c @@ -170,7 +170,8 @@ static void cmd_rawlog(const char *data, SERVER_REC *server, void *item) static void cmd_rawlog_save(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); - if (server == NULL || !server->connected) cmd_return_error(CMDERR_NOT_CONNECTED); + if (server == NULL || server->rawlog == NULL) + cmd_return_error(CMDERR_NOT_CONNECTED); if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS); rawlog_save(server->rawlog, data); @@ -180,7 +181,8 @@ static void cmd_rawlog_save(const char *data, SERVER_REC *server) static void cmd_rawlog_open(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); - if (server == NULL || !server->connected) cmd_return_error(CMDERR_NOT_CONNECTED); + if (server == NULL || server->rawlog == NULL) + cmd_return_error(CMDERR_NOT_CONNECTED); if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS); rawlog_open(server->rawlog, data); @@ -190,7 +192,8 @@ static void cmd_rawlog_open(const char *data, SERVER_REC *server) static void cmd_rawlog_close(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); - if (server == NULL || !server->connected) cmd_return_error(CMDERR_NOT_CONNECTED); + if (server == NULL || server->rawlog == NULL) + cmd_return_error(CMDERR_NOT_CONNECTED); rawlog_close(server->rawlog); }