mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 3
X
Xlipse Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Mar 2003
Posts: 3
I got this script from a friend to help us with the issue of rabid Chanserv's on Aniverse.. although there is 1 problem with it.. if ChanServ REALLY goes down, this script with essentially flood Aniverse Services and you will get put on perma-ignore! D'oh.. So I need to add like a 5 second delay before each time it issues a command. I've done a LITTLE C coding (a LITTLE..) so I went in to the script and checked it out... but got lost after about 60 seconds..

I just need to make it do a 5 second delay before it issues each/any command.. I don't suppose someone would be so kind as to help me out?

The Script:

Code:
; Personal Kick/Ban Protection v.0.02 by BuRuz (Dalnet/#scripting) 
; --
; If u got kick 3 times within 60secs , the script will attempt to remove $nick from op access and deop $nick 
; --

on *:snotice:*:{ zpp.auto.iden $1- }
on *:notice:*:?:{ if ($nick == NickServ) { zpp.auto.iden $1- } }
on *:op:#:{
  if ($opnick == $me) {
    %get.op.nick. [ $+ [ # ] $+ . $+ [ $me ] ] = $nick
    if ($hget(rejoin,deop.1. $+ #) >= 3) { mode # -o $hget(rejoin,deop.2. $+ #) } 
  }
}
on *:DEOP:#:{ 
  if ($opnick == $me) {
    if ($nick != $me) && (%get.op.nick. [ $+ [ # ] $+ . $+ [ $me ] ]) && ($nick != chanserv) { $zpro.chanserv.msg($network) op $chan $me } 
    unset %get.op.nick. [ $+ [ # ] $+ . $+ [ $me ] ] | %get.deop.nick. [ $+ [ # ] $+ . $+ [ $me ] ] = $nick
  }
}
on *:BAN:#:{ if ($banmask iswm $address($me,5)) || ($banmask iswm $reptok($address($me,5),$host,$ip,64)) { $zpro.chanserv.msg($network) unban # $me } }
on *:kick:#:{ 
  if ($knick == $me) { 
    if ($istok(#a-a-distro #anime-archive #buruz,$chan,32)) {
      hinc -mu60 rejoin deop.1. $+ # | hadd -mu10 rejoin deop.2. $+ # $nick
      if ($hget(rejoin,deop.1. $+ #) >= 3) { $zpro.chanserv.msg($network) access # del $hget(rejoin,deop.2. $+ #) }
    }
    hadd -mu60 rejoin # $nick | $zpro.chanserv.msg($network) invite # 
  } 
} 
on *:invite:$($hget(rejoin,#)):{ join # }
raw 473:*:{ hadd -mu60 rejoin $2 1 | $zpro.chanserv.msg($network) invite $2 $me }
raw 474:*:{ hadd -mu60 rejoin $2 1 | var %msg = $zpro.chanserv.msg($network) | %msg invite $2 $me | %msg unban $2 $me }
raw 477:*:{ iden.nick }
raw 1:*:{ iden.nick }
alias -l zpp.auto.iden { if ((*nick*owned*by*someone* iswm $1- ) || (*please*choose*different*nick* iswm $1-) || (* do not * access to op people on #*. iswm $strip($1))) { iden.nick } }
alias -l iden.nick { 
  ; -
  ; Syntax for var %nick - nick1:network:password1,nick2:network:password2,nick3:network:password3
  ; Syntax for var %allnet - nick1:password1,nick2:password2,nick3:password3
  ; -
  ; ex: Jhon_Doe:Dalnet:deadman,apeman:criten:wildmushroom
  ; ex: NoMo:oicu,superman:herosmero

  var %nick = MYNICKHERE:IRCNETWORK:PASSWORD,nick2:network:password2,nick3:network:password3
  var %allnet = MYNICKHERE:PASSWORD,nick2:password2,nick3:password3

  var %msg = $zpro.nickserv.msg($network) identify
  if ($wildtok(%nick,$+($me,:,$network,:*),1,44)) { %msg $gettok($ifmatch,3,58) }
  elseif ($wildtok(%allnet,$+($me,:*),1,44)) { %msg $gettok($ifmatch,2,58) }
}
alias -l zpro.nickserv.msg {
  if ($istok(dalnet,$1,32)) { return .ns }
  elseif ($istok(aniverse,$1,32)) { return .msg nickserv }
  else { return .msg nickserv }
}
alias -l zpro.chanserv.msg {
  if ($istok(dalnet,$1,32)) { return .cs }
  elseif ($istok(aniverse,$1,32)) { return .msg chanserv }
  else { return .msg chanserv }
}
; --- End ---

Joined: Mar 2003
Posts: 3
X
Xlipse Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Mar 2003
Posts: 3
Dang..

Did I come to the wrong forum??

:\


Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
It's probably too much for most people to handle!

I've not got enough time to spend so much of it on one piece, although as soon as I do get time, I will look into it wink


Aubs.
cool

Joined: Mar 2003
Posts: 3
X
Xlipse Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Mar 2003
Posts: 3
Ahh.. thanks man.. :P I'll keep an eye on this thread. I've been trying to learn a bit myself, but like you, it's about 'not having enough time'.. :| I was hoping there'd be some uber scripter on here that'd say "Oh yeh, just add this and change that, etc..".. heheh

I'll be watching.

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
Prehaps using /timer 1 5 (do it once in 5 seconds and stop) would help things out. Don't specify a timer name (e.g. /timerMyTimer 1 5 blah) otherwise if you do things frequently with that timer name, you would replace the previous instance.

With something like oping you, it may be a good idea to replace the previous instance, because you wouldn't want nickserv to op you twice... (if you've already been oped)...In fact, unless you're ...Oh, I don't know!!! lol, sorry :tongue:
Somehting like this may help:
.timerOpMe 1 5 .msg <nickserv> op $me
.timerIdent 1 5 .msg <nickserv> identify <pass>
.timer 1 5 .msg <nickserv> ban

look in your script for things like /<nickservName> or /msg etc and put a timer infront of it...Something like that may work!

Probably around the part of:
%msg $gettok($ifmatch,3,58)
Change to:
/timer 1 5 $eval(%msg) $eval($gettok($ifmatch,3,58))

(the $eval() is to make mIRC evaluate the contents of the variable/identifier before issuing it to the timer

Sorry I'm not much help, got too many things on atm!!


Aubs.
cool

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
Also, where you've got the invite:
$zpro.chanserv.msg($network) invite $2 $me

you might want to do it network+channel specific, so you could try:
$+(timer,$network,$2,$me) 1 5 $zpro.chanserv.msg($network) invite $2 $me

This would set a timer as:

/timerDalNet.#Channel.MyNick 1 5 /cs invite #Channel MyNick

Thus creating a separate invite request for each different channel


Aubs.
cool


Link Copied to Clipboard