mIRC Home    About    Download    Register    News    Help

Print Thread
#138553 02/01/06 07:21 PM
Joined: Aug 2005
Posts: 25
E
enotsoc Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Aug 2005
Posts: 25
if i was to echo text , how can i make sure that $eval codes are ignored before i continue the echo'd text
specifically
$eval($findfile(c:\,*.*,0,scon -a amsg $1-))
but would rather ignore any $eval so no one can make my mirc run anything bad.

#138554 02/01/06 10:34 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The easiest way to do that, is to remove the $eval from the entry.
eg:
Code:
 on *:text:*:*:{
echo $iif($eval isin $1-,$remove($1-,$eval),$1-)
}
 


This is by no means foolproof.

#138555 02/01/06 11:50 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The $eval() wouldn't be treated as code unless you were evaluating more than once whatever variable/identifier contained it. The only way this can typically happen without you explicitly writing the code to do so is if you're using timers or scon/scid.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#138556 03/01/06 06:53 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$eval well be evaluated to null frown

This might work %text = $+($chr(2),$chr(2),$replacex(%text,$chr(32),$+($chr(32),$chr(2),$chr(2))))

Puts a double bold after each space (and at the start of the line), which should cause anything that might have been reevaluated (assuming a reevaluation occurs) to be seen as plain text

(might end up with a string to long error on big lines with lots of spaces)


Link Copied to Clipboard