Authing System v0.2

By UK-Sw1ft on Jun 01, 2005

Here's a new auth system iv made, its with the hello,auth,requestpassword , and works great, iv tested it, but if u do find a big please contact me thx :)

;# authing System v.02#
;# Scripting By Sw1ft#
;# copyright(c) @ #united-kingdom @ Quakenet#
;# You can add colour to the script  or change if it u must, but only if u know what your doing :P#
;# anyways Have fun :)#
;# Commands#
;# msg <bot> hello <secret word>#
;#msg <bot> auth <username> <password> ( given by bot )#
;#msg <bot> logout#
;#msg <bot> requestpassword <secret word>#
;# halt :D#

;# The Script.#

on 1:TEXT:*hello*:?:{
  if ($readini(authed.ini,authed,$address($nick,1)) == authed) { 
    notice $nick You are allready authed $nick 
    notice $nick To request your password type ( /msg $me requestpassword  < Your  secret word > ) 
    /close -m $nick
  halt }
  if ($2 == $null) {
    notice $nick Please Use, /msg $me hello <secret word>
    /close -m $nick
  halt }
  else {
    writeini authed.ini secret $address($nick,1) $2
    writeini authed.ini authed $address($nick,1) authed
    set %password $rand(1,99) $+ $rand(a,z) $+ $rand(1,99) $+ $rand(A,Z) $+ - $+ $rand(1,99) $+ $rand(a,z) $+ $rand(A,Z)
    writeini authed.ini PASSWORD $address($nick,1) %password
    writeini authed.ini USERNAME $address($nick,1) $nick
    notice $nick You authing was successfull
    notice $nick DO NOT give your username and password to anyone other than $me 
    notice $nick You are now logged in.
    notice $nick USERNAME: $readini(authed.ini,username,$address($nick,1))  PASSWORD: $readini(authed.ini,password,$address($nick,1)) 
    notice $nick add, /msg $me auth $readini(authed.ini,username,$address($nick,1)) $readini(authed.ini,password,$address($nick,1)) To your perform !
    writeini authed.ini loggedin $address($nick,1) loggedin
    unset %password
    /close -m $nick
    halt
  }
}

on 1:TEXT:*auth*:?:{
  if ($readini(authed.ini,loggedin,$address($nick,1)) == loggedin) {
    notice $nick you are allready loggedin $nick. 
    /close -m $nick
  halt }
  if ($readini(authed.ini,authed,$address($nick,1)) != authed) { 
    notice $nick You need to create a acount before you can auth.
    notice $nick use, /msg $me hello $nick secretword 
    /close -m $nick
  halt }
  if ($readini(authed.ini,username,$address($nick,1)) != $2) {
    notice $nick wrong username , please try again.
    /close -m $nick
  halt }
  if ($readini(authed.ini,password,$address($nick,1)) != $3) {
    notice $nick password wrong, please try again, or request your password by, ( /msg $me requestpassword < Your  secret word >)
    /close -m $nick
  halt }
  else {
    writeini authed.ini loggedin $address($nick,1) loggedin
    notice $nick you are now logged in as $2 $3
    halt
    /close -m $nick
  }
}

on 1:TEXT:*requestpassword*:?:{
  if ($readini(authed.ini,loggedin,$address($nick,1)) == loggedin) {
    notice $nick you are allready loggedin $nick. 
    /close -m $nick
  halt }
  if ($readini(authed.ini,authed,$address($nick,1)) != authed) { 
    notice $nick You need to create a acount before you can auth.
    notice $nick use, /msg $me hello $nick <secretword> 
    /close -m $nick
  halt }
  if ($readini(authed.ini,secret,$address($nick,1)) != $2) {
    notice $nick secret word wrong, please try again
    /close -m $nick
  halt }
  else {
    notice $nick USERNAME: $readini(authed.ini,username,$address($nick,1))  PASSWORD: $readini(authed.ini,password,$address($nick,1)) 
    notice $nick add, /msg $me auth $readini(authed.ini,username,$address($nick,1)) $readini(authed.ini,password,$address($nick,1)) To your perform
    /close -m $nick
    halt
  }
}

on 1:TEXT:logout:?:{
  if ($readini(authed.ini,loggedin,$address($nick,1)) == loggedout) {
    notice $nick you are allready loggedout $nick. 
    /close -m $nick
  halt }
  if ($readini(authed.ini,authed,$address($nick,1)) != authed) { 
    notice $nick You need to create a acount before you can auth.
    notice $nick use, /msg $me hello $nick <secretword> 
    /close -m $nick
  halt }
  else {
    writeini authed.ini loggedin $address($nick,1) loggedout
    notice $nick logout successfull.
    /close -m $nick
    halt
  }
}

on 1:QUIT:{
  if ($readini(authed.ini,loggedin,$address($nick,1)) == loggedin) {
    writeini authed.ini loggedin $address($nick,1) loggedout
    halt
  }
}

Comments

Sign in to comment.
Nutrix   -  Jun 12, 2005

nice but for what is it :$

 Respond  
HoBbo!   -  Jun 03, 2005

nice, works great :]

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.