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 

Radio, Auto-Post to Channel

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Fri Sep 16, 2005 12:00 pm    Post subject: Radio, Auto-Post to Channel Reply with quote

//Edit:

How I can put an other colour into the text?

Code:
set radio_url "http://discopink.ch/sc_text2.php"
set time 1
set chan "#RadioPink"

if {![info exists ald]} {
set ald 1
timer $time radio_get
}

proc radio_get {} {
   global radio_url
   global thetext a chan time text
   set file [open "|lynx -source $radio_url" r]
   set html "[gets $file]"

   regsub -all "<br>" $html " " html
   regsub -all "<html>" $html " " html
   regsub -all "<font color=#333333>" $html " " html
   regsub -all "</font>" $html " " html
   regsub -all "<\[^b]{0,1}b{0,1}>" $html "" html
   regsub "text1=" $html "" html
   regsub "NOW PLAYING:" $html "Now on http://viptrend.com:8002/listen.pls playing \002" html

   putchan $chan $html
   putserv "privmsg $chan Radio: http://viptrend.com:8002/listen.pls"
        timer $time radio_get
}
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Sep 16, 2005 12:58 pm    Post subject: Reply with quote

Have you checked Colour and formatting codes from the Tcl FAQ?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Sep 16, 2005 1:04 pm    Post subject: Reply with quote


  • don't use lynx, use http package
  • you can embed mIRC colors in output text using the color escape character \003; check mIRC's docs for color code combinations; for example, this would be red on yellow:
    Code:

    putserv "privmsg #channel :\0034,8using colors on irc is lame\003"


_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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