Skip to content
This repository was archived by the owner on Jun 5, 2018. It is now read-only.

Commit e64377c

Browse files
committed
so eggdrop logformat changed... thanks semarie for pointing that out
1 parent 898448f commit e64377c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rhonfeed.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'Dec': '12',
2828
}
2929

30-
ircline = '\[(\d{2}:\d{2})\]\s+<([^\>]+)>\s+(.+)'
30+
ircline = '\[(\d{2}:\d{2})(:\d{2})?\]\s+<([^\>]+)>\s+(.+)'
3131

3232
es = Elasticsearch()
3333

@@ -84,8 +84,10 @@ def process_file(filename, date):
8484
r = re.search(ircline, line.rstrip())
8585
if r:
8686
time = r.group(1)
87-
nick = r.group(2)
88-
pl = r.group(3)
87+
if r.group(2): # eggdrop logs changed two years ago
88+
time = '{0}{1}'.format(time, r.group(2))
89+
nick = r.group(3)
90+
pl = r.group(4)
8991
source = process_ircline(date, time, nick, pl)
9092
action = {
9193
'_index': es_idx,

0 commit comments

Comments
 (0)