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.

Radio, Auto-Post to Channel

Old posts that have not been replied to for several years.
Locked
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Radio, Auto-Post to Channel

Post by Balkanac »

//Edit:

How I can put an other colour into the text?

Code: Select all

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
}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

  • 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: Select all

    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: Select all

 tag when posting logs, code
Locked