on @*:join:#:{
set %chan $chan
if (guest* iswm $nick) {
.notice $nick Guest nicks not permitted. You have one minute to change your nick or be kicked
$+(.timer,$nick) 1 60 ban -ku $chan $nick
}
}
on *:nick:{
if $timer($nick) && (guest* !iswm $newnick) {
$+(.timer,$nick) off
}
elseif (guest* iswm $newnick) {
.notice $nick You were told Guest nicks are not permitted. You now have $timer($nick).secs seconds to get a non-guest nick
$+(.timer,$newnick) 1 $timer($nick).secs ban -ku %chan $newnick
$+(.timer,$nick) off
}
if (guest* iswm $newnick) {
.notice $nick Guest nicks are not permitted. You have one minute to change your nick or be kicked
$+(.timer,$newnick) 1 60 ban -ku %chan $newnick
}
}
When the person joins the channel, their nick is checked, and if it's a guest nick, they are given a warning and a timer for that nick is set for one minute.
If they change their nick, and try to use another guest nick, then they're given a second warning, and told the number of seconds that were remaining in the first timer. This is how long they have left to get a non-guest nick.
If their nick is changed to a guest nick, then it's the same as if they joined the channel with a guest nick.