Jump to content

Script Checker


CharmedOne

Recommended Posts

it's queued out. and really it's not anymore than what's done normally by scripts such as moschino. Actually been done even back during the msn days.

 

My goal was to make it progressive in it's actions (still under way) so if it triggers on one it doesn't progress to the next one.

 

For example if it triggered on the who tag it wouldn't do the time and version.

 

if it triggered on the time it wouldn't do the version

 

if it triggered on the profile check it would stop there.

 

I have achieved this with only the profile check left to account for as i threw that in last.

 

User joins

 

It checks the who tag for that user. If it's ok it then checks the time. If that returns correctly it moves on to version. If the time is returned ok it moves on to version.

 

Time and Version are staggered a bit so if it doesn't return the time it doesn't check the version.

 

The profile check will first check to see if the person has a valid profile. ( some scripters like to create an account then delete it from the site but keep using it ) then it checks to see if the Add nick matches the users nick.

 

It's by no means a perfect system but given the options available I think it does about as well as possible.

 

I personally wouldn't use one on buzzen cause a) i'm a scripter and other scripters are welcome in my rooms. B) it's too easy to mask that you are using a script. c) the version check is annoying.

 

But the challenge was to do it and for the sake of giving it a go I did.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

i will post it.. but it's as is.. it's up to the public to implement it and change it to fit their needs. This means coding in kicks, menu, etc etc.

 

Code is sloppy but it works for me. It will at least give you an idea of how it'd done.

 

