The code pheonix posted for you has several problems which will cause it to behave erratic, and most definately not the way you would want it to.

$read(filename,s,word) searches filename for a line beginning with word, and then return the rest of the line. Since there is nothing else, the $read statement returns nothing, so the if statement will always return $false, or with the ! in place, it will always return $true.

Other problem in pheonix' code is that he uses $nick in his code and not $knick. $nick is the nickname of the OP who kicked out the user, and I doubt you'd want to tag him as abusive. $knick is the user that got kicked.

You could fix this by simply doing /write filename $knick $1- ($1- being the user's kick reason). Then when you use $read(filename,s,$nick) the $read statement will return something, and the if statement pheonix posted would work the way you want it to. This however still provides a big problem when your text file gets big. mIRC's file routines aren't the fastest, and the bigger the file gets, the longer it takes.

Also, pheonix only kicks the user. Can you imagine what happens if the user checked rejoin channels when kicked in his mIRC options? I can....

Did you ever try adding the user ti the userlist?

Code:
on *:KICK:#: {
[color:green]  ; might wanna add a check to make sure you're not screwing yourself with this[/color]
[color:green]  ; note I am adding the channel -- wouldn't want the user to get[/color]
[color:green]  ; kicked in channel A and then warned in channel B[/color]
  if ($knick != $me) guser WARNEDUSER $knick 3 $chan
}
[color:green]; add the @ so it only triggers when you're an op. [/color]
[color:green]; wouldn't want this to do it's stuff when you're not an op...[/color]
on @WARNEDUSER:JOIN:#: {
[color:green]  ; check if it's the right channel ![/color]
  if ($ulist($address($nick,3)).info == $chan) {
    msg $chan The user $nick has been kicked before for violating channel rules!
  }
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius