mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Last edited by RusselB; 20/08/08 02:50 AM.
Joined: Jul 2006
Posts: 4,153
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,153
It is possible that a server provide a $network and another server of the same network don't.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.


Link Copied to Clipboard