mIRC Home    About    Download    Register    News    Help

Print Thread
Quitting during /LIST results locked .txt #269168 05/07/21 03:31 AM
Joined: Nov 2004
Posts: 826
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 826
This is a minor bug.

I did /LIST on one of the networks I'm on (It's the one I'm scripting). It wouldn't fill, and stop doesn't work, nor could I close the window.

So I ended up disconnecting - which worked.

However, the list that was created in the mIRC directory was locked by the .exe meaning it couldn't be deleted without restarting mIRC.

Whether it was still trying to fill the list at that point is a guess.

Basically: if disconnect from network(during a list)->stop and free lock


What do you do at the end of the world? Are you busy? Will you save us?
Re: Quitting during /LIST results locked .txt [Re: Jigsy] #269169 05/07/21 07:11 AM
Joined: Dec 2002
Posts: 4,954
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,954
Thanks for your bug report. I have not been able to reproduce this issue so far. Are you able to reproduce this with a specific sequence of steps?

Re: Quitting during /LIST results locked .txt [Re: Khaled] #269170 05/07/21 03:13 PM
Joined: Nov 2004
Posts: 826
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 826
I figured this would be hard to reproduce.

Basically once raw 321 (Channel :Users Name) is received it opens the /LIST window.

Sending raw 321 to myself resulted in this, but the window couldn't be closed.

The only way to close it was to receive a raw 323 (:End of /LIST) reply.

That said, getting raw 321 on top of 321 also results in being unable to delete the .txt file, even after getting a 323 reply and closing the window.

Code
on *:socklisten:test:{ sockaccept testSock }
on *:sockread:testSock:{
  var %test = $null
  sockread %test
}


* /socklisten test 6667
* Connect to localhost 6667
* //sockwrite -nt testSock :fake.name 001 $mnick :Welcome to the localhost Network, $mnick
* //sockwrite -nt testSock :fake.name 321 $mnick Channel :Users Name
* Disconnect, 321 upon 321, etc.

* To close the window, you'll need to do this when connected: //sockwrite -nt testSock :fake.name 323 $mnick :End of /LIST

Last edited by Jigsy; 05/07/21 04:22 PM. Reason: Fixed 001.

What do you do at the end of the world? Are you busy? Will you save us?
Re: Quitting during /LIST results locked .txt [Re: Jigsy] #269186 12/07/21 11:26 AM
Joined: Dec 2002
Posts: 4,954
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,954
That is correct. You cannot close the list window while a listing is in progress. This is the intended behaviour. The reason for this is that not all servers send a list start numeric - they just send the 322 and 323 numerics. mIRC will open the list window and begin the list receive process either when the 321 list start numeric is received or when a 322 channel item is received. It will only end the list receive process once the 323 end of list numeric is received, or you disconnect from the server. At which point, the channels list file will be closed and unlocked and the list window can be closed.

Re: Quitting during /LIST results locked .txt [Re: Khaled] #269191 12/07/21 01:40 PM
Joined: Aug 2003
Posts: 295
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 295
@Jigsy was reporting that if you do a /list and then disconnect from the server, the channel list window will be unlocked and can be closed, but the channel list file remains locked perhaps because is it not being closed.

Re: Quitting during /LIST results locked .txt [Re: Protopia] #269192 12/07/21 05:05 PM
Joined: Dec 2002
Posts: 4,954
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,954
Quote
@Jigsy was reporting that if you do a /list and then disconnect from the server, the channel list window will be unlocked and can be closed, but the channel list file remains locked perhaps because is it not being closed.

Yes, that is what I read above as well :-] As I said, I have not been able to reproduce this, even with the example script in the previous post. The channels.txt file is closed/unlocked, and I can delete in explorer, when the listing ends or you disconnect from the server.

If you can find a step by step method that reproduces this, please let me know.

Re: Quitting during /LIST results locked .txt [Re: Khaled] #269193 12/07/21 06:21 PM
Joined: Nov 2004
Posts: 826
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 826
What about if this is sent after 321:

//sockwrite -nt testSock :fake.name 322 $mnick #somechan 1 :[+nt]


What do you do at the end of the world? Are you busy? Will you save us?
Re: Quitting during /LIST results locked .txt [Re: Jigsy] #269195 12/07/21 06:58 PM
Joined: Dec 2002
Posts: 4,954
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,954
Quote
What about if this is sent after 321:

//sockwrite -nt testSock :fake.name 322 $mnick #somechan 1 :[+nt]

That makes no difference here. I am still able to delete the channels.txt file after I click the disconnect button or use /disconnect.

If I try to delete the file before I click the disconnect button or /disconnect, explorer tells me the file is opened in mIRC.

The file is opened the moment a 321 or 322 is received, so it is locked at that point and only unlocked on a 323 or a disconnect.