I'm working on an auto voice/devoice script snippet for an mIRC bot when a nick is lower case it'll voice the nick. Then when the nick is changed and it's upper it should devoice people or if there's an upper nick to lower case nick it voices them. My issue is it won't recognize nick changes to voice or devoice a user.
#lowercheck on
alias -l _c return #
alias startwithlower {
if ( $1 ) {
return $islower($left($regsubex($$1,/\W+/g,$null),1))
}
else return $false
}
on @*:JOIN:#Tristram_Halls:{
if ( $startwithlower($nick) == $true ) {
mode $_c +v $nick
}
}
on @*:NICK:{
if ( ( $startwithlower($newnick) == $false ) && ( $newnick !isvoice $_c ) ) {
mode $_c -v $newnick
}
elseif ( ( $startwithlower($newnick) == $true ) && ( $newnick isvoice $_c ) ) {
mode $_c +v $newnick
}
}