MeMO AutO IDENTIFY

By MaSt3R on Dec 12, 2012

Enjoy ...

dialog autoidentify {
  title "-=AutO iDentify By MOhammaD=-"
  size -1 -1 265 180
  option pixels
  list 1, 5 5 255 100, size sort
  edit "", 2, 5 126 125 20, autohs
  edit "", 3, 135 125 125 20, autohs
  text "Nick:                                      Password:", 4, 5 105 255 17
  button "ReMOvE", 5, 5 150 65 25
  button "ADD", 6, 135 150 65 25
  button "Exit", 7, 205 150 50 25, cancel
}

on *:dialog:autoidentify:*:*:{
  if ($devent == init) pop
  elseif ($devent == sclick) {
    if ($did == 1) && ($did(1).seltext) { did -ra $dname 2 $gettok($did(1).seltext,1,32) | did -ra $dname 3 $gettok($did(1).seltext,2,32) }
    if ($did == 5) && ($did(1).seltext) { set %autoidentify $remtok(%autoidentify,$replace($did(1).seltext,$chr(32),$chr(6)),1,5) | did -r $dname 2,3 | pop }
    elseif ($did == 6) && ($did(2)) && ($did(3)) {
      if ($wildtok(%autoidentify,$did(2) $+ *,1,5)) set %autoidentify $reptok(%autoidentify,$v1,$did(2) $+ $chr(6) $+ $did(3),1,5)
      else set %autoidentify $addtok(%autoidentify,$did(2) $+ $chr(6) $+ $did(3),5)
      did -r $dname 2,3
      pop 
    }
  }
}

alias -l pop {
  set -l %num 1
  did -r autoidentify 1
  while ($gettok(%autoidentify,%num,5)) {
    did -a autoidentify 1 $gettok($gettok(%autoidentify,%num,5),1,6) $gettok($gettok(%autoidentify,%num,5),2,6)
    inc %num
  }
}

alias ident {
  if ($wildtok(%autoidentify,$me $+ *,1,5)) ns identify $gettok($v1,2,6)
  else echo -a $me isn't in the Auto Identify list.
}

on *:NICK: if ($nick == $me) && ($wildtok(%autoidentify,$newnick $+ *,1,5)) ns identify $gettok($v1,2,6)
on *:connect: if ($wildtok(%autoidentify,$me $+ *,1,5)) ns identify $gettok($v1,2,6)
on *:notice:*:*:  if ($nick == NickServ) && (*msg NickServ IDENTIFY password* iswm $strip($1-)) && ($wildtok(%autoidentify,$me $+ *,1,5)) ns identify $gettok($v1,2,6) 

menu menubar,status,channel {
  AutO IDENTIFY: dialog -ma autoidentify autoidentify
}

on *:unload:if ($?!="Remove stored user/pass info?") unset %autoidentify

Comments

Sign in to comment.
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.