author | Myhailo Danylenko <isbear@ukrpost.net> |
Sun, 08 Mar 2009 01:03:22 +0200 | |
changeset 18 | ba74a9aadaf4 |
parent 8 | fc9060b9b7cc |
child 31 | 54957980a83a |
permissions | -rw-r--r-- |
-- SAVING URLS TO FILE url_file = main.config_file ( 'urls.log' ) hooks_d['hook-message-in'].urls = function ( args ) for url in args.message:gmatch ( "https?://[%w%p]+" ) do fd = io.open ( url_file, "a" ) if fd then fd:write ( url .. "\n" ) fd:close () else print 'Cannot open urls log file' end end end -- vim: se ts=4: --