Whois Reporter

By Anarchy[MKD] on Jul 26, 2007

;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; Name: Whoiz Reporter
; Author: Anarchy[MKD]
; Date: July , 2007
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

dialog pre.whois {
  title "Anarchy[MKD] Whoiz Reporter"
  size -1 -1 159 139
  option dbu
  box "Whois Information", 1, 5 5 148 115
  edit "", 2, 39 20 106 10, read autohs
  edit "", 3, 39 32 106 10, read autohs
  edit "", 4, 39 44 106 10, read autohs
  edit "", 5, 39 56 106 10, read autohs
  edit "", 6, 39 68 106 10, read autohs
  edit "", 7, 39 80 106 10, read autohs
  edit "", 8, 39 92 106 10, read autohs
  edit "", 9, 39 104 106 10, read autohs
  text "Nickname:", 10, 11 21 26 8
  text "User@Host:", 11, 8 33 29 8
  text "Name:", 12, 21 45 16 8
  text "Channels:", 13, 13 57 24 8
  text "Server:", 14, 20 69 17 8
  text "Idle:", 15, 27 81 10 8
  text "Away:", 16, 22 93 15 8
  text "Status:", 17, 20 105 17 8
  button "OK", 18, 105 124 37 12, ok
}

on *:dialog:pre.whois:init:0:{
  did -a pre.whois 2 %pre.whois.nickname
  did -a pre.whois 3 %pre.whois.user@host
  did -a pre.whois 4 $remove(%pre.whois.name,,,,)
  did -a pre.whois 5 %pre.whois.channels
  did -a pre.whois 6 %pre.whois.server
  did -a pre.whois 7 %pre.whois.idle
  did -a pre.whois 8 $remove(%pre.whois.away,,,,)
  did -a pre.whois 9 %pre.whois.status
}

on *:dialog:pre.whois:sclick:18:{
  unset %pre.whois.*
}

#pre.whois on

; Away

raw 301:*:{
  set %pre.whois.away $3-
  haltdef
}

; Identified?

raw 307:*:{
  set %pre.whois.identified yes
  haltdef
}

; Nickname, User@Host, Name

raw 311:*:{
  set %pre.whois.nickname $2
  set %pre.whois.user@host $3 $+ @ $+ $4
  set %pre.whois.name $6-
  set %pre.whois.status Regular User
  unset %pre.whois.away  
  haltdef
}

; Server

raw 312:*:{
  set %pre.whois.server $3
  haltdef
}

; IRCop

raw 313:*:{
  set %pre.whois.status IRC Operator
  haltdef
}

; Idle time

raw 317:*:{
  set %pre.whois.idle $3
  haltdef
}

; End of /WHOIS List

raw 318:*:{
  haltdef
  if ($dialog(pre.whois) == $null) { dialog -m pre.whois pre.whois }
  else {
    did -r pre.whois 2
    did -r pre.whois 3
    did -r pre.whois 4
    did -r pre.whois 5
    did -r pre.whois 6
    did -r pre.whois 7
    did -r pre.whois 8
    did -r pre.whois 9
    did -a pre.whois 2 %pre.whois.nickname
    did -a pre.whois 3 %pre.whois.user@host
    did -a pre.whois 4 $remove(%pre.whois.name,,,,)
    did -a pre.whois 5 %pre.whois.channels
    did -a pre.whois 6 %pre.whois.server
    did -a pre.whois 7 %pre.whois.idle
    did -a pre.whois 8 $remove(%pre.whois.away,,,,)
    did -a pre.whois 9 %pre.whois.status 
  }
}

; Channels

raw 319:*:{ 
  set %pre.whois.channels $3- 
  haltdef
}

#pre.whois end

; Popups

menu channel {
  Whoiz Reporter
  .Enable:{ .enable #pre.whois }
  .Disable:{ .disable #pre.whois }

Comments

Sign in to comment.
[M]ike   -  Jul 26, 2007

Good script, general useless (Just my opinion), but I guess it saves clicking the Status Window? Ah, well, neatly scripted and not too messy. Good job

 Respond  
xDaeMoN   -  Jul 26, 2007

On you raw 318, you can combine the switches so it would look like

 did -ra pre.whois ...
 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.