Mercurial > prosody-modules
comparison mod_ircd/mod_ircd.lua @ 464:7e6524555ab0
mod_ircd: WiP trash removed.
author | Marco Cirillo <maranda@lightwitch.org> |
---|---|
date | Tue, 01 Nov 2011 14:39:06 +0000 |
parents | 3bf6f102f1cc |
children |
comparison
equal
deleted
inserted
replaced
463:7d6a05f94941 | 464:7e6524555ab0 |
---|---|
106 function irc_listener.ondisconnect(conn, error) | 106 function irc_listener.ondisconnect(conn, error) |
107 local session = sessions[conn]; | 107 local session = sessions[conn]; |
108 for _, room in pairs(session.rooms) do | 108 for _, room in pairs(session.rooms) do |
109 room:leave("Disconnected"); | 109 room:leave("Disconnected"); |
110 end | 110 end |
111 if jids[session.full_jid] then jids[session.full_jid] = nil end | 111 jids[session.full_jid] = nil |
112 if nicks[session.nick] then nicks[session.nick] = nil end | 112 nicks[session.nick] = nil |
113 if sessions[conn] then sessions[conn] = nil end | 113 sessions[conn] = nil |
114 end | 114 end |
115 | 115 |
116 function commands.NICK(session, nick) | 116 function commands.NICK(session, nick) |
117 if session.nick then | 117 if session.nick then |
118 session.send(":"..muc_server.." 484 * "..nick.." :I'm afraid I can't let you do that, "..nick); | 118 session.send(":"..muc_server.." 484 * "..nick.." :I'm afraid I can't let you do that, "..nick); |