Just out of curiosity, why are you using a txt file? mIRC has a userlist feature which is more than adequate for this.
Code:
[color:green]; code to add a user[/color]
[color:green]; syntax: !blist <nick> <reason>[/color]
on [color:blue]@[/color]10:TEXT:!blist*:#: {
  [color:green]; This checks if the specified nick is on the channel[/color]
  if ($2 ison #) {
    [color:green]; if so, it adds him[/color]
    [color:green]; format: *!*identd@*.host.domain #channel reason[/color]
    .guser BLIST $2 3 $chan $3-
    [color:green]; and of course it removes him, kicking with the specified reason[/color]
    ban -k # $2 3 $3-
  }
}
[color:blue] [/color]
[color:green]; When a user matching a banned address joins[/color]
on @BLIST:JOIN:#: {
  [color:green]; check if he is banned on the channel he joined in[/color]
  if ($gettok($ulist($address($nick,3)).info,1,32) == $chan) {
    [color:green]; if so, then remove him with the pre-specified reason[/color]
    ban -k # $nick 3 $gettok($ulist($address($nick,3)).info,2-,32) 
  }
}

note: these two events are only triggered when you are opped. The second is pointless if you are not, but if you want to allow people to blacklist users even when you are not opped, remove the blue @. I am also assuming you work with 6.12 here.

note2: if you rather not rely on the userlist (it occasionally gets wiped, although you can of course add code to the first event to auto-back it up when a user gets added), you might wanna consider using a hash table (same but), or a ini file.


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