mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 03:36:47 -04:00
Make actions work in the IRC client again.. (#2544)
disables printing CTCPs for now.. as this makes actions appear twice. better fix?
This commit is contained in:
parent
0f92e372fd
commit
4cc635e182
@ -217,7 +217,7 @@ 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)
|
||||
--print("[" .. name(prefix) .. "] CTCP " .. ctcp)
|
||||
local ctcp, param = ctcp:match("^(%S+) ?(.-)$")
|
||||
ctcp = ctcp:upper()
|
||||
if ctcp == "TIME" then
|
||||
@ -229,17 +229,15 @@ local function handleCommand(prefix, command, args, message)
|
||||
elseif ctcp == "PING" then
|
||||
sock:write("NOTICE " .. name(prefix) .. " :\001PING " .. param .. "\001\r\n")
|
||||
sock:flush()
|
||||
elseif ctcp == "ACTION" then
|
||||
print("[" .. args[1] .. "] * " .. name(prefix) .. string.gsub(string.gsub(message, "\001ACTION", ""), "\001", ""))
|
||||
end
|
||||
else
|
||||
if string.find(message, nick) then
|
||||
computer.beep()
|
||||
end
|
||||
if string.find(message, "\001ACTION") then
|
||||
print("[" .. args[1] .. "] " .. name(prefix) .. string.gsub(string.gsub(message, "\001ACTION", ""), "\001", ""))
|
||||
else
|
||||
print("[" .. args[1] .. "] " .. name(prefix) .. ": " .. message)
|
||||
end
|
||||
end
|
||||
elseif command == "NOTICE" then
|
||||
print("[NOTICE] " .. message)
|
||||
elseif command == "ERROR" then
|
||||
|
Loading…
x
Reference in New Issue
Block a user