mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2008
Posts: 1
S
Stijn Offline OP
Mostly harmless
OP Offline
Mostly harmless
S
Joined: Jun 2008
Posts: 1
Hey, I've got a construct that works like follows:

Code:
on *:TEXT:*:*:{
  onTEXT $nick $1-
}

alias onTEXT {
  ;put $1- in database
}


Now, whenever I say something containing for example $, the text seems to be evaluated in the on TEXT handler rather than treated as plain text. I get this error message echo'd:

* No such identifier: $much

(if I say a line containing "$much"). This is not what I want, I want the text to be passed on without evaluating. Any way to do this?

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
mIRC already does that its most likely the code that puts it in the database.


$maybe
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
alias onTEXT {
  if ($ isin $1-) { halt }
  ;put $1- in database
}


Perhaps that will escape it.

Last edited by Tomao; 26/06/08 07:14 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
have a look at /help $eval

Code:
on *:text:*:*: { 
  youralias $eval( $nick $1- ,1)
}

; just for you to see what data is stored
youralias {
  set -su %test $1-
}


Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
There's absolutely no need to do that. There's no need to escape anything and using $eval(something, 1) is exactly the same as using something alone. Neither evaluation nor blindly escaping/halting will fix this because it's clearly not the source of the problem.

Most likely some part of the code uses /scon or /scid, but the only way to be sure is for the OP to show the appropriate code he is using.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You're right, I mixed things up badly (mistook the fact that it didn't evaluate in the example with eval for doing so because of eval)...
My apologies.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I concur with Starbucks. There's no way of knowing what the OP has in mind when he or she fails to provide an adequate specification in the question.

Last edited by Tomao; 26/06/08 11:25 PM.

Link Copied to Clipboard