mIRC Homepage
Posted By: RusselB $network and/or $nick not being filled - 20/08/08 01:49 AM
This first situation occurs occasionally, but I'm unable to determine any rhyme or reason for it. The code is
Code:
on *:disconnect:{
  .writeini -n connections.ini $network Nick $nick
  if $away {
    .writeini connections.ini $network Away $awaymsg
  }
}

Most of the time this works exactly as I expected, but occasionally I get a * /writeini: insufficient parameters message. Testing has shown that when this comes up, $network and/or $nick are returned as $null, so the error makes sense, I'm just wondering if there's a way to guarantee the information is present, or if someone has an alternative idea.
$network is filled with the NETWORK= token of raw 005, or failing that, by the network name the server is listed under in servers.ini. You're probably connecting to a server which isn't in your servers.ini and isn't providing a NETWORK= token in raw 005.
Posted By: RusselB Re: $network and/or $nick not being filled - 20/08/08 02:46 AM
The problem with that explanation (or at least the part of it being filled from raw 005), is that this problem isn't restricted to just one network, and there have been several times when the information has been passed correctly.

To my knowledge, the raw 005 is sent when you connect to the network, and this script uses the ON DISCONNECT event, so why wouldn't it be filled?

P.S.: I just confirmed that the network name is being sent from the raw 005.
Posted By: Wims Re: $network and/or $nick not being filled - 20/08/08 02:51 AM
It is possible that a server provide a $network and another server of the same network don't.
Posted By: RusselB Re: $network and/or $nick not being filled - 20/08/08 03:30 AM
Good point.. I'll see if I can check all of the servers to make sure they're all sending the same information, and, if not, let the network owner know.
Posted By: maroon Re: $network and/or $nick not being filled - 20/08/08 04:27 AM
This is the on-disconnect event that isn't having a $network value - are you sure it was also blank while connected? I thought i remembered once about an issue where an event like this was forgetting the value it 'knew' earlier.
Posted By: RusselB Re: $network and/or $nick not being filled - 20/08/08 05:31 AM
Hmm.. could be... I'll try to do some testing.. if this is the case, I would definetly call it a bug, in which case it should be reported in the Bug Reports section. Unfortunately this doesn't seem to be easily reproducable, as I have had the script get the proper information, and write it to the ini file at times, and, yet, at other times, this error occurs.
© mIRC Discussion Forums