mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 01:39:36 -04:00
Readd the printing of a CTCP if it wasn't handled.
No I haven't tested this, what are you talking about?
This commit is contained in:
parent
7f71953540
commit
62e38f40df
@ -217,9 +217,8 @@ local function handleCommand(prefix, command, args, message)
|
||||
elseif command == "PRIVMSG" then
|
||||
local ctcp = message:match("^\1(.-)\1$")
|
||||
if ctcp then
|
||||
--print("[" .. name(prefix) .. "] CTCP " .. ctcp)
|
||||
local ctcp, param = ctcp:match("^(%S+) ?(.-)$")
|
||||
ctcp = ctcp:upper()
|
||||
local orig_ctcp, param = ctcp:match("^(%S+) ?(.-)$")
|
||||
ctcp = orig_ctcp:upper()
|
||||
if ctcp == "TIME" then
|
||||
sock:write("NOTICE " .. name(prefix) .. " :\001TIME " .. os.date() .. "\001\r\n")
|
||||
sock:flush()
|
||||
@ -231,6 +230,9 @@ local function handleCommand(prefix, command, args, message)
|
||||
sock:flush()
|
||||
elseif ctcp == "ACTION" then
|
||||
print("[" .. args[1] .. "] * " .. name(prefix) .. string.gsub(string.gsub(message, "\001ACTION", ""), "\001", ""))
|
||||
else
|
||||
-- Here we print the CTCP message if it was unhandled...
|
||||
print("[" .. name(prefix) .. "] CTCP " .. orig_ctcp)
|
||||
end
|
||||
else
|
||||
if string.find(message, nick) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user