Bot Login

By StoneD on Nov 15, 2009

  1. set #YOURCHANNEL ,
  2. //msg $botnick hello

Then follow stpes.

;#####################
;#####################
;### BOT LOGIN By Stoner ###
;#####################
;#####################

on *:TEXT:*:?:{
  if ($1 == ident) {
    if ($readini database\iRCBOT.user Users $nick == $null) { .notice $nick $readini Personality\ $+ %bot.Pers.file Ident IdentCannotFindYourNick  | halt }
    set %bot.ident.check.1 $readini database\iRCBOT.user Users $nick
    set %bot.ident.pass $md5($2,0)
    if ( $readini database\iRCBOT.GID iRCBOT %bot.ident.check.1 == %bot.ident.pass ) {
      set %bot.ident.mask [ $address($nick,3) ]
      if ( %bot.ident.mask == $null ) { /notice $nick $readini Personality\ $+ %bot.Pers.file Ident ErrorWithIdent | /msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.file Ident ErrorIdent | halt }
      /writeini database\iRCBOT.user Users $nick %bot.ident.mask
      /writeini database\iRCBOT.GID iRCBOT %bot.ident.mask %bot.ident.pass
      .notice $nick $readini Personality\ $+ %bot.Pers.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.Pers.file Ident IdentFailed | halt }
  }
  if ($1 == pass) {
    if ($2 == $null) { /notice $nick $readini Personality\ $+ %bot.Pers.file Pass YouGaveMeNoPasswordToSet | close -m $nick | halt } 
    unset %bot.temp.userhost | var %bot.temp.userhost [ $address($nick,3) ]    
    if (%bot.temp.userhost != $readini database\iRCBOT.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.Pers.file Pass CouldNotFindMask  | halt }
    if ($readini database\iRCBOT.user Users $nick != $null) {
      if ($readini database\iRCBOT.GID iRCBOT %bot.temp.userhost != $null) { 
        if ($3 == $null) {
          .notice $nick $readini Personality\ $+ %bot.Pers.file Pass ChangePass
          halt
        }
        if ($readini database\iRCBOT.GID iRCBOT %bot.temp.userhost != $md5($2,0)) {
          .notice $nick $readini Personality\ $+ %bot.Pers.file Pass WrongOldPass
          halt
        }
        else {
          .writeini -n database\iRCBOT.GID iRCBOT %bot.temp.userhost $md5($3,0)
          .notice $nick $readini Personality\ $+ %bot.Pers.file Pass PassBeenSet 
          set %bot.dcc.command PASS .... | set %bot.dcc.command.nick $nick | /dcctalk
          close -m $nick  
        }
      }
      else {
        .writeini -n database\iRCBOT.GID iRCBOT %bot.temp.userhost $md5($2,0)
        .notice $nick $readini Personality\ $+ %bot.Pers.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.Pers.file Pass YouHaveNoAccess
      /msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.file Pass MSGHomeYouHaveNoAccess 
      unset %bot.temp.userhost.
      close -m $nick 
    }
  }
  if ($1 == hello) {
    if ( $me !ison #YOURCHANNEL ) { /notice $nick $readini Personality\ $+ %bot.Pers.file Hello MustBeInHomeToHello | halt }
    unset %bot.guser.temp  
    if (!$readini database\iRCBOT.ini Variables Owner) {
      writeini database\iRCBOT.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.Pers.file Hello CannotGetUsersHost | writeini database\iRCBOT.ini Variables Owner 0 | halt }
      /writeini -n database\iRCBOT.chan global $nick 100
      /writeini -n database\iRCBOT.user Users $nick %bot.guser.temp 
      .notice $nick $readini Personality\ $+ %bot.Pers.file Hello HelloLine1
      .notice $nick $readini Personality\ $+ %bot.Pers.file Hello HelloLine2 | .msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.file Hello HelloLineHome
      .notice $nick $readini Personality\ $+ %bot.Pers.file Hello HelloLine3 | .notice $nick $readini Personality\ $+ %bot.Pers.file Hello HelloLine4 
      close -m $nick | /set.channel.modes #YOURCHANNEL
      halt    
    }
    else { /notice $nick $readini Personality\ $+ %bot.Pers.file Hello HaveAOwnerAlreadyLine1  | /notice $nick $readini Personality\ $+ %bot.Pers.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\iRCBOT.user Users $nick != $null) {
      set %bot.decode $md5($2,0)
      if ($readini database\iRCBOT.GID iRCBOT %bot.temp.userhost.2 == %bot.decode ) {
        writeini database\iRCBOT.GID Login $fulladdress HasDoneLoginOk  | set %bot.lastlogin $nick At $fulldate
        /notice $nick LOGIN Authentication successful... | /msg #YOURCHANNEL 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 LOGIN Authentication failed... | /notice $nick Try Ident. : /msg $me Ident <YourPassword> | notice $nick Ident Will Attempt To Add Your Current Mask | /msg #YOURCHANNEL  $nick ( %bot.temp.userhost.2 ) has failed to login. | unset %bot.temp.userhost.2 }
      close -m    
    }
    else { /notice $nick LOGIN Authentication failed...  | /notice $nick Try Ident. : /msg $me Ident <YourPassword> | notice $nick Ident Will Attempt To Add Your Current Mask | /msg #YOURCHANNEL  $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\iRCBOT.user Users $nick != $null) {
      set %bot.decode $md5($2,0)
      if ($readini database\iRCBOT.GID iRCBOT %bot.temp.userhost.2 == %bot.decode ) {
        writeini database\iRCBOT.GID Login $fulladdress HasDoneLoginOk  | set %bot.lastlogin $nick At $fulldate
        .notice $nick $readini Personality\ $+ %bot.Pers.file login LoginOk
        if (%bot.displaylogin) { /msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.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.Pers.file Notes NoteWaiting
        }
        /saveini | unset %bot.decode
        close -m      
      }
      else { .notice $nick $readini Personality\ $+ %bot.Pers.file login LoginFailed | .notice $nick $readini Personality\ $+ %bot.Pers.file login TryIdent
        if (%bot.displaylogin) { .msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.file login MSGHomeOnFail }
        unset %bot.temp.userhost.2 
      }
      close -m    
    }
    else { .notice $nick $readini Personality\ $+ %bot.Pers.file login LoginFailed | .notice $nick $readini Personality\ $+ %bot.Pers.file login TryIdent
      if (%bot.displaylogin) { .msg #YOURCHANNEL $readini Personality\ $+ %bot.Pers.file login HomeFail }
    unset %bot.temp.userhost.2   }
    close -m
  }
}

Comments

Sign in to comment.
Jethro   -  Dec 16, 2010

ActiveX:> ;#####################
;#####################
;### BOT LOGIN By Stoner ###
;#####################
;#####################The keyword is "BOT LOGIN." It's a shame that's as good as you get. I doubt Stoner is alive these days to provide you with a detailed introduction. You need to read into the code to find out how it works and what it does exactly.

 Respond  
ActiveX   -  Dec 16, 2010

what this script do? i did not see any description about the script

 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.