Author Topic: Sending pipe char inside a message  (Read 2427 times)

0 Members and 1 Guest are viewing this topic.

Offline ruspant

  • Member
  • ***
  • Posts: 42
  • Karma: +1/-0
Sending pipe char inside a message
« on: 29 April, 2005, 21:24:30 »
I have an ascii text file which contains a list of emot.
Most of them contains  |  (pipe) char.
If I use this file with Ptokax text support, the main chat "explodes" and the message is splitted.
Obviously pipe chars are seen as message delimiters.
Is there a way to format the message in order to be seen correctly in main chat ?
thx

PtokaX forum

Sending pipe char inside a message
« on: 29 April, 2005, 21:24:30 »

Offline ruspant

  • Member
  • ***
  • Posts: 42
  • Karma: +1/-0
(No subject)
« Reply #1 on: 29 April, 2005, 21:40:27 »
Just found a solution.

replace pipe char ( | )

with the sequence

   |

which is interpreted as a pipechar by chat window.

Greetings

Offline bluebear

  • Double Ace
  • *
  • Posts: 116
  • Karma: +12/-0
  • Life is a bitch - And then you marry one!
Re: Sending pipe char inside a message
« Reply #2 on: 05 March, 2006, 11:43:54 »
I know im a little late.

A DirectConnect protocol message starts with "$" and ends with "|" therefore thease 2 chars can't be used in a chat message. So your need to escape them like this:

"$" escape too -> "$"
"|" escape too -> "|"

When client receives thease escape codes, it will turn them back into "$" and "|".

And acording to the DC wiki "&" escapes into "&", but it should not be nessesary to escape for chat messages. However "&" must escape in $UserCommand :)
« Last Edit: 05 March, 2006, 11:50:38 by bluebear »
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

PtokaX forum

Re: Sending pipe char inside a message
« Reply #2 on: 05 March, 2006, 11:43:54 »