mIRC Home    About    Download    Register    News    Help

Print Thread
spaces with $1- #26272 27/05/03 12:58 AM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
When I..
* junx changes topic to 'hjh9 jkhk'

Do you see the spaces?

raw 332:* { echo -a * Topic is ' $+ $3- $+ ' | haltdef }

* Topic is 'hjh9 jkhk'

Now how do I get the $3- identifier (or whatever) to show ALL spaces?


-junx
Re: spaces with $1- #26273 27/05/03 01:50 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Code:
raw 332:*: echo $2 * Topic is: $replace($chan($2).topic,$chr(32),$chr(160)) | halt

That's the only way I know.

Re: spaces with $1- #26274 28/05/03 11:18 PM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
ahhh
i just seen something..
it didnt show all of the spaces when i changed the topic..


-junx
Re: spaces with $1- #26275 28/05/03 11:20 PM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
what i ment was when i $3- it will only show one space between the words when there are many... it didnt show it right when i posted it..


-junx
Re: spaces with $1- #26276 29/05/03 05:03 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Yes, I know what you mean. The board strips spaces too.

As you can see, the only way to retrieve the correct number of spaces, is by using the internal identifier $chan(#channel).topic, because $3- of the raw event has already stripped the spaces.

You can also use that identifier in the on topic event, that occurs when someone changes the topic.