mIRC Home    About    Download    Register    News    Help

Print Thread
#193315 18/01/08 06:08 AM
Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
Not sure if this is a bug or not, thought i'd post it and see tho

Code:
Alias test { set -u10 %var TEST | %var = TESTX }

In that code, the %var = TESTX stops the effect of the -u
Meaning the var is no longer timed and wont be unset after 10 seconds

But here:
Code:
Alias test { var %x | %x = lol | echo -a %x }

The %x = lol did not change the fact that %x is local, and %x is unset once the code ends

any explaination ? O_o


on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Originally Posted By: HelpFile
If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.

So, intended behaviour.

Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
that's not another script, it's the same one as you might have noticed.

as far as i expected, { %var = value } this should set a permanant var, but this: { set -u10 %var value | %var = value2 } shouldn't.
It should only "modify" the value, but leave the timing thing as it is.

Last edited by SplitFire; 18/01/08 06:58 AM.

on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
'another script' is anything other than the orignal set.

Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
for some reason, i think a "script" or a remote script is what's between { }, if it was meant like "another value than the original set" it would/should have been mentioned this way in the help file. mIRC users are not supposed to guess it you know.

On the other hand, If it's the way you say then it's a really stupid protperty of the way /set works, and should be changed asap coz it's more like a bug than a useful feature

The reason i ran into this issue in the first place was coding a flood protection that saves certain nicknames to %var like:
/set -u120 %var %var $nick
So the final result looks like: %var nick1 nick2 nick3 nick4

On another event, the saved nicknames were intended to be unset using %var = $remove(%var,$nick) (during the 120 seconds)
Ofcourse the whole thing didn't work properly coz the stupid timing was stopped/interrupted and the variable stayed set.

so yeah, not much of a useful feature to me, i think a variable should be permanant/global only if %var = value was used ALONE

Last edited by SplitFire; 18/01/08 09:30 AM.

on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I think it is more to the point for there to be a way to maintain the unset time while changing the value. This should be done with another -switch in the /set command. Example:

/set %A 1 => Permanent

/set -u60 %A 2 => Unsets after 60s

<17s pass>

/set -v %A 3 => Unsets after 43s (remaining time from -u60 switch)

%A = 4 => Becomes permanent again



Also, there should be a property added to $var to retrieve the time remaining in a /set -u## var. That way, you could modify the time based on how much remains. Example:

//echo -a $var(%A).unset => echos 12

/set %A $+(-u,$calc($var(%A).unset * 2)) 5 => Multiplies the time remaining by 2)


-genius_at_work

Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
nope, didn't work. I tried this:
Code:
alias test {
  set -u60 %testvar Hi
  .timer 1 10 { set -v %testvar Hello }
}


%testvar changed to Hello but became permanant

Last edited by SplitFire; 18/01/08 05:44 PM.

on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
He was giving a possible new switch as a feature suggestion. That is not an option at this time.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
So, talking at "this time" what would be the way to modify/change a timed variable's value without screwing up the timer ?


on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Maybe just set a regular time to remove the variable rather than using the variable's unset switch. That would work, but not positive it's the best way. In either case, I'd put this in the feature requests forum.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
well, i PM'd the thread URL to Khaled, i hope he'll either reply the PM or reply here on the thread.

*taps fingers and waits*

Last edited by SplitFire; 19/01/08 12:38 AM.

on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's not how he works. This forum is for such things. Don't PM him with issues like that. It wastes his time considering he already reads all bug posts and he doesn't respond with what will be fixed or not fixed except in rare occasions. As I said, make a feature request in that forum.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2007
Posts: 32
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
Well i didn't know about the "he doesn't respond with what will be fixed or not fixed except in rare occasions" part, i always thought reading a PM takes a minute or 2 maxium (not mentioning that my PM is only 1 line), but that's just me..

I have no (features) to suggest. For me, not being able to tweak/modify a pre-set timed variable without breaking the timer is a bug. However, i'll post this thread's link on the Feature Suggestion forum, 'coz i cant just copy/paste everything that was said on here, it's alot easier using the URL.


on me:*:JOIN:#: { .raw part # $crlf join # }
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Consider how many thousands of people use mIRC. Reading all of those PMs and e-mails takes more than a couple of minutes.

And as far as it being a bug... a bug is something that does not work as intended. The way /set and /var work is intended. Therefore, it is not a bug. If you want additional functionality, then it's a feature request. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard