mIRC Home    About    Download    Register    News    Help

Print Thread
The bot does not kick change nick in idle. Help me #267352 10/06/20 04:37 PM
Joined: May 2020
Posts: 18
K
Kendy Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2020
Posts: 18
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


Last edited by Kendy; 10/06/20 04:39 PM.
Re: The bot does not kick change nick in idle. Help me [Re: Kendy] #267439 04/07/20 09:56 PM
Joined: Oct 2005
Posts: 34
S
SLiprockS Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 34
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