mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-07-20 16:40:26 +02:00
Compare commits
1 Commits
motd_savin
...
hook_conne
Author | SHA1 | Date | |
---|---|---|---|
b07166345a |
11
handlers.lua
11
handlers.lua
@ -90,17 +90,6 @@ handlers["432"] = needNewNick
|
|||||||
-- ERR_NICKNAMEINUSE
|
-- ERR_NICKNAMEINUSE
|
||||||
handlers["433"] = needNewNick
|
handlers["433"] = needNewNick
|
||||||
|
|
||||||
-- RPL_MOTDSTART
|
|
||||||
handlers["375"] = function(o, prefix, info)
|
|
||||||
o.motd = ""
|
|
||||||
end
|
|
||||||
|
|
||||||
-- RPL_MOTD
|
|
||||||
handlers["372"] = function(o, prefix, nick, line)
|
|
||||||
-- MOTD lines have a "- " prefix, strip it.
|
|
||||||
o.motd = o.motd..line:sub(3)..'\n'
|
|
||||||
end
|
|
||||||
|
|
||||||
--NAMES list
|
--NAMES list
|
||||||
handlers["353"] = function(o, prefix, me, chanType, channel, names)
|
handlers["353"] = function(o, prefix, me, chanType, channel, names)
|
||||||
if o.track_users then
|
if o.track_users then
|
||||||
|
4
init.lua
4
init.lua
@ -66,8 +66,8 @@ meta_preconnect.unhook = meta.unhook
|
|||||||
function meta:invoke(name, ...)
|
function meta:invoke(name, ...)
|
||||||
local hooks = self.hooks[name]
|
local hooks = self.hooks[name]
|
||||||
if hooks then
|
if hooks then
|
||||||
for id,f in pairs(hooks) do
|
for id, f in pairs(hooks) do
|
||||||
if f(...) then
|
if f(self, ...) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user