1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

A few extra checks.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@524 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-07-23 14:07:20 +00:00 committed by cras
parent 24b56c77ec
commit bd9e53a5d2
2 changed files with 9 additions and 4 deletions

View File

@ -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;
}

View File

@ -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,