summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-23 14:07:20 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-23 14:07:20 +0000
commitbd9e53a5d23979b9879e482213678f31d5c60314 (patch)
tree573262d65ba75ae1ca00439016396409fbc25271 /src
parent24b56c77eca48f2724dfa55b36e359c688123f7e (diff)
downloadirssi-bd9e53a5d23979b9879e482213678f31d5c60314.zip
A few extra checks.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@524 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/irc/dcc/dcc-chat.c3
-rw-r--r--src/irc/dcc/dcc-files.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c
index 173d48b1..ddac4c98 100644
--- a/src/irc/dcc/dcc-chat.c
+++ b/src/irc/dcc/dcc-chat.c
@@ -239,7 +239,8 @@ static void dcc_chat_connect(DCC_REC *dcc)
{
g_return_if_fail(dcc != NULL);
- if (dcc->addrstr[0] == '\0' || dcc->starttime != 0) {
+ if (dcc->addrstr[0] == '\0' ||
+ dcc->starttime != 0 || dcc->handle != -1) {
/* already sent a chat request / already chatting */
return;
}
diff --git a/src/irc/dcc/dcc-files.c b/src/irc/dcc/dcc-files.c
index e367f23f..a214a4f8 100644
--- a/src/irc/dcc/dcc-files.c
+++ b/src/irc/dcc/dcc-files.c
@@ -256,13 +256,17 @@ static void dcc_resume_send(DCC_REC *dcc, int port)
}
#define is_resume_type(type) \
- (g_strcasecmp(type, "RESUME") == 0 || g_strcasecmp(type, "ACCEPT") == 0)
+ (g_strcasecmp(type, "RESUME") == 0 || \
+ g_strcasecmp(type, "ACCEPT") == 0)
#define is_resume_ok(type, dcc) \
- (g_strcasecmp(type, "RESUME") != 0 || ((dcc)->type == DCC_TYPE_SEND && (dcc)->transfd == 0))
+ (g_strcasecmp(type, "RESUME") != 0 || \
+ ((dcc)->type == DCC_TYPE_SEND && (dcc)->transfd == 0))
#define is_accept_ok(type, dcc) \
- (g_strcasecmp(type, "ACCEPT") != 0 || ((dcc)->type == DCC_TYPE_GET && (dcc)->get_type == DCC_GET_RESUME))
+ (g_strcasecmp(type, "ACCEPT") != 0 || \
+ ((dcc)->type == DCC_TYPE_GET && \
+ (dcc)->get_type == DCC_GET_RESUME && (dcc)->handle == -1))
static void dcc_ctcp_msg(const char *data, IRC_SERVER_REC *server,
const char *sender, const char *sendaddr,