mIRC Home    About    Download    Register    News    Help

Print Thread
#225944 13/09/10 11:02 PM
Joined: Nov 2009
Posts: 23
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2009
Posts: 23
anyone know a script that will ask age and give a certain time befre kicking or auto voicing if thye right age

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Example only
Code:
on @*:join:#:{
  .notice $nick Please enter your age as a number.
  .notice $nick You have 1 minute to do so.
  set $+(%,nick,$address) $nick
  $+(.timer,age,$nick) 1 60 ban -ku60 $chan $nick Age required.
}
on @*:text:*:#:{
  if ($($+(%,nick,$address),2) == $nick) {
    if ($1 isnum 18-) {
      .mode $chan +v $nick
      $+(.timer,age,$nick) off
    }
    eiseif $1 isnum {
      .ban -ku60 $chan $nick Come back when you are 18 or older.
      $+(.timer,age,$nick) off
    }
  }
}


Joined: Nov 2009
Posts: 23
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2009
Posts: 23
nice script man i just did a few changes work likes a charm and thanks again

Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
The only thing you have to keep in mind is people changing their nick before that time.


Learning something new every day.
Joined: Nov 2009
Posts: 23
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2009
Posts: 23
anyway to check to see if a user is already voiced cause it tends to boot anyone not in op

this is what i did with it so far

on @*:join:#dabigbadshow:{
/notice $nick Please enter your age like this !18.
/notice $nick You have 1 minute to do so $nick or you will be kicked.
set $+(%,nick,$address) $nick
$+(.timer,age,$nick) 1 60 kick $chan $nick Age required.
}
on $*:text:/^!(\d+)/S:#dabigbadshow: {
tokenize 32 $strip($regml(1))
if ($($+(%,nick,$address),2) == $nick) {
if ($1 isnum 18-) {
.mode $chan +v $nick
$+(.timer,age,$nick) off
}
elseif $1 isnum {
.mode $chan +b $wildsite $nick Come back when you are 18 or older.
.kick $chan $nick Come Back After Your 18th Birthday.
$+(.timer,age,$nick) off
}
}
}

Last edited by DaBigBadShow; 20/09/10 05:46 PM.
Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Put code /code blocks around it. It makes it much easier to read.

Your solution is to call an alias.

Code:
on @*:join:#dabigbadshow:{
  /notice $nick Please enter your age like this !18.
  /notice $nick You have 1 minute to do so $nick or you will be kicked.
  set $+(%,nick,$address) $nick
  $+(.timer,age,$nick) 1 60 checkkick $chan $nick
}
on $*:text:/^!(\d+)/S:#dabigbadshow: {
  tokenize 32 $strip($regml(1))
  if ($($+(%,nick,$address),2) == $nick) {
    if ($1 isnum 18-) {
      .mode $chan +v $nick
      $+(.timer,age,$nick) off
    }
    elseif $1 isnum {
      .mode $chan +b $wildsite $nick Come back when you are 18 or older.
      .kick $chan $nick Come Back After Your 18th Birthday.
      $+(.timer,age,$nick) off
    }
  }
}

alias -l checkkick {
  if $2 isreg $1 {
    kick $1 $2 Age required.
  }
}


Learning something new every day.

Link Copied to Clipboard