author | Myhailo Danylenko <isbear@ukrpost.net> |
Sun, 22 Mar 2009 04:14:36 +0200 | |
changeset 49 | 95f3bf77c598 |
parent 33 | db5396037b43 |
child 58 | aa3376776cf2 |
permissions | -rw-r--r-- |
8 | 1 |
-- SAVING URLS TO FILE |
2 |
||
3 |
hooks_d['hook-message-in'].urls = |
|
4 |
function ( args ) |
|
5 |
for url in args.message:gmatch ( "https?://[%w%p]+" ) do |
|
33 | 6 |
fd = io.open ( main.fileoption 'lua_url_file', "a" ) |
8 | 7 |
if fd then |
8 |
fd:write ( url .. "\n" ) |
|
9 |
fd:close () |
|
10 |
else |
|
11 |
print 'Cannot open urls log file' |
|
12 |
end |
|
13 |
end |
|
14 |
end |
|
15 |
||
16 |
-- vim: se ts=4: -- |