mIRC Home    About    Download    Register    News    Help

Print Thread
auto-hop? delayed limit? #106365 29/12/04 07:35 AM
Joined: Dec 2004
Posts: 2
G
GreyVulpine Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Dec 2004
Posts: 2
A couple things I'm wondering about.

I'd like to make a channel that has a limit. A script will, once a user joins, increase that user limit after a few seconds. It's a great way to protect against join trolling/spamming. I've seen stuff like this before, just wondering how it was implemented.

Also, is there a way to auto-half op in mIRC, perhaps making a copy from the /aop command that's built-in?

Thanks

Re: auto-hop? delayed limit? #106366 29/12/04 08:37 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
For the first thing you asked for did you mean a revolving door ban or something?

For the auto half op why don't you do something like:

/auser 10 Nick

Code:

on !10:Join:[color:red]#yourchan[/color]: {
   mode $chan +h
}

Re: auto-hop? delayed limit? #106367 29/12/04 10:05 AM
Joined: Nov 2004
Posts: 80
D
DrStein Offline
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Code:
  
dialog limiter {
  title "Channel limiter"
  size -1 -1 105 92
  option dbu
  edit "", 1, 1 3 62 11,  autohs
  list 2, 1 14 62 53, size sort
  button "Add", 3, 67 3 32 10
  button "Remove", 4, 67 13 32 10, disable
  button "Ok", 5, 67 55 32 10, ok
  box "", 6, 0 -3 105 95
  button "Update", 7, 67 23 32 10, disable
  button "Cancel", 8, 67 45 32 10, cancel
  check "Enable limiter",9,1 69 40 10 
  text "Overlimi",10, 1 81 40 10
  edit "", 11,42 80 20 10
}

on *:dialog:limiter:*:*: {
  if ($devent == init) { 
    didtok $dname 2 44 %limitchannels
    did $iif(%enablelimiter,-c,-u) $dname 9
  }
  if ($devent == sclick) {
    if ($did == 7) { did -o $dname 2 $did(2).sel $did(1).text | did -r $dname 1 | did -b $dname 4,7 }
    elseif ($did == 2) { did -ra $dname 1 $did(2).seltext | did -e $dname 4,7 }
    elseif (($did == 3) && ($did(1).text) && (!$didwm(2,$did(1).text))) { 
      did -a $dname 2 $did(1).text  
      did -r $dname 1 
      did -b $dname 4,7
    }
    elseif (($did == 4) && ($did(2).sel)) { 
      did -d $dname 2 $did(2).sel
      did -r $dname 1         
      did -b $dname 4,7   
    }
    elseif ($did == 5) { 
      set %limitchannels $didtok(2,44) 
      $iif($did(9).state == 1,set %enablelimiter ON,unset %enablelimiter)
      $iif($did(11).text isnum,set %overlimit $v1,set %overlimit 3) 
      limit.enabled
    }
  }
}

alias limit.enabled {
  .timerlimit* off
  if (%enablelimiter) {
    var %i = 1
    while ($gettok(%limitchannels,%i,44)) {
      .timerlimit $+ $v1 0 5 checklimit $v1 
      inc %i
    }
  }
}

raw 366:*:{ 
  haltdef  
  if (($istok(%limitchannels,$2,44)) && (%enablelimiter)) { .timerlimit $+ $2 0 5 checklimit $2 } 
}

alias checklimit {
  if ($me !isop $1) { .timerlimit $+ $1 off }
  elseif ($chan($1).limit != $calc($nick($1,0) + %overlimit)) { mode $1 +l $v2 }
}

on *:OP:#:{
  if (($opnick == $me) && ($istok(%limitchannels,$chan,44)) && (%enablelimiter)) { .timerlimit $+ $chan 0 5 checklimit $chan } 
}

menu status {
  Limiter:{ $iif($dialog(limiter),dialog -v limiter,dialog -m limiter limiter) }

}


Notes:
1)Sorry about the no-good looking dialog blush
2)Don't forget the # when you add a channel in the list

Last edited by DrStein; 29/12/04 10:06 AM.

while (1) { fork(); }