Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:*:?: {
- if ($1 == [ [ %cmd ] $+ ] login) {
- if ($nick !isin %sys.ignore) {
- if (!%nick. [ $+ [ $nick ] ]) {
- if ($3) {
- if ($ini(staff.ini,$2)) {
- if ($istokcs($readini(staff.ini,$2,password),$3,32) == $true) {
- guser $readini(staff.ini,$2,Rank) $nick 2
- set %nick. [ $+ [ $nick ] ] $2
- msg %core.chan %logo � $nick has logged in with the status $rank($readini(staff.ini,$2,Rank))
- }
- else {
- set %sys.ignore $addtok(%sys.ignore,$nick,32)
- msg $nick %logo � Password incorrect. Please try again in 5 minutes.
- timerunignore. [ $+ [ $nick ] ] 1 300 set %sys.ignore $remtok(%sys.ignore,$nick,32)
- }
- }
- else {
- msg $nick %logo � The specficed Username is not in my database.
- }
- }
- else {
- msg $nick %logo � Insufficent Parameters. Syntax: [ [ %cmd ] $+ ] login <username> <password>
- }
- }
- else {
- msg $nick %logo � You already logged on with the username: % [ $+ [ $nick ]
- }
- }
- else {
- msg $nick %logo � Commands from you are being ignored.
- }
- }
- }
- on &*:text:*:#: {
- if ($chan == %core.chan) {
- if ($1 == [ [ %cmd ] $+ ] logout) {
- if ($nick !isin %sys.ignore) {
- if (%nick. [ $+ [ $nick ] ]) {
- ruser $nick 2
- unset %nick. [ $+ [ $nick ] ]
- msg %core.chan %logo � $nick has been successfully logged out.
- }
- else {
- notice $nick %logo � You need to login before you can logout.
- }
- }
- else {
- notice $nick %logo � Commands from you are being ignored.
- }
- }
- }
- }
- on 1000:TEXT:*:#: {
- msg $chan %logo � Script Test: " $1- " has been read.
- if ($1 == `add) {
- if ($3) {
- if ($nick($chan,$2) > 0) {
- if ($3 == Staff) {
- set %pending.staff $addtok(%pending.staff,$2,32)
- goto next
- }
- if ($3 == Admin) {
- set %pending.admin $addtok(%pending.admin,$2,32)
- goto next
- }
- if ($3 == Owner) {
- set %pending.owner $addtok(%pending.owner,$2,32)
- goto next
- }
- if ($3 == Staff) {
- set %pending.owner $addtok(%pending.owner,$2,32)
- goto next
- }
- else { goto err }
- :next
- notice $2 %logo � You have been given $3 access by $nick to my commands.
- notice $2 %logo � To recieve these priveleges please type: /msg $me [ [ %cmd ] $+ ] register <Username> <Password>
- msg %core.chan %logo � $2 has been given $3 access to my commands.
- :err
- notice $nick %logo � Invalid Parameters. Syntax: [ [ %cmd ] $+ ] addStaff <Nickname> <Master|Owner|Admin|Staff>
- }
- else { notice $nick %logo � Nickname ( $2 ) Is currently not on %core.chan }
- }
- else { notice $nick %logo � Insufficent Parameters. Syntax: [ [ %cmd ] $+ ] addStaff <Nickname> <Master|Owner|Admin|Staff> }
- }
- }
- on *:text:*:?: {
- if ($1 == [ [ %cmd ] $+ ] register) {
- if ($nick !isin %sys.ignore) {
- if ($nick isin %pending.staff) || ($nick isin %pending.admin) || ($nick isin %pending.owner) || ($nick isin %pending.master) {
- if ($3) {
- if (!$ini(staff.ini,$2)) {
- writeini staff.ini $2 Password $3
- if ($nick isin %pending.staff) {
- writeini staff.ini $2 Rank 500
- set %pending.staff $remtok(%pending.staff,$nick,32)
- }
- if ($nick isin %pending.admin) {
- writeini staff.ini $2 Rank 700
- set %pending.admin $remtok(%pending.admin,$nick,32)
- }
- if ($nick isin %pending.owner) {
- writeini staff.ini $2 Rank 800
- set %pending.owner $remtok(%pending.owner,$nick,32)
- }
- if ($nick isin %pending.master) {
- writeini staff.ini $2 Rank 1000
- set %pending.master $remtok(%pending.master,$nick,32)
- }
- msg $nick %logo � You have successfully registered with the username: $2 and Password: $3. Please remember the password is Case Sensative.
- msg $nick %logo � To Continue please type [ [ %cmd ] $+ ] login <Username> <Password>
- }
- else { msg $nick %logo � Username ( $2 ) is already taken. Please try another.
- }
- else { msg $nick %logo � Insufficent Parameters. Syntax: [ [ %cmd ] $+ ] register <Username> <Password> }
- }
- }
- }
- else {
- msg $nick %logo � Commands from you are being ignored.
- }
- }
- }
- on *:EXIT: {
- rlevel -r 500,700,800,1000
- unset %nick.*
- }
- on *:DISCONNECT: {
- rlevel -r 500,700,800,1000
- unset %nick.*
- }
- alias -l rank {
- if ($1 isnum) {
- if ($1 == 1000) { return Master }
- elseif ($1 == 800) { return Owner }
- elseif ($1 == 700) { return Super Admin }
- elseif ($1 == 600) { return Admin }
- elseif ($1 == 500) { return Staff }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement