06-06-2020, 03:57 +0200
Forum: Overvieweggdrophelp
idea is to get the info from whois and whowas and use it further on
AuthorPost
mateX  07-09-2006, 16:46   | Need help in handling irc raw data ICQ
Member since 07/2006
1 Post
proc raw:rev:311 {f k t} {
   set nick [lindex [split $t] 1]
   set ident [lindex [split $t] 2]
   set hostmask [lindex [split $t] 3]
   set ::raw:whois:data($nick) $nick
   set ::raw:whois:data($ident) $ident
   set ::raw:whois:data($hostmask) $hostmask
   unbind raw - 311 raw:rev311
}

proc raw:nonick401  {f k t} {
 global myidx
 set set target $::whoistarget
   putidx $myidx "$::whoistarget whois info is not avaible, checking whowas"
   putserv "WHOWAS $::whoistarget"
   bind raw 314 raw:rev:314
   unbind raw 401 raw:nonick
 }

proc raw:rev:314 (f k t} {
   set nick [lindex [split $t] 1]
   set ident [lindex [split $t] 2]
   set hostmask [lindex [split $t] 3]
   set ::raw:whowas:data($nick) $nick
   set ::raw:whowas:data($ident) $ident
   set ::raw:whowas:data($hostmask) $hostmask
   bind raw - 406 raw:nonick406
   unbind raw - 314 raw:rev314
}

proc raw:nonick406  {f k t} {
  global myidx
  set target $::whoistarget
    putidx $myidx "can't see $::whoistarget on network"
    putserv "WHOWAS $::whoistarget"
  bind raw 314 raw:rev:314
  unbind raw 401 raw:nonick
 }

bind dcc o infonick dcc:infonick
proc dcc:infonick {hand idx arg} {
 global myidx
 set myidx $idx
 set target [lindex [split $arg] 1]
 set ::whoistarget $target
 if {$arg == ""} {
   putidx $idx "Usage: .infonick <Nick>"
 }
 if {$arg != ""} {
   putserv "WHOIS $target"
   bind raw - 311 raw:rev311
   bind raw - 401 raw:nonick401
 }
 if {[info exist ::raw:whois:data($nick)]} {
   putidx $myidx "$arg is: $::raw:whois:data($nick)!$::raw:whois:data($ident)@$::raw:whois:data($ident)"
 }
 if {[info exist ::raw:whowas:data($nick)]} {
   putidx $myidx "$arg is: $::raw:whowas:data($nick)!$::raw:whowas:data($ident)@$::raw:whowas:data($hostmask)"
 }
}
This post was edited 1 times, last on 07-09-2006, 19:58 by mateX
Advanced options for this topic:
This thread is closed
Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen | Time: 153.6 msec, CPU time: 50.8 msec, 30 Database queries in 113.4 msec | 3 kB (10.8 kB) | Timezone: +0200