1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Add an IRC mod wich works... (very rare, like Mithril...)

This commit is contained in:
BUISSON-DEBON Quentin
2015-08-19 01:24:48 +02:00
parent 8c637bac28
commit 43faf2b5bc
9 changed files with 27 additions and 61 deletions

View File

@ -185,7 +185,7 @@ function meta:think()
self.lastThought = socket.gettime()
end
local handlers = rawget(_G, "handlers")
local handlers = handlers
function meta:handle(msg)
local handler = irc.handlers[msg.command]

View File

@ -103,12 +103,6 @@ function msg_meta:fromRFC1459(line)
local pos
self.command, pos = line:match("(%S+)()")
-- /MFF BEGIN
if not pos then
minetest.log("error", "[IRC] This crash message was intended to see the value of a breaking variable. line = " .. (line or "nil"))
return
end
-- /MFF END (Mg|06/01/2015)
line = line:sub(pos)
self.args = self.args or {}

View File

@ -13,7 +13,7 @@ end
function set:add(connection)
local socket = connection.socket
insert(self.sockets, socket)
self.connections[socket] = connection
insert(self.connections, connection)
end
@ -32,13 +32,13 @@ end
function set:select()
local read, write, err = select(self.sockets, nil, self.timeout)
if read then
for k, socket in ipairs(read) do
read[k] = self.connections[socket]
end
end
return read, err
end