on *:kick:#: {
if (You have been kicked isin $1-) {
;Stores the kick reason in %reason variable
set -l %reason $1-
;Takes the last line from the log and tokenizes it
tokenize 32 $line(@kick,$line(@kick,0))
;#1 Checks if the time between the last event and current time is less than 10 seconds
;#2 checks if knick is same as last time
;#3 checks if nick is same as last time
if ($calc($ctime -$ctime($1-5)) < 10) && ($6 == $knick) && ($12 == $nick) {
;Replaces the last line with a new line that contains the new channel name (#chan1,#chan2,#chan3...)
rline @kick $line(@kick,0) $fulldate $knick was kicked from $10 $+ , $+ # by $nick reason: %reason
}
else {
;Normal new line
aline @kick $fulldate $knick was kicked from # by $nick reason: %reason
}
}
}