Auto Identify Script

By Ghost-writer on Dec 25, 2009

This is my auto identify script, to use it just put it in and right click the background then type auto identify dialog, or type /identify.

[size=20][b]
The global password will work when you have no other passwords

It only triggers when nickserv notices you and it may not work if your not on an ircd with the same identify request as mine.

Its pretty simple to use. Just click a few buttons :).
[/b][/size]

menu * {
Auto Identify Dialog:identify
}
alias -l idcheck $iif($?!"Identify requested - Do you want to identify?",.msg nickserv identify $hget(identify,$me))
on ^*:notice:*:?: {
  if ($nick == nickserv) && (identify isin $1-) && (password isin $1-) {
    if ($hget(identify,popup)) idcheck
    elseif ($hget(identify,$me)) .msg nickserv identify $hget(identify,$me)
    elseif ($hget(identify,global)) .msg nickserv identify $hget(identify,global)    
    elseif ($hget(identify,nopass)) {
      var %pass $$?"Password requested" 
      hadd identify $me %pass
      .msg nickserv identify %pass
    } 
  }
}
dialog identify {
  option dbu
  title "Identify Script"
  size -l -l 150 125
  box "Settings", 1, 80 5 60 65,
  check "Identify on request", 2, 82 15 55 10,
  list 3, 5 75 140 50,vshbar
  edit "", 4, 5 15 30 10, autohs
  edit "", 5, 40 15 30 10,pass autohs
  text "Nick", 6, 7 5 30 10
  text "Password", 7, 40 5 30 10,pass
  Button "Add User", 8, 5 25 65 10,
  check "Ask for password on identify request", 9, 82 25 55 15,multi
  check "Use global password", 10, 82 40 55 12,multi
  check "Ask before identifying", 11, 82 55 55 14,multi
  edit "", 12, 10 55 50 10,pass autohs
  text "Global Password", 13, 15 45 50 10
}
alias -l idlist {
  did -ra identify 3 Nick - Password
  var %x $hget(identify, 0).item
  while (%x) {
    if (!$regex($hget(identify,%x).item,/nopass|request|popup/Si)) {
      did -a Identify 3 $hget(identify, %x).item - $hget(identify, $hget(identify, %x).item)
    }
    dec %x 
  }
}
alias -l error noop $tip(error,Error!,$1-,9)
on *:dialog:identify:*:*: {
  if ($devent == edit) {
    if ($did == 12) {
      hadd -m identify global $did(12).text
    }
  }
  if ($devent == init) {
    if ($hget(identify, request)) did -c $dname 2
    if ($hget(identify,NoPass)) did -c $dname 9
    if ($hget(identify,popup)) did -c $dname 11   
    if (!$hget(identify,global)) did -m $dname 12
    else {
      did -n $dname 12
      did -c $dname 10
      did -a $dname 12 $hget(identify,global)
    }
    idlist
  }
  if ($devent == sclick) {
    if ($did == 3) { $iif($?!"Delete item?",hdel identify $did(3).seltext) | idlist }
    if ($did == 11) $+(h,$iif(!$did(11).state,del,add)) Identify popup On
    if ($did == 2)  $+(h,$iif(!$did(2).state,del,add)) Identify Request On
    if ($did == 9)  $+(h,$iif(!$did(9).state,del,add)) Identify NoPass On    
    if ($did == 10) {
      if ($did(10).state)   did -n $dname 12
      else did -m $dname 12
    }
    if ($did == 8) {
      if ($did(4).text) && ($did(5).text) {
        hadd -m Identify $did(4).text $did(5).text
        idlist
      }
      else error You have not input a, $iif(!$did(4).text,Username -) $iif(!$did(5).text,password) $+ .
    }
  }
}
alias -l identify dialog -mo identify identify

Comments

Sign in to comment.
chachin   -  Nov 15, 2011

when you close mIRC the settings dont get saved. you gotta reset it :|

 Respond  
Jethro   -  Dec 25, 2009

Good work, Ghost. But why didn't you make the same mistake as dark's? It's an uppercase /S not /s in mirc's regex control code stripping. I will quote a fine print from the history of v6.1:> 123.The matchtext section of a remote event definition can now
contain a regular expression. You must specify the $ event prefix
to use this feature.

on $*:TEXT:m/regular expression/switches:#:/echo message: $1-

The 'm' and switches are optional. The // are required. If
switches are used they must be standard PCRE switches, otherwise
the match will fail. You can use switch 'S' to strip control
codes from $1-.
 Respond  
jsg55   -  Dec 25, 2009

nice scripting, as always ghost :)

 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.