[RELEASE] mIRC age verification script

Posts 15 of 5 · Page 1 of 1
[RELEASE] mIRC age verification script
heres an age verification script i wrote for a friend a while back, decided to release it here. its designed to be placed on a bot and optionally report to you when a ban is made.

PLACE IN REMOTES:

Code:
;BloodSkins Age Verification Script v1.0 
;utilizes hixxys "Split tokens" script
;Completed on June 12th 2010
;Tested on mIRC 6.35


alias -l raiseerror {
  if (!$line($active,0)) { linesep -a }
  echo $colour(info) -a $1-
  linesep -a
  halt
}

alias split {
  if (($1 == -c) && ($0 < 2)) || (($1 != -c) && ($0 < 3)) { raiseerror * /split: Insufficient parameters }
  var %c, %g, %i = 1, %name = $iif($1 == -c,$2,$v1)
  if ($1 == -c) { var %c = $true }
  .alias %name $+ 0
  while ($isalias(%name $+ %i)) {
    .alias %name $+ %i
    %g = %i + 1
    while ($isalias($+(%name,%i,-,%g))) {
      .alias $+(%name,%i,-,%g)
      inc %g
    }
    .alias $+(%name,%i,-)
    inc %i
  }
  %i = %i - 1
  while (%i) {
    .alias $+(%name,-,%i)
    dec %i
  }
  if (!%c) {
    %i = 1
    tokenize 13 $replace($3-,$2,$cr)
    while ($eval($ $+ %i,2) != $null) {
      if (%i < $0) {
        %g = %i + 1
        while ($eval($ $+ %g,2) != $null) {
          .alias $+(%name,%i,-,%g) return $eval($+($,%i,-,%g),2)
          inc %g
        }
      }
      .alias $+(%name,%i) return $eval($ $+ %i,2)
      .alias $+(%name,%i,-) return $eval($+($,%i,-),2)
      inc %i
    }
    %i = %i - 1
    .alias %name $+ 0 return %i
    while (%i) {
      inc %c
      .alias $+(%name,-,%c) return $eval($ $+ %i,2)
      dec %i
    }
  }
}

on *:join:%agechan: {
  ..msg $nick Welcome $nick to %agechan! Please start off by telling me what year you were born in. EXAMPLE 1: /msg BOTNAMEHERE !age <month> <day> <year> EXAMPLE 2: /msg BOTNAMEHERE !AGE 11 9 1911
  ..msg $nick If you do not tell me your age in 3 minutes I will have to ban you :(
  ..notice $nick Welcome $nick to %agechan! Please check your private message from me for further instructions.
  /timer $+ $nick $+ ban 1 180 /mode %agechan +b $nick
  /timer $+ $nick $+ kick 1 180 /kick %agechan $nick You did not confirm your age. Please contact an op for assistance.
  /timer $+ $nick $+ msg 1 180 ..msg %ageadmin (ADMIN MSG) $nick was banned because they did not verify their age.
  //split todaysdate / $date | set %thismonth $todaysdate1 |  set %today $todaysdate2 | set %legalyear $calc($todaysdate3 - 18)
}

on *:TEXT:!age *:?: {

  if ($4 < %legalyear) {
    /mode %agechan +v $nick
    ..msg $nick Thank you for confirming your age! Enjoy your visit!
    /timer $+ $nick $+ ban off
    /timer $+ $nick $+ kick off
  }

  if ($4 > %legalyear) {
    /mode %agechan +b $nick
    /kick %agechan $nick Please come back when you are 18.
    ..msg $nick Please come back when you are 18.
    ..msg %ageadmin (ADMIN MSG) $nick was banned because they do not meet the age requirements.
    /timer $+ $nick $+ ban off
    /timer $+ $nick $+ kick off
  }

  if ($4 == %legalyear) {

    if ($2 < %thismonth) {
      /mode %agechan +v $nick
      ..msg $nick Thank you for confirming your age! Enjoy your visit!
      /timer $+ $nick $+ ban off
      /timer $+ $nick $+ kick off
    }

    if ($2 == %thismonth) {
      if ($3 < %today) {
        /mode %agechan +v $nick
        ..msg $nick Thank you for confirming your age! Enjoy your visit!
        /timer $+ $nick $+ ban off
        /timer $+ $nick $+ kick off
      }
      if ($3 == %today) {
        /mode %agechan +v $nick
        ..msg $nick Thank you for confirming your age! Enjoy your visit!
        ..msg $nick HAPPY BIRTHDAY!
        /timer $+ $nick $+ ban off
        /timer $+ $nick $+ kick off
      }
    }

    else {
      /mode %agechan +b $nick
      /kick %agechan $nick Please come back when you are 18.
      ..msg $nick Please come back when you are 18.
      ..msg %ageadmin (ADMIN MSG) $nick was banned because they do not meet the age requirements.
      /timer $+ $nick $+ ban off
      /timer $+ $nick $+ kick off
    }
  }
  

  ;BloodSkins Age Verification Script v1.0 
  ;utilizes hixxys "Split tokens" script
  ;Completed on June 12th 2010
  ;Tested on mIRC 6.35
VARIABLES

Code:
%agechan #YOURCHANNEL
%ageadmin YOURNICK
all other variables are auto set.
lol

Q:why a age verification?
failscript, no age script can ever be good because people can lie
Quote Originally Posted by Gilcrow View Post
failscript, no age script can ever be good because people can lie
well, duh, but it was made for someone who wanted to pay me forum gold on a diablo 2 trading site, and a decent amount for what little code there was to write, so why not do it?
code lol --
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?