forked from ValwareIRC/mIRC-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This script fixes the erroneous displaying of GEOIP whois numeric data
- Loading branch information
1 parent
d35e959
commit 149c627
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Simple script to fix the displaying of GEOIP whois numeric data | ||
# Valware © 2022 | ||
|
||
on *:PARSELINE:in:*:{ | ||
|
||
tokenize 32 $parseline | ||
|
||
; lose any msgtags as we don't need to touch them | ||
if ($left($1,1) == @) { | ||
tokenize 32 $2- | ||
} | ||
|
||
; we only are after 344 | ||
if ($2 !== 344) { return } | ||
|
||
%IsNew = $iif(connecting isin $5-,$true,$false) | ||
|
||
; if string contains "connecting", it's new. if it contains "connected" it's old. | ||
|
||
if (!%IsNew) { return } | ||
if ($server == $scid($activecid).server) { | ||
if ($GetWhoisBufferOption) { echo -at $4 is connecting from $9 ( $+ $5 $+ ) } | ||
else { echo -st $4 is connecting from $9 ( $+ $5 $+ ) } | ||
} | ||
else { echo -st $4 is connecting from $9 ( $+ $5 $+ ) } | ||
} | ||
|
||
|
||
; hide the old broken one | ||
RAW 344:*:{ | ||
if (connecting isin $4-) { HALT } | ||
} | ||
|
||
; function to honor the option which chooses whether to display whois strings in active window or not | ||
alias GetWhoisBufferOption { | ||
tokenize 44 $readini(mirc.ini,options,n2) | ||
if ($26 == 1) { return $true } | ||
return $false | ||
} |