Hello,
I have an idea for a simple script I want to write. I'd like to know if it's possible in mIRC. Disclaimer: it could be the script could be unfriendly or unwelcome, or interpreted as such if it's suspected; but it's also merely a recombination of existing information that the server makes available. Possible moral dilemma on that matter.
Regardless, mIRC isn't my primary programming language, so I'd like to express myself in a syntax which is more comfortable for me. The square brackets denote a hash lookup.
on 1:TEXT:*:*:{
if $host not in $primarynicks {
$primarynicks[ $host ]= $nick
$primarynicks_q.append( $host )
while len( $primarynicks_q )> 1000 {
pop( $primarynicks_q, 0 )
}
} else if $primarynicks[ $host ]!= $nick {
$nick = $nick ( $+ $primarynicks[ $host ] $+ )
}
}
The effect of the script is to add a comment affixed to the user's nick in the chat window. The comment reveals any previous nicks that have originated from the same host in any of your channels, by associating them all with the first "observation" in that data set. $primarynicks is one of the possible definitions of a reverse IAL. The 'while' loop lines 5-7 merely limits the size of the hash to the N most recent entries (shown as 1000), and also could just be an 'if' in many cases.
Beyond the syntax, the issues I'm aware of are:
1) The absence of an array type, so the "queue" would need to be approximated with a hash.
2) $nick is a read-only variable (line 9)
3) If the hash is made persistent between sessions, it loses integrity. If not, a /who #channel must be executed, or the information is lost.
4) The "comments" could interfere with another user's privacy, if they are merely using the same machine, for example the web gateway, as someone who is already in your list.
How significant are the issues? Is there a workaround to display the usual line with the additional comment? The $host variable may cloud the point a little; that information appears as "$site" in Remote Identifiers ("$site Returns the portion of $address after the @") but ".host" in the properties of the IAL.