]> git.lizzy.rs Git - luairc.git/commitdiff
callback shouldn't be just "dcc" since it only happens on DCC SEND
authorjluehrs2 <jluehrs2@uiuc.edu>
Wed, 5 Sep 2007 01:28:22 +0000 (20:28 -0500)
committerjluehrs2 <jluehrs2@uiuc.edu>
Wed, 5 Sep 2007 01:28:22 +0000 (20:28 -0500)
src/irc.lua
test/test.lua

index 40df5439c3e1f22cd336663f5dad6a3dbd3e9da2..d8a18803e883123305d65a316fe36fe0c5e13cf1 100644 (file)
@@ -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
index 0d5d6aba840502376837ed26c2e99f3e9a1f31c9..e2910ee9309ee95fff7c5e4196d06442bdabd101 100644 (file)
@@ -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"}