mIRC Home    About    Download    Register    News    Help

Print Thread
#239003 16/09/12 11:54 PM
Joined: Jul 2006
Posts: 4,150
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
I'm not exactly sure if this is intended but it seems wrong.
$sockbr is set to the number of bytes read by the last /sockread command used for that socket, not for that event, it's possible for $sockbr to have a value (different than 0) even though you didn't use /sockread in the scope of that event.
I think it should only be set once /sockread has been used in the actual scope.
For example:
Code:
on *:sockread:mysocket:{
if (!%test) { sockread 5 &a | set %test 1 }
else echo -a $sockbr shouldn't be 5 here, but it is
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #239008 17/09/12 07:00 AM
Joined: Dec 2002
Posts: 5,424
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,424
Thanks for the bug report. Have you checked to see whether this behaviour has changed since v6.35 or prior versions? If not, it is by design and has most likely worked this way since 1997, when it was first added. Changing it now would affect every script that has been created during that time.

Khaled #239014 17/09/12 09:09 AM
Joined: Jul 2006
Posts: 4,150
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
I did not check previous version, I assumed the behavior never changed.
The behavior isn't really a problem, I reported it for consistency's sake, but it's been a long time since I wanted to say this.

I must say I find the concern about backward compatibilities a bit ridiculous sometimes, I'd rather see consistency and known bugs fixed, always, as far as possible.
Of course some known bugs are not fixed for good reasons, but I think the 'backward compatibilities' reason isn't helping to make mIRC a better program, dropping the support for codepage was a very good thing.
It's not as though the few affected scripts couldn't be fixed either, there's a very good support on this forum and on irc when it comes to help people with their scripts. I think that if you, the author of the program, see a behavior as a bug because that's not how you intented it to work, it should be fixed, again, as far as possible.
Also, we are talking about bugs, meaning the few affected scripts would be using bugs on purpose? It doesn't make sense. It's not that often that the bugs reported here are very subtle, they are usually quite obvious and technically, a script shouldn't use an obvious buggy behavior on purpose, you should blame those scripts instead of blaming mIRC.
Saying a change would affect existing scripts is an assumption, but in the meantime if a bug is reported, it means users are really concerned, I really wonder what are you thought on this.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #239034 18/09/12 02:59 AM
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
I don't see any reason to change this behavior.


Link Copied to Clipboard