mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 3
H
Hoju Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Jun 2004
Posts: 3
Hi, I'm wondering if there is a way to force text such as $nick in a /write command. Whenever I use it in the script I'm writing it uses my nick instead of "$nick" which is what I want it to write. Is there a way to make it write $nick instead?

Thanks.

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
I guess you could use $chr(36) $+ nick although there may well be another way that is intended for that purpose alone.

Regards,


Mentality/Chris
Joined: Jun 2004
Posts: 3
H
Hoju Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Jun 2004
Posts: 3
problem with that is there is still a space in between $ and nick (like this: $ nick), anyway to get rid of that space?

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
If you include the $+ bit the space should not be there.

Regards,


Mentality/Chris
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
/write file.txt $+($,nick) is somewhat shorter...

Other ways are $eval($nick,0) or something like /write file.txt $read(nick.txt,n) where nick.txt contains one line: $nick

Joined: Jun 2004
Posts: 3
H
Hoju Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Jun 2004
Posts: 3
i forgot to put a space before $+ that's why it wasn't working, but now it is, thanks a ton!! smile

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Ah yes, I was thinking the word 'evaluate' - I think $eval($nick,0) would be more appropriate. Turns out all is well though smile - Thanks for the info!

Regards,


Mentality/Chris
Joined: Dec 2002
Posts: 230
G
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
$!nick would be the easiest way here smile

Joined: Dec 2002
Posts: 23
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 23
I have a problem similar to this, so I am posting in this thread.

My addquote alias is:
Code:
.timer 1 1 write quote.txt $2-

When someone types "!addquote TEXT | describe #channel something"
My bot records 'TEXT' as the quote but performs the command folllowing the | which is obviously undesireable.
How can I make it write exactly what the user types and not evaluate the line it is given?
I have tried a few ideas with no luck. confused


R¹¶¬³¥

Link Copied to Clipboard