Simple auto-ident

By Pass on Aug 22, 2005

Easily used: /anick [nickname] [password]
It adds $1, the nickname, to an auto-identify hash table with $2, the password. Just paste in your remotes, and you're ready to go.

menu menubar {
  Auto-Ident
  .Add:{
    var %x $?="Enter nickname:"
    var %y $?="Enter password:"
    if (%x) && (%y) { anick %x %y }
  }
  .-
  .Del:{ 
    var %x $?="Enter nickname to remove:"
    if (%x) {
      if ($hget($network $+ _nicks,%x)) { 
        hdel $network $+ _nicks %x 
        hsave -o $network $+ _nicks $network $+ _nicks.hsh 
        echo -a * %x now deleted from Auto-Ident list
      }
    }
  }
  .-
  .List { anicklist }
}
alias anicklist {
  if ($hget($network $+ _nicks)) { 
    if (!$window(@NickList)) {
      window -lk0 @NickList
      var %x = $hget($network $+ _nicks,0).item,%y = 1
      if (%x > 0) { 
        while (%x) {
          aline @NickList %y $+ 3] $hget($network $+ _nicks,%x).item 3( $+ $hget($network $+ _nicks,%x).data $+ 3)
          dec %x
          inc %y
        }
      }
      else { window -c @nicklist }
    }
  }
}
alias anick { 
  if (!$1) { echo * /anick: insufficient parameters | halt }
  if (!$2) { echo * /anick: insufficient parameters | halt }
  $iif(!$hget($network $+ _nicks),hmake $network $+ _nicks)
  $iif($exists($network $+ _nicks.hsh),hload $network $+ _nicks $network $+ _nicks.hsh)
  if ($hget($network $+ _nicks,$1)) { echo * /anick: $1 already exists | halt }
  hadd -m $network $+ _nicks $1 $2
  hsave -o $network $+ _nicks $network $+ _nicks.hsh
  echo * $1 now added to auto-ident list
}
on *:connect:{
  if (!$hget($network $+ _nicks)) { hmake $network $+ _nicks }
  if ($exists($network $+ _nicks.hsh)) { hload $network $+ _nicks $network $+ _nicks.hsh }
  if ($hget($network $+ _nicks,$me)) { .msg Nickserv identify $hget($network $+ _nick,$me) }
}

Comments

Sign in to comment.
DarthReven   -  Aug 23, 2005

your better off using mIRC\'s built in perform feature

 Respond  
DeathRyder082   -  Aug 22, 2005

Lmao, sorry for saying Ace99. I was trying 2 things at once.
To Pass: Looks good man, and sorry for mentioning the wrong name.

 Respond  
DeathRyder082   -  Aug 22, 2005

This looks very good Ace99, I will most likely use this in one of my scripts.

 Respond  
Ace99   -  Aug 22, 2005

Pretty cool Pass...It\'s easier than typing the whole message out. :) -Ace

 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.