The Complete Internal Address List

Contributed by ToPScriptz

Contents
  • Author
  • Types of IAL
  • About IAL
  • Why is IAL so important
  • IAL Identifiers
  • Implementing IAL Auto Update
  • A quick note for /updatenl

    Author
    Alias: ToPDawG aka ToPScriptz
    Contact: [email protected]
    Date: Oct 14 2002

    Types of IAL
    1. Internal Ban List (IBL)
    2. Global IAL
    3. Channel IAL

    About IAL
    The IAL is mirc's memory of who is in a channel and what their full nickmask is.
    EXA: [email protected]

    mIRC receives this information from the server. Unfortunatly irc servers do not give you this information until someone has spoken either in a query/notice/channel, has joined the channel, or made a mode change. Also, for the address to STAY in the IAL the user MUST be in a common channel.

    People idling in a channel are not in your IAL until they talk or make a mode change or you request the information via a /who on the entire channel or do a /userhost or /who or /whois or /dns on an individual.

    Why is IAL so important?
    Scripts such as clone scanning, and setting bans will need a working IAL. Also, some of mirc's identifiers related to nickmasks are dependant on you maintaining your IAL. For example, $address, $fulladdress, $wildsite, /ban, /guser, /dns, /ignore, etc.. Also, events that are only triggered if the user is defined with /guser.

    All of these commands have 1 thing in common. They require the full nickmask of the affecting user. And that is why your IAL should be up-to-date b4 u plan on using it.

    IAL Identifiers
    $ial() Global IAL
    $ibl() Internal Ban List. Updated via /mode $chan +b
    $ialchan() Channel specific IAL
    /ial [on | off] Turns IAL on or off
    /updatenl Removes a nickmask from the ial after a part, quit and kick
    /ialclear [nick] The Nick is optional and Nickmasks may not be supported (6.02)
    /ialmark [Text] Adds or clears a note to the ial entry

    Implementing IAL Auto Update
    a /who upon joining a channel may cause an excess flood

    Also... doing a /who on a channel while ur the only one in it is rather pointless. And a waist of your bandwidth and query buffer space.

    $nick($chan,0) is the identifier used to check how many ppl are in a channel. Unfortunatly the On Join event is triggered before mirc knows who is in a channel.

    So, after mirc knows how many people are in the channel you will be ready to do your /who. Note the Raw 366 used instead of On Join.


    on *:JOIN:#: {
    ��echo -est >> JOINING A CHANNEL >> $nick == $me
    ��if ($nick == $me) { set -u240 %ialupdate. [ $+ [ $chan ] ] $true }
    }

    ; Preforms /checkialjoin after the /names list
    raw 366:*: {
    ��if ($ialchan(*,$2,0) == $nick($2,0)) {
    ����;IAL is Up to Date. Prolly u r the only one in the chan!
    ����return
    ��}
    ��if (%ialupdate. [ $+ [ $2 ] ]) { set -u240 %ialupdate. [ $+ [ $2 ] ] $true | .timer -m 1 1 checkialjoin $2 }
    }
    alias checkialjoin {
    ��if ($nick($1,0) >= 300) {
    ����if ($idle < 180) && ($$?!="Update IAL for $1 $+ ") { /who $1 }
    ��}
    ��else { echo 12 -est DOING /who | /who $1 }
    }


    ; Halts the display of the /who
    raw 352:*:if (%ialupdate. [ $+ [ $2 ] ]) { set -u240 %ialupdate. [ $2 ] ] $true | halt }
    raw 315:*:if (%ialupdate. [ $+ [ $2 ] ]) { set -u240 %ialupdate. [ $2 ] ] $true | halt }


    This script asks to update the list if there are over 300 users in it. And does not ask if you have been idle for 180 seconds. Otherwise a /who is preformed and your IAL will be fresh as soon as its finished. The output of the /who is halted to prevent display.
    The %ialupdate.$chan variable is used so a /who is only preformed after the /names list that is received when joining a channel. It is a protection against a /who being done when /names is preformed on a channel u r not in.

    /updatenl
    A quick note for /updatenl

    When a user is kicked, parts or quits they are not removed from the IAL until the end of the event. If you plan on using IAL think about the fact that it will tell you the user is in the channel ial but really, they have quit irc. Avoid bugs like this with the /updatenl command.

    on *:QUIT: {
    ��var %addr = $fulladdress
    ��inc %flood. [ $+ [ %addr ] ]
    ��/updatenl
    ��/filterkick %addr
    }


    If /updatenl is not executed the address of the user who has quit will still be recognized as in the channel. Where as by updating it the filterkick alias will say, $address is not in the channel and there is nobody there to kick.

    End of Document
    Author information is located at the top.
  • All content is copyright by mircscripts.org and cannot be used without permission. For more details, click here.