<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/12447" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2006-09-20T19:03:07-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/12447</id>

		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2006-09-20T19:03:07-04:00</updated>

		<published>2006-09-20T19:03:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66502#p66502</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66502#p66502"/>
		<title type="html"><![CDATA[Basic script, writing info to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66502#p66502"><![CDATA[
That worked. Thanks.<br><br>~Nara<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Wed Sep 20, 2006 7:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2006-09-20T18:57:08-04:00</updated>

		<published>2006-09-20T18:57:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66501#p66501</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66501#p66501"/>
		<title type="html"><![CDATA[Basic script, writing info to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66501#p66501"><![CDATA[
Try:<br><div class="codebox"><p>Code: </p><pre><code>proc battle:flagsong {nick host hand chan text} {    global head tail delim dj    if {[channel get $chan advertonly]} { return }    if {$text != ""} {        putlog "\002Radio:\002 $nick \($hand\) flagged a song."        set song [battle:getxml]        if {$song != ""} {            regexp {&lt;SONGTITLE&gt;(.*?)&lt;\/SONGTITLE&gt;} $song match song            regsub -all {'} $song "'" song            regsub -all {&lt;} $song "&lt;" song            regsub -all {&gt;} $song "&gt;" song            regsub -all {&amp;} $song "&amp;" song            regsub -all {ÿ} $song "ñ" song            regsub -all {°} $song "º" song            regsub -all {&amp;} $song "&amp;" song        }        if {$dj == ""} {            set currentdj "AutoDj"        } else {            set currentdj $dj        }        set r [open flaggedsongs.txt a+]        puts $r "[strftime "%d %b %Y, %H:%M %z"]: $song was played on air and flagged by $nick \($hand\). DJ onair was $currentdj. Reason: $text"        close $r        putserv "PRIVMSG $nick :$head I have flagged the current song, which was \($song\). It will be reviewed by management. Reason provided: $text $tail"    } else {        putserv "PRIVMSG $nick :$head You must provide a reason. $tail"    }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Wed Sep 20, 2006 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2006-09-20T18:30:41-04:00</updated>

		<published>2006-09-20T18:30:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66500#p66500</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66500#p66500"/>
		<title type="html"><![CDATA[Basic script, writing info to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66500#p66500"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc battle:flagsong { nick host hand chan text } {global head tail delim djset chan [string tolower $chan]if !{ [channel get $chan advertonly] } {if !{ [string equal $text ""] } {putlog "\002Radio:\002 $nick \($hand\) flagged a song."set song [battle:getxml]if !{ [string equal $song ""] } {regexp {&lt;SONGTITLE&gt;(.*?)&lt;\/SONGTITLE&gt;} $song match songregsub -all {'} $song "'" songregsub -all {&lt;} $song "&lt;" songregsub -all {&gt;} $song "&gt;" songregsub -all {&amp;} $song "&amp;" songregsub -all {ÿ} $song "ñ" song                regsub -all {°} $song "º" songregsub -all {&amp;} $song "&amp;" song}if { [string equal $dj ""] } {set $currentdj "AutoDJ"} else {set $currentdj $dj}set r [open flaggedsongs.txt a+]puts $r "[strftime "%d %b %Y, %H:%M %z"]: $song was played on air and flagged by $nick \($hand\). DJ onair was $currentdj. Reason: $text"close $rputserv "PRIVMSG $nick :$head I have flagged the current song, which was \($song\). It will be reviewed by management. Reason provided: $text $tail"} else {putserv "PRIVMSG $nick :$head You must provide a reason. $tail"}}}</code></pre></div>It errors after <div class="codebox"><p>Code: </p><pre><code>if !{ [channel get $chan advertonly] } {</code></pre></div> with a 'Tcl error [battle:flagsong]: missing close-brace'<br><br>~Nara<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Wed Sep 20, 2006 6:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
