don't die on a bad filename to dcc.send()
This commit is contained in:
parent
21a59a8e39
commit
6980eab676
@ -174,7 +174,12 @@ function send(nick, filename, port)
|
||||
base.assert(err, msg)
|
||||
base.assert(sock:listen(1))
|
||||
local ip = misc._ip_str_to_int(irc.get_ip())
|
||||
local file = base.assert(io.open(filename))
|
||||
local file, err = io.open(filename)
|
||||
if not file then
|
||||
irc_debug._warn(err)
|
||||
sock:close()
|
||||
return
|
||||
end
|
||||
local size = file:seek("end")
|
||||
file:seek("set")
|
||||
irc._register_socket(sock, 'r',
|
||||
|
Loading…
x
Reference in New Issue
Block a user