Jump to content

Pipe (|) Processing


Pablo

Recommended Posts

Guest Travis

timer still evaluates pipes ( | ).. I was not talking about !. The same example you posted unfortunately still evaluates the | symbol.

 

//.timer 1 1 echo -a hahha | hahha

/vs/

 

//echo -a hahha | hahha

returns the same result (error): "hahha - invalid command"

 

Use the $chr value for the pipe. I don't remember it off hand. Find it like this.

 

//echo -a . $asc(|)

Link to comment
Share on other sites

timer still evaluates pipes ( | ).. I was not talking about !. The same example you posted unfortunately still evaluates the | symbol.

 

//.timer 1 1 echo -a hahha | hahha

/vs/

 

//echo -a hahha | hahha

returns the same result (error): "hahha - invalid command"

 

You must be doing something wrong, because it works fine for me:

 

//topic # test $chr(124) test | timer 1 1 echo -a $!chan( # ).topic

Output:

 

* Timer 1 activated

(13:23:54) * hixxy changes topic to 'test | test'

test | test

* Timer 1 halted

 

The example you posted is not the same as what I gave you.. for your example to work of echoing a pipe as plain text you would need to do this:

 

//timer 1 1 echo -a hahha $!chr(124) hahha

Or:

 

//timer 1 1 echo -a hahha $!(|,) hahha

Use the $chr value for the pipe. I don't remember it off hand. Find it like this.

 

//echo -a . $asc(|)

 

Same problem as I demonstrated in my earlier post, you would need to use $!chr(124)

Link to comment
Share on other sites

Guest Travis

The only reason for $! in a timer is to evaluate when the timer starts, not when it goes off. $chr(124) will always be evaluated as | regardless.

Link to comment
Share on other sites

with $(|) no comma is necessary since the evaluation of '|' simply does nothing.

 

You're right, $!(|) works fine :)

 

The only reason for $! in a timer is to evaluate when the timer starts, not when it goes off. $chr(124) will always be evaluated as | regardless.

 

Try this mate:

 

//timer 1 1 echo -a a $chr(124) b

As you will see it throws a "b unknown command" error.

 

The way to get around this is by using $!chr(124)

 

//timer 1 1 echo -a a $chr(124) b evaluates $chr(124) to plaintext "|" when the /timer command is first executed, then plaintext "|" is evaluated to special meaning "|" at the time that the timer fires.

 

Using my version,

 

//timer 1 1 echo -a a $!chr(124) b evaluates $!chr(124) to "$chr(124)" when the /timer command is first executed, then $chr(124) is evaluated to plaintext "|" at the time that the timer fires.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...