mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-28 07:25:35 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into MC1.7
Conflicts: build.properties
This commit is contained in:
commit
a6a6c5e009
@ -1,6 +1,6 @@
|
||||
minecraft.version=1.7.2
|
||||
forge.version=10.12.1.1061
|
||||
oc.version=1.2.8
|
||||
oc.version=1.2.9
|
||||
ccl.version=1.0.0.62
|
||||
fmp.version=1.0.0.250
|
||||
maven.url=file:///var/www/users/fnuecke/maven.cil.li
|
@ -2,6 +2,7 @@
|
||||
-- http://tools.ietf.org/html/rfc2812
|
||||
|
||||
local component = require("component")
|
||||
local computer = require("computer")
|
||||
|
||||
if not component.isAvailable("internet") then
|
||||
io.stderr:write("OpenIRC requires an Internet Card to run!\n")
|
||||
@ -173,7 +174,14 @@ local function handleCommand(prefix, command, args, message)
|
||||
sock:write("NOTICE " .. name(prefix) .. " :" .. message .. "\001\r\n")
|
||||
sock:flush()
|
||||
end
|
||||
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
|
||||
elseif command == "NOTICE" then
|
||||
print("[NOTICE] " .. message)
|
||||
elseif command == "ERROR" then
|
||||
@ -368,7 +376,11 @@ local result, reason = pcall(function()
|
||||
local line = term.read(history)
|
||||
if sock and line and line ~= "" then
|
||||
line = text.trim(line)
|
||||
if line:lower():sub(1,4) == "/me " then
|
||||
print("[" .. (target or "?") .. "] You " .. string.gsub(line, "/me ", ""), true)
|
||||
else
|
||||
print("[" .. (target or "?") .. "] me: " .. line, true)
|
||||
end
|
||||
if line:lower():sub(1, 5) == "/msg " then
|
||||
local user, message = line:sub(6):match("^(%S+) (.+)$")
|
||||
if message then
|
||||
|
Loading…
x
Reference in New Issue
Block a user