Code: Select all
bind pub - {??} lookup_string
proc lookup_string {nick host handle chan args} {
putquick "NOTICE $nick :Looking up: $args"
set chanmod [string trimleft $chan #]
set out [exec /bin/bash -c 'grep -i $args /home/eggdrop/eggdrop/logs/[string tolower $chanmod].log*']
set arr [split $out \n]
foreach line $arr {
putquick "NOTICE $nick :$line"
}
}
putlog "FlashBack loaded."
Code: Select all
<ADMINBOT> [19:35] Tcl error [lookup_string]: -i: -c: line 1: unexpected EOF while looking for matching `''
<ADMINBOT> -i: -c: line 2: syntax error: unexpected end of file
Anyone have any ideas to make this work? Or... If i cant do that i could have 1 log file, which I know how to, but is there a way to change the timestamps to include the ddMMMyy date along with the time? I didnt see an option for that in the conf.