on *:NICK:{
if ($ulevel($address($newnick,5)) == 6) { kick $newnick Attempting to use a profanity nick is forbidden in this channel }
else { halt }
}
Your code makes my head hurt.
on *:NICK:{
if ($ulevel($address($newnick,5)) == 6) {
$ulevel doesn't take parameters. You should write:
on *:NICK:{
if $ulevel == 6 { kick $newnick Attempting to use a profanity nick is forbidden in this channel }
else { halt }
}
Or even faster:
on 6:NICK:{
kick $newnick Attempting to use a profanity nick is forbidden in this channel
}
Also, why is the halt even there? It means it would prevent all other nick changes from displaying. Unless that is what you were after, remove the entire else line.
Secondly, you need to issue a channel to kick the user in. NICK is not a channel event, so $chan is equal to $null. You must either check a specific channel, or check all channels the user is on.
If you only want to monitor a specific channel:
on 6:nick: {
if $newnick ison #mychannel {
if $me isop #mychannel || $me ishop #mychannel {
kick #mychannel $newnick blah blah blah
}
}
}
If you want to monitor all channels you are on:
on 6:nick: {
var %chancount 0
while %chancount < $comchan($newnick, 0) {
var %chancount $calc(%chancount + 1)
var %chan $comchan($newnick, %chancount)
if $me isop %chan || $me ishop %chan {
kick %chan $newnick blah blah blah
}
}
}