mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
24b56c77ec
commit
bd9e53a5d2
@ -239,7 +239,8 @@ static void dcc_chat_connect(DCC_REC *dcc)
|
|||||||
{
|
{
|
||||||
g_return_if_fail(dcc != NULL);
|
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 */
|
/* already sent a chat request / already chatting */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -256,13 +256,17 @@ static void dcc_resume_send(DCC_REC *dcc, int port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define is_resume_type(type) \
|
#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) \
|
#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) \
|
#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,
|
static void dcc_ctcp_msg(const char *data, IRC_SERVER_REC *server,
|
||||||
const char *sender, const char *sendaddr,
|
const char *sender, const char *sendaddr,
|
||||||
|
Loading…
Reference in New Issue
Block a user