mIRC Home    About    Download    Register    News    Help

Print Thread
C
Chessnut
Chessnut
C
Noticed a bug with the /bwrite feature of mIRC. When trying to /bwrite non-evaluated plain-text or a variable starting with the character "%", it will always evaluate it and treat it as a variable.

Code:
//bwrite file -1 -1 $(%0D%0A,0)

Code:
//var %x = % $+ 0D%0A | bwrite file -1 -1 %x


returns:
* /bwrite: invalid parameters

Note: Using version 6.2

Last edited by Chessnut; 23/05/07 04:45 PM.
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
It looks like a side-effect of /bwrite's ability to treat %* tokens (in the evaluated string) as variables. I'm not sure why /bwrite does that, it might be a legacy thing, but I don't think it's of much use now: bwrite file S N %var will first evaluate %var and then write the first N bytes of the result in 'file' anyway. I'd rather see this functionality removed altogether.

S
Spitfire3292
Spitfire3292
S
Why, hello there Chessnut smile This does seem a bit weird. I think as well that the whole feature of that should disappear. It doesn't seem to have much use. Fixing the bug would be just as fine too.

Talk to you later on IRC Chess ;P

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Originally Posted By: Spitfire3292
I think as well that the whole feature of that should disappear. It doesn't seem to have much use.


Maybe not to you, but it has use to others.

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Can you mention an example where this would be useful?

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Well I myself don't use /bwrite but I've seen a few scripts that have used it.


Link Copied to Clipboard