mIRC Home    About    Download    Register    News    Help

Print Thread
bot asks age on a timer #225944
13/09/10 11:02 PM
13/09/10 11:02 PM
Joined: Nov 2009
Posts: 23
D
DaBigBadShow Offline OP
Ameglian cow
DaBigBadShow  Offline OP
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

Re: bot asks age on a timer [Re: DaBigBadShow] #225957
14/09/10 09:50 AM
14/09/10 09:50 AM
Joined: Aug 2004
Posts: 7,252
Ontario, Canada
R
RusselB Offline
Hoopy frood
RusselB  Offline
Hoopy frood
R

Joined: Aug 2004
Posts: 7,252
Ontario, Canada
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
    }
  }
}


Re: bot asks age on a timer [Re: RusselB] #225977
14/09/10 06:37 PM
14/09/10 06:37 PM
Joined: Nov 2009
Posts: 23
D
DaBigBadShow Offline OP
Ameglian cow
DaBigBadShow  Offline OP
Ameglian cow
D

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

Re: bot asks age on a timer [Re: DaBigBadShow] #225992
15/09/10 10:35 AM
15/09/10 10:35 AM
Joined: Aug 2010
Posts: 134
Haarlem, The Netherlands
T
Thels Offline
Vogon poet
Thels  Offline
Vogon poet
T

Joined: Aug 2010
Posts: 134
Haarlem, The Netherlands
The only thing you have to keep in mind is people changing their nick before that time.


Learning something new every day.
Re: bot asks age on a timer [Re: DaBigBadShow] #226136
20/09/10 05:42 PM
20/09/10 05:42 PM
Joined: Nov 2009
Posts: 23
D
DaBigBadShow Offline OP
Ameglian cow
DaBigBadShow  Offline OP
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.
Re: bot asks age on a timer [Re: DaBigBadShow] #226141
20/09/10 08:14 PM
20/09/10 08:14 PM
Joined: Aug 2010
Posts: 134
Haarlem, The Netherlands
T
Thels Offline
Vogon poet
Thels  Offline
Vogon poet
T

Joined: Aug 2010
Posts: 134
Haarlem, The Netherlands
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.