mIRC Homepage

The bot does not kick change nick in idle. Help me

Posted By: Kendy

The bot does not kick change nick in idle. Help me - 10/06/20 04:37 PM

This code kicks idle #help very well, as follows: the Bot will kick someone into the room if there is no Op or Voice, they will be kicked after 2 minutes. If in 2 minutes nickname says something, then my Bot will count 2 minutes again from the beginning. However, this section has no kicked & banned for the case when people enter the room and change their nick to another nickname, they will not be kicked by the bot. I want the bot to kick people who change their nick in the room help in 2 minutes. If they change their nick but then say something, then the Bot will count time for 2 minutes again from the beginning.Can someone write more code for me? I sincerely thanks
Here is code (i copy in this forum)
Code
#idlekicker on
on *@!:JOIN:#help: if !$timer($nick) { $+(.timer,$nick) 1 120 KickIdler $chan $nick }
on *:TEXT:*:#help: $+(.timer,$nick) 1 120 KickIdler $chan $nick
alias KickIdler if ($me isop $1) && ($2 isreg $1) { ban -ku120 $1-2 2 Don't hang your nick here. Come back after 2 minutes if you really need help! Thank you }
#idlekicker end

Posted By: SLiprockS

Re: The bot does not kick change nick in idle. Help me - 04/07/20 09:56 PM

Hi Kendy,

I tried to code it with my little knowledge. Hope this is surve the purpose. Please test it and let me know.

Quote
#idlekicker on
on *@!:JOIN:#help: if !$timer($nick) { $+(.timer,$nick) 1 120 KickIdler $chan $nick }
on *:TEXT:*:#help: $+(.timer,$nick) 1 120 KickIdler $chan $nick
on 1:NICK: {
if ($nick isop $chan) { return }
var %nick = $newnick, %cn = $comchan(%nick,0)
while (%cn) {
if (*#help* iswm $comchan(%nick,%cn)) { $+(.timer,%nick) 1 120 KickIdler #help %nick }
dec %cn
}
}
alias KickIdler { if ($me isop $1) && ($2 isreg $1) { ban -ku120 $1-2 2 Don't hang your nick here. Come back after 2 minutes if you really need help! Thank you }
}

#idlekicker end


Thanks
© 2020 mIRC Discussion Forums