fix the quit command

This commit is contained in:
Nedko Arnaudov 2011-03-28 04:20:13 +03:00
parent 717688ccd5
commit 2ee3b5e5fb
2 changed files with 6 additions and 5 deletions

View File

@ -108,6 +108,11 @@ function control_channel:outgoing_message(command)
commands['quit'] =
function()
interface.disconnect()
for name,location in pairs(locations.registry) do
if location.connection then self:disconnect_location(name) end
end
return true -- break the receive loop
end
@ -175,7 +180,7 @@ end
function outgoing_message(msg, receiver)
channel = get_channel(receiver)
if channel then channel:outgoing_message(msg, receiver) return end
if channel then return channel:outgoing_message(msg, receiver) end
end
function join(location, channel_name, nick)

View File

@ -58,10 +58,6 @@ local function remote_client_thread(peer)
function(channel)
peer.accept_disable()
for name,location in pairs(locations.registry) do
if location.connection then self:disconnect_location(name) end
end
irc.send_to_peer(peer, 'ERROR :Goodbye!')
end,
}