From 78d18dd18ee29a07ce128b4a0b707bc9585ed89f Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 4 Sep 2007 20:28:22 -0500 Subject: callback shouldn't be just "dcc" since it only happens on DCC SEND --- src/irc.lua | 2 +- test/test.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/irc.lua b/src/irc.lua index 40df543..d8a1880 100644 --- a/src/irc.lua +++ b/src/irc.lua @@ -513,7 +513,7 @@ end function ctcp_handlers.on_dcc(from, to, message) local type, argument, address, port, size = base.unpack(misc._split(message, " ", nil, '"', '"')) if type == "SEND" then - if callback("dcc", from, to, argument, address, port, size) then + if callback("dcc_send", from, to, argument, address, port, size) then dcc._accept(argument, address, port) end elseif type == "CHAT" then diff --git a/test/test.lua b/test/test.lua index 0d5d6ab..e2910ee 100644 --- a/test/test.lua +++ b/test/test.lua @@ -216,9 +216,9 @@ local function on_devoice(chan, from, nick) end irc.register_callback("devoice", on_devoice) -local function on_dcc() +local function on_dcc_send() return true end -irc.register_callback("dcc", on_dcc) +irc.register_callback("dcc_send", on_dcc_send) irc.connect{network = "irc.freenode.net", nick = "doylua", pass = "doylua"} -- cgit v1.2.3-54-g00ecf