administration.lua:
Version 1.2. Rules are now in a table. Automatic migration until 1.4. New command: changerule /changerule <i> <rule> Change a rule. Use "/changerule 1 --" to delete rule 1. ahelp: Only displays commands the user can use. Attempts to PM before group. desc: Now displays group's flags and their "short" descs. Attemps to PM before group. antisquig: Second RTL character added to, and Strict. dilbert.lua: New command: dilbert /dilbert [YYYY-MM-DD] Returns a date's or the latest Dilbert strip. Caches strips so they are not downloaded more than once. gImages.lua & youtube.lua: Title now displayed for links. The "zero-width non-joiner" was a stupid idea. help.lua: Commands now properly bulleted. utilities.lua: download_file(): Now allows for specification of a path instead of /tmp/.
This commit is contained in:
@ -187,14 +187,12 @@ download_file = function(url, filename)
|
||||
|
||||
if code ~= 200 then return false end
|
||||
|
||||
filename = filename or os.time()
|
||||
filename = filename or '/tmp/' .. os.time()
|
||||
|
||||
local file_path = '/tmp/'..filename
|
||||
|
||||
file = io.open(file_path, 'w+')
|
||||
local file = io.open(filename, 'w+')
|
||||
file:write(table.concat(respbody))
|
||||
file:close()
|
||||
|
||||
return file_path
|
||||
return filename
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user