mIRCStorm V2.0.0 — File Browser

mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0 / Scripts / login.mrc

login.mrc — 10.86 KB — Download this file

;mIRCStorm V2.0.0 - Login.mrc
;
;Website: http://www.mIRCStorm.co.uk
;Author: Evil_Dave (Evil_Dave@mIRCStorm.co.uk)
;
;This Script Contains Code For The Login, XLogin,
;Ident, Hello, Pass and the Help commands.
;========================================================
;=======================Login.mrc========================
;========================================================
on 1:TEXT:*:?:{
  if ($1 == ident) {
    if ($readini database\mircStorm.user Users $nick == $null) { .notice $nick $readini Personality\ $+ %bot.Personality.file Ident IdentCannotFindYourNick  | halt }
    set %bot.ident.check.1 $readini database\mircStorm.user Users $nick
    set %bot.ident.pass $md5($2,0)
    if ( $readini database\mircStorm.GID mircstorm %bot.ident.check.1 == %bot.ident.pass ) {
      set %bot.ident.mask [ $address($nick,3) ]
      if ( %bot.ident.mask == $null ) { /notice $nick $readini Personality\ $+ %bot.Personality.file Ident ErrorWithIdent | /msg %bot.home $readini Personality\ $+ %bot.Personality.file Ident MSGHomeErrorWithIdent | halt }
      /writeini database\mircStorm.user Users $nick %bot.ident.mask
      /writeini database\mircStorm.GID mircstorm %bot.ident.mask %bot.ident.pass
      .notice $nick $readini Personality\ $+ %bot.Personality.file Ident AddedHost 
      set %bot.dcc.command Ident ( $nick ( %bot.ident.mask ) | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan $chan | /dcctalk
      unset %bot.ident.*
      halt
    }
    else { .notice $nick $readini Personality\ $+ %bot.Personality.file Ident IdentFailed | halt }
  }
  if ($1 == pass) {
    if ($2 == $null) { /notice $nick $readini Personality\ $+ %bot.Personality.file Pass YouGaveMeNoPasswordToSet | close -m $nick | halt } 
    unset %bot.temp.userhost | var %bot.temp.userhost [ $address($nick,3) ]    
    if (%bot.temp.userhost != $readini database\mircStorm.user Users $nick) { /notice $nick Your Mask/Host Does Not Match The One I Have On File For That Nickname | halt }
    if (%bot.temp.userhost == $null) { /notice $nick $readini Personality\ $+ %bot.Personality.file Pass CouldNotFindMask  | halt }
    if ($readini database\mircStorm.user Users $nick != $null) {
      if ($readini database\mircStorm.GID mircStorm %bot.temp.userhost != $null) { 
        if ($3 == $null) {
          .notice $nick $readini Personality\ $+ %bot.Personality.file Pass ChangePass
          halt
        }
        if ($readini database\mircStorm.GID mircStorm %bot.temp.userhost != $md5($2,0)) {
          .notice $nick $readini Personality\ $+ %bot.Personality.file Pass WrongOldPass
          halt
        }
        else {
          .writeini -n database\mircStorm.GID mircStorm %bot.temp.userhost $md5($3,0)
          .notice $nick $readini Personality\ $+ %bot.Personality.file Pass PassBeenSet 
          set %bot.dcc.command PASS .... | set %bot.dcc.command.nick $nick | /dcctalk
          close -m $nick  
        }
      }
      else {
        .writeini -n database\mircStorm.GID mircStorm %bot.temp.userhost $md5($2,0)
        .notice $nick $readini Personality\ $+ %bot.Personality.file Pass PassBeenSet 
        set %bot.dcc.command PASS .... | set %bot.dcc.command.nick $nick | /dcctalk
        close -m $nick  
      }
    }
    else { 
      set %bot.temp.userhost.1 [ $address($nick,3) ]
      /notice $nick $readini Personality\ $+ %bot.Personality.file Pass YouHaveNoAccess
      /msg %bot.home $readini Personality\ $+ %bot.Personality.file Pass MSGHomeYouHaveNoAccess 
      unset %bot.temp.userhost.
      close -m $nick 
    }
  }
  if ($1 == hello) {
    if ( $me !ison %bot.home ) { /notice $nick $readini Personality\ $+ %bot.Personality.file Hello MustBeInHomeToHello | halt }
    unset %bot.guser.temp  
    if (!$readini database\mircstorm.ini Variables Owner) {
      writeini database\mircstorm.ini Variables Owner 1 
      guser 3 $nick 3 | var %bot.guser.temp [ $address($nick,3) ] | /rlevel 3 
      if (%bot.guser.temp == $null) { /notice $nick $readini Personality\ $+ %bot.Personality.file Hello CannotGetUsersHost | writeini database\mircstorm.ini Variables Owner 0 | halt }
      /writeini -n database\mircStorm.chan global $nick 100
      /writeini -n database\mircStorm.user Users $nick %bot.guser.temp 
      .notice $nick $readini Personality\ $+ %bot.Personality.file Hello HelloLine1
      .notice $nick $readini Personality\ $+ %bot.Personality.file Hello HelloLine2 | .msg %bot.home $readini Personality\ $+ %bot.Personality.file Hello HelloLineHome
      .notice $nick $readini Personality\ $+ %bot.Personality.file Hello HelloLine3 | .notice $nick $readini Personality\ $+ %bot.Personality.file Hello HelloLine4 
      close -m $nick | /set.channel.modes %bot.home
      halt    
    }
    else { /notice $nick $readini Personality\ $+ %bot.Personality.file Hello HaveAOwnerAlreadyLine1  | /notice $nick $readini Personality\ $+ %bot.Personality.file Hello %bot.Personality.HaveAOwnerAlreadyLine2  | close -m }
  }
  if ($1 == xlogin) {
    set %bot.temp.userhost.is yes
    if (%bot.temp.userhost.2 != $null) { unset %bot.temp.userhost.2 }
    set %bot.temp.userhost.2 $address($nick,3)
    if ($readini database\mircStorm.user Users $nick != $null) {
      set %bot.decode $md5($2,0)
      if ($readini database\mircStorm.GID mircStorm %bot.temp.userhost.2 == %bot.decode ) {
        writeini database\mircStorm.GID Login $fulladdress HasDoneLoginOk  | set %bot.lastlogin $nick At $fulldate
        /notice $nick LOGIN Authentication successful... | /msg %bot.home X-LOGIN $nick ( %bot.temp.userhost.2 ) 
        set %bot.dcc.command XLOGIN | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan  | /dcctalk
        /sockwrite linked* xmircloginstorm: $+ $nick $+ : $+ %bot.temp.userhost.2 $+ : $+ %bot.decode $+ : $+ $fulladdress 
        unset %bot.temp.userhost.2
        if ( $exists(database\ [ $+ [ $nick ] ] $+ .note ) ) { 
          /msg $nick You Have A Note Waiting For You. To Read, Usage: ( /msg ) $me Notes Read
        }
        /saveini      
        close -m       
      }
      else { /notice $nick XLOGIN Authentication failed... | /notice $nick Try Ident. Usage: /msg $me Ident <YourPassword> | notice $nick Ident Will Attempt To Add Your Current Mask | /msg %bot.home  $nick ( %bot.temp.userhost.2 ) Has Failed To Login. | unset %bot.temp.userhost.2 }
      close -m    
    }
    else { /notice $nick XLOGIN Authentication failed... | /notice $nick Try Ident. Usage: /msg $me Ident <YourPassword> | notice $nick Ident Will Attempt To Add Your Current Mask | /msg %bot.home  $nick ( %bot.temp.userhost.2 ) Has Failed To Login. | unset %bot.temp.userhost.2   }
    close -m  
  }


  if ($1 == login) {
    if (%bot.temp.userhost.2 != $null) { unset %bot.temp.userhost.2 }
    set %bot.temp.userhost.2 $address($nick,3)
    if ($readini database\mircStorm.user Users $nick != $null) {
      set %bot.decode $md5($2,0)
      if ($readini database\mircStorm.GID mircStorm %bot.temp.userhost.2 == %bot.decode ) {
        writeini database\mircStorm.GID Login $fulladdress HasDoneLoginOk  | set %bot.lastlogin $nick At $fulldate
        .notice $nick $readini Personality\ $+ %bot.Personality.file login LoginOk
        if (%bot.displaylogin) { /msg %bot.home $readini Personality\ $+ %bot.Personality.file login MSGHomeOnloginOk }
        unset %bot.temp.userhost.2
        set %bot.dcc.command LOGIN | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan  | /dcctalk         
        if ( $exists(database\ [ $+ [ $nick ] ] $+ .note ) ) { 
          .msg $nick $readini Personality\ $+ %bot.Personality.file Notes NoteWaiting
        }
        /saveini | unset %bot.decode
        close -m      
      }
      else { .notice $nick $readini Personality\ $+ %bot.Personality.file login LoginFailed | .notice $nick $readini Personality\ $+ %bot.Personality.file login TryIdent
        if (%bot.displaylogin) { .msg %bot.home $readini Personality\ $+ %bot.Personality.file login MSGHomeOnFail }
        unset %bot.temp.userhost.2 
      }
      close -m    
    }
    else { .notice $nick $readini Personality\ $+ %bot.Personality.file login LoginFailed | .notice $nick $readini Personality\ $+ %bot.Personality.file login TryIdent
      if (%bot.displaylogin) { .msg %bot.home $readini Personality\ $+ %bot.Personality.file login MSGHomeOnFail }
    unset %bot.temp.userhost.2   }
    close -m
  }
}
===End Of Login Script===
alias /bot.dcc.help.subject {
  unset %bot.dcc.help.work
  /play -nq2m1c %bot.dcc.help.nick scripts\HelpScripts\dcccommands.help 0
  set %bot.help.work worked

}
alias /dcchelp {
  set %bot.dcc.command Help | set %bot.dcc.command.nick $1 | set %bot.dcc.command.chan DCC | /dcctalk 
  msg = $+ $1 DCC COMMANDS For $readini database\mircstorm.ini Variables BlankLogo
  msg = $+ $1 
  msg = $+ $1 quit whom me whois motd
  msg = $+ $1 echo bottree version rehash
  msg = $+ $1 restart die backup jump
  msg = $+ $1 
  msg = $+ $1 For More Details On each Subject '.help <subject>'
  msg = $+ $1 E.G. '.help rehash'  '.help version'  etc

}

alias /bot.help {
  if ($readini database\mircStorm.chan global %bot.help.nick != $null ) {
    set %bot.help.level $readini database\mircStorm.chan global %bot.help.nick
  }
  else {  set %bot.help.level $readini database\mircStorm.chan %bot.help.chan %bot.help.nick }
  if ( %bot.help.level == $null ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\anyone.help | halt }
  set %bot.help.work worked | set %bot.dcc.help.work worked
  if ( %bot.help.level == 5 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\chanvoice.help | halt }
  if ( %bot.help.level == 6 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\chanop.help | halt }
  if ( %bot.help.level == 7 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\chanmaster.help | halt }
  if ( %bot.help.level == 8 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\chanowner.help | halt }
  if ( %bot.help.level == 9 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\op.help | halt }
  if ( %bot.help.level == 10 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\master.help | halt }
  if ( %bot.help.level == 11 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\owner.help | halt }
  if ( %bot.help.level == 100 ) { /play -nq2m1c %bot.help.nick scripts\HelpScripts\full.help | halt }
}
alias /bot.help.what {
  unset %bot.help.work
  /play -nc %bot.help.nick scripts\HelpScripts\commands.help 1
  halt
}
on 1:PLAYEND:{
  if (%bot.dcc.join.play == 1) { unset %bot.dcc.join.play | halt }
  if ( commands.help isin $filename ) {
    if (%bot.help.work != worked) { 
    .notice %bot.help.nick No Available Help On That. See ' $+ $me help' For A List Of Commands  | halt }
  }
  if ( dcccommands.help isin $filename ) {
    if (%bot.dcc.help.work != worked) { .msg = $+ %bot.help.nick No Available Help On That. See '.help' For A List. |  unset %bot.help.work | halt }
  }
}







a