egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

channel topic for htcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Nov 11, 2005 12:58 pm    Post subject: channel topic for htcl Reply with quote

Hello there.

I need a proc to be used for my htcl webpage

http://81.7.142.2:3006/onchan.htcl?chan=%23all4us

As you can see, the topic section includes all the color/bold/underline tag etc. I need a proc to recognise these, and the colors, and to change them to html color/bold/underline tags. So then the actual color of the topic can be seen on my htcl website.

btw, htcl is html with tcl commands within the html.

Thanks in advance,
Chris Smile
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Nov 11, 2005 2:37 pm    Post subject: Reply with quote

something like this might help:
Code:
proc parseBold str {
 set c 0
 set htmlstring [lindex [split $str \002] 0]
 foreach bs [lrange [split $str \002] 1 end] {
  if {$c%2 == 0} {
   lappend htmlstring "<bold>$bs</bold>"
  } {
   lappend htmlstring $bs
  }
  incr c
 }
 return [join $htmlstring]
}

this will replace bold codes with <bold> & </bold> tags.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Nov 11, 2005 3:13 pm    Post subject: Reply with quote

thanks sir_fz

it returns:

Code:
Channel topic: 3( ( 3( :: W elcome to # alfn 3:: B F2 s tats: http://bf2s.com/player/44315144/ 3:: A uth e quals OP 3:: A uths: 15 H osts: 16 3:: P rotection i s ON :3: ) ) 3)


Some spaces within the script where the bold tags were. Its one of these things which seem impossible to do Sad
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Nov 11, 2005 7:46 pm    Post subject: Reply with quote

Why not try filtering or play around with it some more?
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Nov 11, 2005 8:46 pm    Post subject: Reply with quote

because i have no idea of how to do it, if you could give me some starters, then i can try and make something of it Smile
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Nov 11, 2005 9:08 pm    Post subject: Reply with quote

Listing of Directory -man-tcl8.4-TclCmd-
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber