28/02/2012, 10:54
Je te conseille de mettre des putlog un peu partout, pour vérifier que l'eggdrop reçoit bien les notices serveur, que les regexp marchent bien et que tu obtiens bien ce que tu veux.
Exemple:
Exemple:
tcl
proc rawgline {from keyword arg} {
global gline
putlog "Got a notice: $arg"
if {[string match "*Client exiting at*User has been banned from nomserv.org*" $arg]} {
putlog "got a gline exit"
set linegl [lindex $arg 8]
regsub -all {^([^<]+)!.*} $linegl "\\1" nickexit
regsub -all {.*@([^<]+)$} $linegl "\\1" hostexit
set gline($nickexit) $hostexit
putlog "In file: [list array set gline [array get gline]]"
set datagl [open "./gline.db" "w"]
puts $datagl [list array set gline [array get gline]]
close $datagl
}