diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-11 20:05:10 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-11 20:05:10 +0000 |
commit | 24d51a694b1bca50f60048f90e44f9dbcb03428c (patch) | |
tree | d09ae9389733cc0b878b6f9570092a1ffd21f5ee /src/core | |
parent | f044505694b9aac050e7d8aaf391beffeb753db1 (diff) | |
download | irssi-24d51a694b1bca50f60048f90e44f9dbcb03428c.zip |
/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
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/rawlog.c | 9 |
1 files 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); } |