mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 13
P
pilot1 Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Apr 2003
Posts: 13
I currently have this auto deop script:

alias adduser set %deoplist %deoplist $$1-
alias deluser set %deoplist $remtok(%deoplist,$$1,1,32)
on @*:op:#theshire:{
if $istok(%deoplist,$opnick,32) { mode # -o $opnick }
if $istok(%deoplist,$opnick,32) { notice $nick Do NOT op $opnick }
if $istok(%deoplist,$opnick,32) { notice $nick Any repeated attempts to do so will result in you being deopped. }
}

With the repeated attempts... thing on one line like it should be - not two.

The problem is the "repeated attempts" thing is just a bluff.
I leave mIRC on 24/7, so I can't always be there to manually deop/kick/warn the person that opped someone on the list.

How can I make it so that after someone on the %deoplist is opped 3 times in 10 minutes whoever opped them is automatically deoped, and if it's done 5 times in 10 minutes the person opping them along with the person getting opped is banned?
The chanel is #theshire if that helps.

Thanks!

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
First of all the repeated istok's are uneccisary. Secondly, if your using a variable, that cannot hold a lot of names just an fyi. But anyways, on with the <s>show</s> code!

Code:
alias adduser {
  set %deoplist %deoplist $$1-
}
alias deluser {
  set %deoplist $remtok(%deoplist,$$1,1,32)
}
on @*:op:#theshire:{ 
  /inc -u600 %deop. [ $+ [ $nick ] ]
  if ($istok(%deoplist,$opnick,32)) {
    /mode # -o $opnick 
    /notice $nick Do NOT op $opnick
    /notice $nick Any repeated attempts to do so will result in you being deopped.


    ; here we check count
    if (%deop. [ $+ [ $nick ] ] == 3) /mode $chan -o $nick
    else if (%deop. [ $+ [ $nick ] ] &gt;= 5) /mode $chan -o+bb $nick $address($nick, 1) $address($opnick, 1)
  }
}


-KingTomato
Joined: Apr 2003
Posts: 13
P
pilot1 Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Apr 2003
Posts: 13
I've got quite a few nicks in there now and they all work fine - what's the limit on the number of nicks the variable can hold?

Also, should there be a / in front of inc, mode, notice, etc.? Maybe there should, but it doesn't seem like it to me.
And does this user a timer to check how many times it's done the auto-deoping? Because I don't want someone banned if they've deoped someome 5 times over 5 days, if you get my meaning.
Thanks!


Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
The number it can hold is completly dependant on how long the names are. The variable cannot hold . 941 characters I mean, thats about 92 nicknames of 10-letters each.. The proof:

Quote:

//set %abc $str(1, 941)
(no error)
//set %abc $str(1, 942)
* /set: line too long


As for the /'s, they ar enot neccisary, but i use them just so i'm in the habbit. I used to go without, but then i was doing ns identify in the channel without the /'s too and got myself into trouble.. *oopse*

Also, the variable unsets itself after 10 minutes. This means if they deop someone, wait ten minutes, and deop another, it on;ly counts as one deop. Thats what the -u600 is for >:F


-KingTomato
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
There is more to considerthan just the result of your simple "The proof:". :tongue:
That particular variable can only hold 936 chars, and even then it depends on how it was set.

//set -u10 %abc $str(1, 941)
Error.
//set %a $str(1, 943)
No error.

//echo -a $str(a,943)
Error.
//echo $str(a,945)
No error.

//window @@ | echo @@ $str(a,942)
No error
//window @@@ | echo @@@ $str(a,942)
Error.

//set %deoplist $str(a,937)
Error.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
*sigh* Do you strive on showing me up? frown


-KingTomato
Joined: Apr 2003
Posts: 13
P
pilot1 Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Apr 2003
Posts: 13
Ok, the after 3 tries thing works fine, BUT, it doesn't ban right.
King_Lanky is the person I was testing it on, he was the one in the %deoplist who shouldn't be opped, and he had the Pipex IP.

Handom was the one who was opping him to help me test it.
Here's what it did after 5 times:

* pilot1 sets mode: -o+b Handom *!*Random@81-86-81-239.dsl.pipex.com

It deoped Handom and banned Lanky, but it should be deopping and banning them both, any ideas?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Ibet its because you joine dthe channel, and he was there before you. Your IAL (Internal Address List) wasn't holding the address for him. Add this to remotes, then rejoin the channel and give it a try

on 1:JOIN:#: {
if ($nick == $me) && ($ial($chan, 0) == 0) { /who $chan }
}

grin


-KingTomato
Joined: Apr 2003
Posts: 13
P
pilot1 Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Apr 2003
Posts: 13
It works, thanks!

Joined: Apr 2003
Posts: 13
P
pilot1 Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Apr 2003
Posts: 13
It works - now that i've done that and made the -oo and +bb parts of the script on seperate lines.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
You have to watch out, some people have scripts called "revenge" that counter-act the scripts. If they are not in one line, the revenge scriops tend to sneak right in the middle, and get you first. >:D Just be careful, thats all.


-KingTomato

Link Copied to Clipboard