|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
Is it possible to set $nick as a Nick Identifier within a set %variable?
I know you can use /set -n to treat value as plain text.
When I use this statement in a alias it returns my nick and not the Identifier $nick
alias test { set -n %line Hello $nick $+ , Your message has been recieved.... }
This is what i get %line Hello , Your message has been recieved....
This is what I am trying to achieve when I set the command %line Hello $nick $+ , Your message has been recieved....
The only way it seems to work is if I use this command /set -n %line Hello $nick $+ , Your message has been recieved....
If I try to use it in a alias it does not work. any Ideas on how to achieve the correct responce to using this in a aliases?
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
try to set $nick as a variable, and/or change $nick to $1, depends on where it's being used..
-Kurdish_Assass1n
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
Is this what you are looking for?
I'll use $ctime as an example:
//set %ctime $ctime //echo -a %ctime
Echos: 1153611089
//set %ctime $!ctime //echo -a %ctime
Echos: $ctime
-genius_at_work
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
I am trying to set a variable %line to contain this information
Hello $nick $+ , Your message has been recieved....
that way I can edit my message. the variable would be used in a statement like this
on ^:OPEN:?:*: { msg $nick %line }
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Feb 2004
Posts: 206
Fjord artisan
|
Fjord artisan
Joined: Feb 2004
Posts: 206 |
alias myLineOfText return Hello $1 $+ , Your message has been received....
on ^:OPEN:?:*: { msg $nick $myLineOfText($nick)}
Not the only way to skin this particular cat, of course! Cheers, DK
Darwin_Koala
Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
I am trying to set the line as a variable so other users can edit the line without having to edit the script. that is why I am looking for a way to use this as an alias so when the script is loaded it will not display the users nick.
it seems to be more of a bug within the /set command being used as a alias.
it works using /set -n %line Hello $nick $+ , Your message has been recieved....
but not when I use it as an alias alias test { set -n %line Hello $nick $+ , Your message has been recieved.... }
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
Is it possible to set $nick as a Nick Identifier within a set %variable?
I know you can use /set -n to treat value as plain text.
When I use this statement in a alias it returns my nick and not the Identifier $nick
alias test { set -n %line Hello $nick $+ , Your message has been recieved.... }
This is what i get %line Hello , Your message has been recieved....
This is what I am trying to achieve when I set the command %line Hello $nick $+ , Your message has been recieved....
The only way it seems to work is if I use this command /set -n %line Hello $nick $+ , Your message has been recieved....
If I try to use it in a alias it does not work. any Ideas on how to achieve the correct responce to using this in a aliases? you're trying to get the actual $nick in there, and, not to replace it with the nick? sorry, I'm just not understanding.
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
yes. That is what I am trying to achieve
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, understood, I have NEVER tried this, but, I don't know, maybe you could do something like set %line $ni $+ ck w/e here I don't know, I'll try it really quick, and, if I get there before you, then, I'll let you know what goes on
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
genius-at-work told you how to do this test this
alias test {
set %line Hello $!nick $!+ , Your message has been recieved....
msg $active %line
}
using the ! stops the identifier from performing, see if this will do what you asked
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
:\, lol, I came up with this.. $chr(36) $+ nick etc. lol, but, yea, I'd do what genius said to do :P
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
Thank you MikeChat That works command for me.....
Sometimes its the simplest thing that enables the most complicated script
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Hello $nick $+ , Your message has been recieved.... For that as yuo have been told already its set %line Hello $!nick $!+ , Your message has been recieved....on ^:OPEN:?:*: { msg $nick %line } For this i beleive you well find you need to use on ^:OPEN:?:*: { msg $nick $(%line,2) }other wise you really well send "Hello $nick $+ , Your message has been recieved...." to the nick.
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 417 |
Thanks davec. What I was doing, was setting the variables for a script I need to update.
The problem was, when the identifiers were loaded into the dialog window on load. it was loading my own nick as the nick name in the reply message.
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
|