menu channel {
  Script Alert
  .$iif($istok(%Script.scan,$chan,44),$style(1)) Scan $chan : $iif($istok(%Script.scan,$chan,44),set %Script.scan $remtok(%Script.scan,$chan,1,44),set %Script.scan $addtok(%Script.scan,$chan,44))
  -
}
on !*:join:#: {
  if ($me !isop $chan) || (%s.check) || ($left($nick,1) == ^) || ($left($nick,1) == >) || (!$istok(%Script.scan,$chan,44)) { halt }
  inc -eu3 %s.check
  set %checknick. [  [ $chan ] ] $addtok(%checknick. [  [ $chan ] ],$nick,44)
  set %checknickb. [  [ $chan ] ] $addtok(%checknickb. [  [ $chan ] ],$nick,44)
  .timer.ckwho.  $nick 1 1 checkwho $remove($chan,$chr(37)) $nick
  set %profchecker. [  [ $nick ] ] $chan
  if ($left($nick,1) != >) raw PID $nick
}
alias checkversion { .raw PRIVMSG ($chr(37),$1) :VERSION   $chr(15) }
alias checktime { .raw PRIVMSG ($chr(37),$1) $2 :TIME }
alias checkwho { .who ($chr(37),$1) }
alias lastcheck { 
  if ($istok(%checknick. [  [ ($chr(37),$1) ] ],$2,44)) && ($3 === time) { 
    msg ($chr(37),$1) $2 is a script No Time Reply 
    set %checknick. [  [ ($chr(37),$1) ] ] $remtok(%checknick. [  [ ($chr(37),$1) ] ],$2,44)
    set %checknickb. [  [ ($chr(37),$1) ] ] $remtok(%checknickb. [  [ ($chr(37),$1) ] ],$2,44)
    $iif(%checknick. [  [ ($chr(37),$1) ] ] == $null,unset %checknick. [  [ ($chr(37),$1) ] ])
    $iif(%checknickb. [  [ ($chr(37),$1) ] ] == $null,unset %checknickb. [  [ ($chr(37),$1) ] ])
  }
  if ($istok(%checknickb. [  [ ($chr(37),$1) ] ],$2,44)) && ($3 === version) { 
    msg ($chr(37),$1) $2 is a script No Version Reply
    set %checknickb. [  [ ($chr(37),$1) ] ] $remtok(%checknickb. [  [ ($chr(37),$1) ] ],$2,44)
    $iif(%checknickb. [  [ ($chr(37),$1) ] ] == $null,unset %checknickb. [  [ ($chr(37),$1) ] ])
  }
}
raw 352:*:{ 
  if ($istok(%checknick. [  [ $2 ] ],$6,44)) {
    if ($9 !=== anon) { 
      msg $2 $6 is a script Tag Alert $9-
      set %checknick. [  [ $2 ] ] $remtok(%checknick. [  [ $2 ] ],$6,44)
      set %checknickb. [  [ $2 ] ] $remtok(%checknickb. [  [ $2 ] ],$6,44)
      $iif(%checknick. [  [ $2 ] ] == $null,unset %checknick. [  [ $2 ] ])
      $iif(%checknickb. [  [ $2 ] ] == $null,unset %checknickb. [  [ $2 ] ])
      halt
    }
    .timer.lastck.  $6 1 3 lastcheck $remove($2,$chr(37)) $6 time | checktime $remove($2,$chr(37)) $6 
  }
}
on ^*:NOTICE:*:#: {
  if ($istok(%checknick. [  [ $chan ] ],$nick,44)) || ($istok(%checknickb. [  [ $chan ] ],$nick,44))  {
    tokenize 32 $rawmsg
    if ($2 === NOTICE) && ($4 == $me) && ($left($5,7) === :TIME) {
;Regex for Time check is credited to Dabba
      if (!$Regex($right($5-,-7), /^([A-Z][a-z]{2}) (?1) (\d{1,2}) (\d{2}:\d{2}:\d{2}) (GMT(\-|\+)\d{4}) $Asctime(yyyy)$/)) { 
        msg $chan $nick is a script Invalid Time 
        set %checknick. [  [ $chan ] ] $remtok(%checknick. [  [ $chan ] ],$nick,44)
        set %checknickb. [  [ $chan ] ] $remtok(%checknickb. [  [ $chan ] ],$nick,44)
        $iif(%checknick. [  [ $chan ] ] == $null,unset %checknick. [  [ $chan ] ])
        $iif(%checknickb. [  [ $chan ] ] == $null,unset %checknickb. [  [ $chan ] ])
        halt 
      }
      else { 
        set %checknick. [  [ $chan ] ] $remtok(%checknick. [  [ $chan ] ],$nick,44) 
        $iif(%checknick. [  [ $chan) ] ] == $null,unset %checknick. [  [ $chan ] ])
      }
      checkversion $remove($chan,$chr(37)) $nick
      .timer.lastckb.  $nick 1 5 lastcheck $remove($chan,$chr(37)) $nick version
    } 
    if ($2 === NOTICE) && ($4 === $me) && ($left($5,10) === :VERSION) {
      if (Ajax IRCwx Client 1.0 beta 1, * interface iswmcs $right($5-,-10)) { 
        set %checknickb. [  [ $chan ] ] $remtok(%checknickb. [  [ $chan ] ],$nick,44)
        $iif(%checknickb. [  [ $chan ] ] == $null,unset %checknickb. [  [ $chan ] ])
      }
    }
  }
}
on *:text:*:#: {
  if ($me !isop $chan) || (%scriptalert. [  [ $nick ] ]) halt
  if ($stripped >= 1) { msg $chan $nick is a script Color Code Alert | set -e %scriptalert. [  [ $nick ] ] on }
}
raw data:*: { 
  if ($2 == PID) { 
    if (%profchecker. [  [ $3 ] ]) { profck $4 $3 %profchecker. [  [ $3 ] ] | unset %profchecker. [  [ $3 ] ]  }
  } 
  halt
}
alias profck { var %profck (profck,($rand(1,99999),$rand(A,Z),$rand(a,z))) | sockopen %profck www.buzzen.com 80 | sockmark %profck $1 $2 $3 }
on *:sockopen:profck*: { 
  if ($sockerr) { sockclose $sockname | halt }
  sockwrite -n $sockname GET /chat/redirect.php?mid=  $gettok($sock($sockname).mark,1,32) HTTP/1.1
  sockwrite -n $sockname Host: www.buzzen.com
  sockwrite -n $sockname $crlf
}
on *:sockread:profck*: {
  if ($sockerr > 0) return | var %profck | sockread %profck 
  if ($regex(%profck,/Location: (.*)/)) { 
    if ($regml(1) === /spacedom//profile.php) {
      tokenize 32 $sock($sockname).mark
      msg $3 $2 is a script Invalid Profile 
      .timer.ckwho.  $2 off | .timer.lastck.  $2 off | .timer.lastckb.  $2 off
      set %checknick. [  [ $3 ] ] $remtok(%checknick. [  [ $3 ] ],$2,44)
      set %checknickb. [  [ $3 ] ] $remtok(%checknickb. [  [ $3 ] ],$2,44)
      $iif(%checknick. [  [ $3 ] ] == $null,unset %checknick. [  [ $3 ] ])
      $iif(%checknickb. [  [ $3 ] ] == $null,unset %checknickb. [  [ $3 ] ])
    }
    else { bprofck $regml(1) $sock($sockname).mark }
    sockclose $sockname 
  }
}

