author | Myhailo Danylenko <isbear@ukrpost.net> |
Sat, 05 Mar 2016 18:34:12 +0200 | |
changeset 149 | be2ec9bb72df |
parent 58 | aa3376776cf2 |
permissions | -rw-r--r-- |
58
aa3376776cf2
Cosmetic comment changes
Myhailo Danylenko <isbear@ukrpost.net>
parents:
33
diff
changeset
|
1 |
|
8 | 2 |
-- SAVING URLS TO FILE |
3 |
||
4 |
hooks_d['hook-message-in'].urls = |
|
5 |
function ( args ) |
|
6 |
for url in args.message:gmatch ( "https?://[%w%p]+" ) do |
|
33 | 7 |
fd = io.open ( main.fileoption 'lua_url_file', "a" ) |
8 | 8 |
if fd then |
9 |
fd:write ( url .. "\n" ) |
|
10 |
fd:close () |
|
11 |
else |
|
12 |
print 'Cannot open urls log file' |
|
13 |
end |
|
14 |
end |
|
15 |
end |
|
16 |
||
17 |
-- vim: se ts=4: -- |