summaryrefslogtreecommitdiff
path: root/crystal
diff options
context:
space:
mode:
Diffstat (limited to 'crystal')
-rw-r--r--crystal/name-command.cr5
1 files changed, 3 insertions, 2 deletions
diff --git a/crystal/name-command.cr b/crystal/name-command.cr
index 3d0878f..fa1a0f9 100644
--- a/crystal/name-command.cr
+++ b/crystal/name-command.cr
@@ -3,6 +3,7 @@ require "json"
require "pretty_print"
require "xml"
require "inotify"
+require "time"
home = Path["~/"].expand.to_s
@@ -71,9 +72,9 @@ def commanderroot_changelog( uid )
end
-log = File.open(home + "irclogs/twitch/#" + channel + ".log".to_s)
+log = File.open(home + "irclogs/twitch/#" + channel + "/" + Time.local.to_s("%Y-%m-%d") + ".log".to_s)
log.seek(log.size)
-watcher = Inotify.watch(home + "irclogs/twitch/#" + channel + ".log".to_s) do | event |
+watcher = Inotify.watch(home + "irclogs/twitch/#" + channel + "/" + Time.local.to_s("%Y-%m-%d") + ".log".to_s) do | event |
if event.type.to_s == "MODIFY"
log.read_string( log.size - log.pos ).each_line do | string |
# FIXME: support old names? might get confusing with e.g. reverse5612