|
|
Joined: Apr 2008
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Apr 2008
Posts: 10 |
Hi, i got a bit of a brain tickler. I have not been able to figure out: on *:TEXT:*:%self.joinchannels: {
.set %user. $+ $nick $+ .pastline $+([%user. $+ $nick $+ .thisline])
.set %user. $+ $nick $+ .thisline $1-
} here i can set %user.<NICKNAME>.thisline with the current text, but to set %user.<NICKNAME>.pastline with %user.<NICKNAME>.thisline how ever i have tried doesnt set it with "thisline"'s text at all, current above sets the text as %user.<NICKNAME>.pastline [%user.<NICKNAME>.thisline]
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on *:text:*:%sefl.joinchannels:{
set $+(%,user.,$nick,.pastline) $($+(%,user.,$nick,.thisline),2)
set $+(%,user.,$nick,.thisline) $1-
}
I honestly don't remember where I learned that, but it is correct. Note: If you want to use local variables (ie: one's that unset when the script is done), use /set -l not /var In another topic I was shown that dynamic variables set in this method can not be done properly using /var
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
//var %x. $+ $time t | echo -a %x. [ $+ [ $time ] ] Works fine. The only difference seems to be that the '=' in /var is treated as text if the variable name is dynamic. //var %x. $+ $time = t | echo -a %x. [ $+ [ $time ] ]
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Yes, I agree that doing it that way works, but //var $+(%x.,$time) t | echo -a $($+(%x.,$time),2) just returns the same as $time. The difference is in the formation of the dynamic variable.
|
|
|
|
Joined: Apr 2008
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Apr 2008
Posts: 10 |
on *:text:*:%sefl.joinchannels:{
set $+(%,user.,$nick,.pastline) $($+(%,user.,$nick,.thisline),2)
set $+(%,user.,$nick,.thisline) $1-
}
I honestly don't remember where I learned that, but it is correct. Note: If you want to use local variables (ie: one's that unset when the script is done), use /set -l not /var In another topic I was shown that dynamic variables set in this method can not be done properly using /var OMG! Thank you, that soooo worked! thanks a million^10!
|
|
|
|
|
|