mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2021
Posts: 2
M
Mak453 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jul 2021
Posts: 2
Hello everybody!

Here is the situation: On the net where I am a setting has been set to prevent the complete cleaning of bans at once by the operators of a channel (a kind of protection against "mass unban"), so if I try to unban more than a certain number of nicks, in a certain period of time, I would be automatically banned ...

And this is the help I need; it is possible to create an unban system that works like this: using a custom command, the timer starts unban a certain number of nicks at a time (10-15, to be set as desired), and then stops for a few seconds (even these maybe you can set as you like), and then start unban again 10-15 nicks continuing with this unban / stop procedure until the ban list is empty?

Unfortunately, I am not able to create it, so I thank those who would like to give me a hand!

Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
I have created a little code for you that works via alias command "/rb". Try this, this is probably exactly what you would like to see.
This the code removes all bans (with a time limit and the number of bans) found on the executable channel.

In the "rb_set" alias, you can tune your own code settings:

    %rb_num = sets the number of bans to be removed at a time in one line.
    %rb_time = sets the amount of time in seconds after which it is necessary to repeat the removal of bans.

Code
# Author: Epic (epicnet@mail.ru, http://epicnet.ru)
# Description: Removes bans with a time and quantity limit
-----------------------------------------------------
alias rb_set {
  %rb_num = 10
  %rb_time = 5
}
on *:INPUT:#: if ($1 == /rb) .hadd -m rb chan $chan
alias rb {
  rb_set | var %ch $hget(rb,chan)
  var %i 1 | while (%i <= %rb_num) {
    if ($ibl(%ch,%i) == $null) .break
    else var %cb = %cb $ibl(%ch,%i)
    inc %i
  }
  if (%rb_num > 0) .mode %ch $+(-,$str(b,%rb_num)) %cb
  if ($ibl(%ch,0) > 0 && %rb_time > 0) { .timerRB 1 %rb_time rb }
}


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2021
Posts: 2
M
Mak453 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jul 2021
Posts: 2
First of all, thank you so much for your help!

What can I say ... I just tried it and yes, it was exactly what I was looking for! It works great and exactly how it was meant to be.

Thanks again for your help and trouble, great job man laugh


Link Copied to Clipboard