This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Formatting Output

Old posts that have not been replied to for several years.
Locked
m
martelman

Formatting Output

Post by martelman »

Just a quick question,

When trying to output a formatted msg, the formatting will remain if i use a putlog, but using putserv/putquick/puthelp, the formatting disappears.

(multiple spaces turn into 1 space.)
(using tcl format command on the data)

Is there a way to get around this, and how so.

martelman
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

I believe if you escape them (space \ space \ space \ etc) it will work; Don't hold me to that though.

Edit - I just tested it, and it worked fine. :)

Code: Select all

putserv "PRIVMSG $chan :\ \ \ \ \ \ \ test \ \ \ \ \ ."
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: Formatting Output

Post by egghead »

martelman wrote:Just a quick question,

When trying to output a formatted msg, the formatting will remain if i use a putlog, but using putserv/putquick/puthelp, the formatting disappears.

(multiple spaces turn into 1 space.)
(using tcl format command on the data)

Is there a way to get around this, and how so.

martelman
I'm not sure what formatting you are doing, but loading the below script on a bot, produces a formatted line on irc and the partyline:

Code: Select all

<egghead> !format
<eggheadsbot> hello           world           I am a bot     !!!

and on the partyline:

[02:03] LINE: hello           world           I am a bot     !!!
[02:03] <<egghead>> !egghead! !format 

Code: Select all

bind PUB - !format showformat

proc showformat { nick uhost hand chan text } {

   set stringA "hello"
   set stringB "world"
   set stringC "I am a bot"

   set line [format "%-15s %-15s %-15s" $stringA $stringB $stringC]

   append line !!!

   putlog "LINE: $line"

   puthelp "PRIVMSG $chan :$line"

   return 1

}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

What IRC client are you using?

Not all clients support formatted text.

On top of this, not all fonts support formatted text (using spaces).

And again, not all client scripts support formatting. mIRC has a very large problem when it comes to formatted text. If you leave mirc to display text on it's own (EG, not halting a ON TEXT event), it will work fine (font permitting). Once you start halting a script, and using echo with $1-, all spaces are lost.
m
martelman

Post by martelman »

I believe my problem may be my irc client than, thanks for the reply.
Locked