|
; http://dev.adiirc.com/boards/5/topics/170
|
|
; Colored Whois Script 1.0 by Amiga600
|
|
; Plus edition mod v0.1.1 by pereba
|
|
; Modifies the whole of the /WHOIS output, Re-arranges Channel Names
|
|
; in alphabetical order, and in order of rights level, eg ~&@%+
|
|
|
|
; Colors Channels based on users rights
|
|
; eg. ~Purple &Yellow @Red %Green +Blue Modeless=Green
|
|
|
|
; mIRC Colors: White0 Black1 DarkBlue2 DarkGreen3 LightRed4 DarkRed5
|
|
; Purple6 Brown7 Yellow8 LightGreen9 DarkCyan10 LightCyan11 LightBlue12
|
|
; LightPurple13 DarkGrey14 White15
|
|
|
|
; Colors can be adjusted below to users preferences
|
|
; whoismain - Main color of the whois block (14=grey)
|
|
; whoisother - the extra data of the whois block (3=dark green)
|
|
|
|
; ==== Config =====
|
|
|
|
; colors explained above:
|
|
alias -l whoismain return 14
|
|
alias -l whoisother return 3
|
|
|
|
; Where to display the whois? 1 for custom window, other value current window. Default is 1.
|
|
alias -l EnableWhoisWindow return 1
|
|
|
|
; Window mode: 1 (default) for tool/modal (no taskbar entry), other value for standalone desktop window.
|
|
alias -l WindowMode return 1
|
|
|
|
; Set desktop whois window on top? 1 to enable, other value to disable. ON by default.
|
|
alias -l whoisontop return 1
|
|
|
|
; Window size (default 650x300)
|
|
alias -l width return 650
|
|
alias -l height return 300
|
|
|
|
; Set alias bellow to 1 if you want to see the raw code for each whois line (OFF by default)
|
|
alias -l EnableEchoRaw return 0
|
|
|
|
; Set 1 to clear whois windows if previously opened. ON by default.
|
|
alias -l whoisclear return 1
|
|
|
|
; ==== Script =====
|
|
|
|
alias -l echoraw {
|
|
if ($EnableEchoRaw == 1) { return $1 }
|
|
}
|
|
|
|
raw 311:*: {
|
|
var %whoistitle $+(@,Whois,$chr(160),-,$chr(160),$2)
|
|
if ($EnableWhoisWindow == 1) {
|
|
if ($whoisclear == 1) { clear %whoistitle } else { if ($window(%whoistitle)) { echo %whoistitle $chr(160) } }
|
|
$iif($window(%whoistitle), window -a %whoistitle, window -dCk0iw1 $+ $iif($whoisontop == 1, o) $iif($WindowMode == 1, +L) %whoistitle -1 -1 $width $height)
|
|
}
|
|
echo -a $echoraw([000]) $chr(3) $+ $whoismain *** Start Of Whois For User $chr(3) $+ $whoisother $2 $chr(3) $+ $whoismain ***
|
|
echo -a $echoraw([311]) $chr(3) $+ $whoismain $strip($2) is $chr(3) $+ $whoisother $+ $strip($3) $+ @ $+ $strip($4) $chr(3) $+ $whoismain $+ ( $+ $6- $+ )
|
|
halt
|
|
}
|
|
|
|
raw 379:*:{ echo -a $echoraw([379]) $chr(3) $+ $whoismain $2 User Modes: $chr(3) $+ $whoisother $strip($6) $chr(3) $+ $whoismain Server Modes: $chr(3) $+ $whoisother $strip($7) | halt }
|
|
raw 378:*:{ echo -a $echoraw([378]) $chr(3) $+ $whoismain $2 Host: $chr(3) $+ $whoisother $strip($6) $chr(3) $+ $whoismain IP: $chr(3) $+ $whoisother $strip($7) | halt }
|
|
raw 307:*:{ echo -a $echoraw([307]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 319:*:{
|
|
var %chan $sorttok($strip($3-),32,c)
|
|
var %chan $replace(%chan,$chr(32),$chr(3) $+ $whoisother $+ $chr(32))
|
|
var %chan $replace(%chan,$chr(33),$chr(3)13 $+ $chr(33) ) | ; !admin (same as Owner in some networks) Purple
|
|
var %chan $replace(%chan,$chr(126),$chr(3)13 $+ $chr(126) ) | ; ~Owner Purple
|
|
var %chan $replace(%chan,$chr(38),$chr(3)8 $+ $chr(38) ) | ; &Protect Yellow
|
|
var %chan $replace(%chan,$chr(64),$chr(3)4 $+ $chr(64) ) | ; @Op Red
|
|
var %chan $replace(%chan,$chr(37),$chr(3)9 $+ $chr(37) ) | ; %HalfOp Green
|
|
var %chan $replace(%chan,$chr(43),$chr(3)11 $+ $chr(43) ) | ; +Voice L-Blue
|
|
var %total = $comchan($2,0), %output, %x = 1
|
|
if (%total > 1) && ($2 != $me) {
|
|
while ( %x <= %total ) {
|
|
%output = $addtok(%output,$comchan($2,%x),32)
|
|
%bosta = $comchan($2,%x)
|
|
var %chan $replace(%chan,%bosta,$chr(31) $+ %bosta $+ $chr(31))
|
|
inc %x
|
|
}
|
|
}
|
|
echo -a $echoraw([319]) $chr(3) $+ $whoismain $2 on $numtok(%chan,32) Channels: $chr(3) $+ $whoisother %chan
|
|
halt
|
|
}
|
|
raw 312:*:{ echo -a $echoraw([312]) $chr(3) $+ $whoismain $2 Server: $chr(3) $+ $whoisother $strip($3) ( $+ $strip($4-) $+ ) | halt }
|
|
raw 301:*:{ echo -a $echoraw([301]) $chr(3) $+ $whoismain $strip($2) is $chr(3)4AWAY $chr(3) $+ $whoismain $+ : $chr(3) $+ $whoisother $3- | halt }
|
|
raw 313:*:{ echo -a $echoraw([313]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 338:*:{ echo -a $echoraw([313]) $chr(3) $+ $whoismain $strip($2) $chr(3) $+ $whoisother $strip($3-) | halt }
|
|
raw 310:*:{ echo -a $echoraw([310]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 335:*:{ echo -a $echoraw([335]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 614:*:{ echo -a $echoraw([614]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 671:*:{ echo -a $echoraw([671]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 320:*:{ echo -a $echoraw([320]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 330:*:{ echo -a $echoraw([330]) $chr(3) $+ $whoismain $2 $4- $chr(3) $+ $whoisother $3 | halt }
|
|
raw 317:*:{ echo -a $echoraw([317]) $chr(3) $+ $whoismain $2 Idle: $chr(3) $+ $whoisother $strip($duration($3)) $chr(3) $+ $whoismain - SignOn: $chr(3) $+ $whoisother $strip($asctime($4)) $chr(3)14( $+ $duration($calc($iif($adiircexe,$gmt,$ctime) - $4)) ago) | halt }
|
|
raw 275:*:{ echo -a $echoraw([275]) $chr(3) $+ $whoismain $strip($2-) | halt }
|
|
raw 615:*:{ echo -a $echoraw([615]) $chr(3) $+ $whoismain $2 User Modes: $chr(3) $+ $whoisother $strip($6) $chr(3) $+ $whoismain Server Modes: $chr(3) $+ $whoisother $strip($7) | halt }
|
|
raw 616:*:{ echo -a $echoraw([616]) $chr(3) $+ $whoismain $2 Host: $chr(3) $+ $whoisother $strip($5) $chr(3) $+ $whoismain IP: $chr(3) $+ $whoisother $strip($6) | halt }
|
|
|
|
raw 401:*:{ set %wdone veadinho } ;nick not found
|
|
|
|
raw 318:*: {
|
|
if (%wdone) { ;stop cuz nick not found
|
|
haltdef
|
|
unset %namec
|
|
unset %wdone
|
|
return
|
|
}
|
|
haltdef
|
|
var %whois.Clones $ial($address($2,2),0)
|
|
if (%whois.Clones > 1) {
|
|
var %clones $iif($EnableEchoRaw == 1,[Clones])
|
|
echo -a $echoraw([Clones]) $chr(3) $+ 8,1 User/Service $+ $chr(3) $+ 13,1 $2 $chr(3) $+ 8,1has $calc($ial($address($2,2),0) - 1) Other Clone(s):
|
|
var %iee $ial($address($2,2),0)
|
|
while %iee {
|
|
if ($gettok($ial($address($2,2),%iee),1,33) != $2) {
|
|
echo -a %clones $chr(3) $+ 8,1 %iee = $v1 $chr(3)13,1 $address($v1,5)
|
|
}
|
|
dec %iee
|
|
}
|
|
}
|
|
echo -a $echoraw([318]) $chr(3) $+ $whoismain *** End Of Whois ***
|
|
unset %namec
|
|
}
|
|
|
|
}
|