alias bprofck { var %bprofck (bprofck,($rand(1,99999),$rand(A,Z),$rand(a,z))) | sockopen %bprofck www.buzzen.com 80 | sockmark %bprofck $1- }
on *:sockopen:bprofck*: { 
  if ($sockerr) { sockclose $sockname | halt }
  sockwrite -n $sockname GET $gettok($sock($sockname).mark,1,32) HTTP/1.1
  sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
  sockwrite -n $sockname Host: www.buzzen.com
  sockwrite -n $sockname $crlf
}
on *:sockread:bprofck*: {
  if ($sockerr > 0) return | var %bprofck | sockread %bprofck 
  if ($regex(%bprofck,/<font color=\"\#1A3A6D\" style=\"BACKGROUND-COLOR\: \#C9F2B0\">Add <font color=\"red\"><b>(.*)<\/b>/)) { 
    tokenize 32 $sock($sockname).mark
    if ($regml(1) != $3) { 
      .timer.ckwho.  $3 off | .timer.lastck.  $3 off | .timer.lastckb.  $3 off
      set %checknick. [  [ $4 ] ] $remtok(%checknick. [  [ $4 ] ],$3,44)
      set %checknickb. [  [ $4 ] ] $remtok(%checknickb. [  [ $4 ] ],$3,44)
      $iif(%checknick. [  [ $4 ] ] == $null,unset %checknick. [  [ $4 ] ])
      $iif(%checknickb. [  [ $4 ] ] == $null,unset %checknickb. [  [ $4 ] ])
    msg $4 $3 is a possible script or ghosting nick Profile nick mismatch }
    sockclose $sockname 
  }
}

Link to comment
Share on other sites

  • 3 weeks later...
:mellow: Im with errOr on this: if a room didnt allow scripts in it , i wouldnt bother to go in it anyways! and I certainly wouldnt ban scripts from any room I had! Theres too much discriminations being built into scripts as it is., specially those stoopid global bans, ( specially when they are put in the hands of idiots... ) They are just confrontational relics from the old msn chat days.. Its them that needs banning!! if you ask meee! lol Edited by Paige
Link to comment
Share on other sites

:mellow: Im with errOr on this: if a room didnt allow scripts in it , i wouldnt bother to go in it anyways! and I certainly wouldnt ban scripts from any room I had! Theres too much discriminations being built into scripts as it is.,

specially those stoopid global bans, ( specially when they are put in the hands of idiots... ) They are just confrontational relics from the old msn chat days.. Its them that needs banning!! if you ask meee! lol

 

 

:oops: I agree to some of what your saying and then iv let mirc scripts into my room (which is a msn clone) until you get as you rightly said an "idiot" who doesnt need a hammer to make his mirc send messages to the room i.e !love and im not got to put what comes next :P .... so sometimes its good to have a script checker with a kicker in it .... just my point of view :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...