Last active
August 29, 2015 14:23
-
-
Save tomoe-mami/86bd0831cf4427e34cb2 to your computer and use it in GitHub Desktop.
Weechat script for adding ${info:time} variable into eval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Example usage: /eval -n ${info:time,%Y-%m-%d %H:%M:%S} | |
function info_cb(_, _, format) | |
return os.date(format) | |
end | |
if weechat.register("info_time", "singalaut", "0.1", "WTFPL", "Add ${info:time} variable to eval", "", "") then | |
weechat.hook_info( | |
"time", | |
"Gets current date and time info", | |
"Format of date/time (see `man strftime`)", | |
"info_cb", "") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment