# HG changeset patch # User Kim Alvefur # Date 1296773857 -3600 # Node ID febfb59502fcd93e34d3bf2b3f14a883ab5d0f3c # Parent b92c81f8aed4e16a2a2b618d274fc3809377db29 mod_ircd: Add QUIT command. diff -r b92c81f8aed4 -r febfb59502fc mod_ircd/mod_ircd.lua --- a/mod_ircd/mod_ircd.lua Thu Feb 03 18:00:39 2011 +0100 +++ b/mod_ircd/mod_ircd.lua Thu Feb 03 23:57:37 2011 +0100 @@ -136,6 +136,11 @@ session.send(":"..session.host.." 001 "..session.nick.." :Welcome to XMPP via the "..session.host.." gateway "..session.nick); end +function commands.USER(session, params) + -- FIXME + -- Empty command for now +end + local joined_mucs = {}; function commands.JOIN(session, channel) if not session.nick then @@ -165,6 +170,7 @@ body = "\1ACTION ".. body:sub(5) .. "\1" end session.send(":"..nick.." PRIVMSG "..channel.." :"..body); + --FIXME PM's probably won't work end end); end @@ -226,6 +232,13 @@ session.send(":"..session.host.." 324 "..session.nick.." "..channel.." +J"); end +function commands.QUIT(session, message) + session.send("ERROR :Closing Link: "..session.nick); + for _, room in pairs(session.rooms) do + room:leave(message); + end + session:close(); +end function commands.RAW(session, data) --c:send(data)