set yourchan "#channel"
bind join - * badident
proc badident {nick uhost hand chan} {
if {![isbotnick $nick] && [botisop $chan]} {
if {"$uhost" == "*!*~*@*"} {
putserv "MODE $yourchan +b $uhost"
putserv "KICK $yourchan $nick :Sorry but you have no identd. Ident must be enabled to join, try opening port 113 on your router to your PC and reconnect to a server!"
}
}
}
set noident(exempt) "fmo|omf"
set noident(bantime) 10; # Ban time in minutes. (I see no reason to ban for mere seconds)
set noident(kickmsg) "You need identd enabled to join this channel."
# I don't see the point in some lame counter so let's not include it.
setudef flag noident
bind join -|- * noident:join
proc noident:join {nick host hand chan} {
global noident
if {![botisop $chan] || ![channel get $channel noident] || [matchattr $hand $noident($exempt) $chan] || ![string match ~*@* $host]} { return 0 }
putserv "MODE $chan +b [set host *![string map [list "~" "*"] $host]]"
putserv "KICK $chan $nick :$noident(kickmsg)"
timer $noidentd(bantime) [list pushmode $chan -b $host]
}
Also, You would find that tossers code would not have worked very well as he doesn't even check the ident.