Authing System

By WacKy- on Feb 19, 2005

My Style of authing with a bot :o)
, made it a few week ago for my bot, made my self a new one so ill release this one :o)

on 1:TEXT:*auth*:?:{
  if ($nick == $me) { halt
  }
  elseif ($readini(authed.ini,AUTHED,$address($nick,2) == AUTHED)) { msg $nick [- You Are Allready Authed $nick -] | msg $nick [- To Request you're Password Use ' /msg $me requestpassword <username> ' -] | msg $nick [- Or If You're Allready Authed Type: requestpassword <username> To Get You're Password -]  | halt
  }
  elseif ($2 == $null) { msg $nick [- Use: /msg $me auth <usersname> <password> -] |   halt
  }
  elseif ($3 == $null) { msg $nick [- Use: /msg $me auth <usersname> <password> -] |  halt
  } 
  else {
    writeini authed.ini AUTHED $address($nick,2) AUTHED
    writeini authed.ini USERSNAME $address($nick,2) $2
    writeini authed.ini PASSWORD $address($nick,2) $3
    msg $nick [- You Are Now Authed $nick -]
    msg $nick [- To Login Use: /msg $me login <usersname> <password> -]
  }
}

on 1:TEXT:*login*:?:{
  if ($nick == $me) { halt
  }
  elseif ($readini(loggedin.ini,LOGGEDIN,$address($nick,2) == loggedin)) {
    msg $nick [- You Are All Ready Logged In $nick -]
    msg $nick [- To Logout Use: /msg $me logout <username> <password> -]
  }
  elseif ($readini(authed.ini,USERSNAME,$address($nick,2) == $2)) || ($readini(authed.ini,PASSWORD,$address($nick,2) == $3)) {
    writeini loggedin.ini LOGGEDIN $address($nick,2) loggedin
    msg $nick [- You Are now Logged In $nick -]
    msg $nick [- To Logout Use: /msg $me logout <usersname> <password> -]
    msg $nick [- To View you're available Commands: Type /msg $me help -]
  }
}

on 1:TEXT:*logout*:?:{
  if ($nick == $me) { halt
  }
  elseif ($readini(loggedin.ini,LOGGEDIN,$address($nick,2) == loggedout)) {
    msg $nick [- You Are Allready Logged Out $nick -]
    msg $nick [- To Login Use: /msg $me login <usersname> <password> -]
  }
  elseif ($readini(authed.ini,USERSNAME,$address($nick,2) == $2)) || ($readini(authed.ini,PASSWORD,$address($nick,2) == $3)) {
    writeini loggedin.ini LOGGEDIN $address($nick,2) loggedout
    msg $nick [- You Are Now Logged Out $nick -]
    msg $nick [- To Login Use: /msg $me login <usersname> <password> -]
  }
}

on 1:TEXT:*requestpassword*:?:{
  if ($nick == $me) { halt
  }
  elseif ($readini(authed.ini,USERSNAME,$address($nick,2) == $2)) {
    msg $nick [- You're Details Are USERNAME: $readini(authed.ini,USERSNAME,$address($nick,2)) PASSWORD: $readini(authed.ini,PASSWORD,$address($nick,2))  -]
  }
  else { msg $nick [- You Are Not Authed With $me $nick $+ . -] 
  }
}

on 1:TEXT:*removeme*:?:{
  if ($nick == $me) { halt
  }
  elseif ($readini(loggedin.ini,LOGGEDIN,$address($nick,2) != loggedin)) {
    msg $nick [- You Need to be authed or logged in  $nick to remove you're auth -]
  }
  else {
    /remini authed.ini AUTHED $address($nick,2)
    /remini authed.ini PASSWORD $address($nick,2)
    /remini authed.ini USERSNAME $address($nick,2)
    /remini loggedin.ini LOGGEDIN $address($nick,2)
    msg $nick [- You're Authed Has Now Been Deleted. -]
  }
}

;commands auth , login , logout , removeme , requestpassword

Comments

Sign in to comment.
WacKy-   -  Mar 02, 2005

It dosnt matter what u use, its a authing system that I made.... not a Q bot...

 Respond  
Pikachuh   -  Feb 26, 2005

wait a minute? an login? AND an auth?, it should be only AUTH or LOGIN, couse theyr are the same? :S for addding users use HELLO

 Respond  
Yoinx   -  Feb 20, 2005

Im not sure if you realize this or not, But you dont need an if ( $nick == $me ) check on text events as you cant trigger them anyway.

 Respond  
TENb`   -  Feb 20, 2005

and how do we juse this code ?

 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.