<?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/13308" />

	<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>2007-04-03T11:00:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Immow]]></name></author>
		<updated>2007-03-29T04:25:44-04:00</updated>

		<published>2007-03-29T04:25:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71673#p71673</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71673#p71673"/>
		<title type="html"><![CDATA[RSS unicode problem [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71673#p71673"><![CDATA[
<em class="text-italics">I downloaded this script for Slennox's TCL archive. I contacted the person who wrote this script but he could not help me. </em><br><br>I know he is nice but he could not find a solution.<br><br>Is there no way to just remove the "" symbols from the output?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8847">Immow</a> — Thu Mar 29, 2007 4:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[smash]]></name></author>
		<updated>2007-03-28T22:10:27-04:00</updated>

		<published>2007-03-28T22:10:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71670#p71670</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71670#p71670"/>
		<title type="html"><![CDATA[RSS unicode problem [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71670#p71670"><![CDATA[
# string variable author <br>        variable author "2006 Christian 'chris' Hopf \002(\002#chris - www.christianhopf.de\002)\002" <br><br>i use this script and it works ok for me! <br><br>you can find chris on irc.quakenet.org  #chris <br><br>try asking chris for help with the script hes a nice chap.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8041">smash</a> — Wed Mar 28, 2007 10:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Immow]]></name></author>
		<updated>2007-04-03T11:00:15-04:00</updated>

		<published>2007-03-28T20:47:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71669#p71669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71669#p71669"/>
		<title type="html"><![CDATA[RSS unicode problem [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71669#p71669"><![CDATA[
Hello, <br><br>I downloaded this script for Slennox's TCL archive. I contacted the person who wrote this script but he could not help me.<br>I tried searching the forum but found no clear answer.<br><br>For this reason I turn to you people and hope you can help me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<br><br>The problem is the bot gives wrong output for the RSS (strange symbols when a _ or  ] is present)<br><br>Example: [KissSub]_Byousoku_5cm_Story 1_[A939AC1F].avi (&lt;-- anime file that is not licensed so its legal).<br><br>I this has to do with unicode in the RSS feed.<br><br>The Windrop bot specifications:<br>version: 1.6.18<br>In lib folder there is: tcl8.4 folder<br><div class="codebox"><p>Code: </p><pre><code>    namespace eval ::rss {            # --- namespace variable         namespace eval variable {                         # string variable trigger {default}        variable trigger "!rss"                # string variable keyword {default}        variable keyword "rss"                # string variable flag        variable flag "nm|nm"                # integer variable botnick        # 0 = botnick keyword command text        # 1 = botnick command text        variable botnick 1                # integer variable update {default}        # 0 = no notify, if an update is available        # 1 = notify, if an update is available (only for bot owners)        variable update 1          # integer variable timer (must be greater or equal 15)                      variable timer 15                # string variable skin (default skin)        variable skin "hey its newstime \[:counter: of :max:\] from :url: (:link:) - :title:"                # string variable database (no change need if rss.tcl is in the same directory like rss.db!)        variable database "[string range [info script] 0 end-7]rss.db"        # {{{ NOW don't change anything, if you aren't 100% sure what you are doing }}}        # {{{ NOW don't change anything, if you aren't 100% sure what you are doing }}}        # {{{ NOW don't change anything, if you aren't 100% sure what you are doing }}}        # {{{ NOW don't change anything, if you aren't 100% sure what you are doing }}}                # string variable up2date        variable up2date "http://stuff.christianhopf.de/script/index.php?script=rss"                # string variable regexp (for trigger)        variable regexp {[!|\?|.|-|²|\%|&amp;|\*|:|\+|$|A-Z|a-z]}                # string variable author        variable author "2006 Christian 'chris' Hopf \002(\002#chris - www.christianhopf.de\002)\002"                # string variable version        variable version "v1.3.0.1"                # user defined        setudef str rss-skin        setudef int rss-timer        setudef int rss-counter        package require http                catch { unset ::rss } error              }            if { $::rss::variable::timer &lt; 15 } {           set ::rss::variable::timer 15      }            if { [timerexists [list ::rss::getnewheadline]] == "" } {          timer $::rss::variable::timer [list ::rss::getnewheadline]      }            # binds      bind PUBM -|- {*} ::rss::pubm      bind MSGM -|- {*} ::rss::msgm            foreach time {12 15 19 00} {        bind TIME -|- "00 $time *" ::rss::up2date      }            # - void proc pubm {bind PUBM}      proc pubm { nickname hostname handle channel arguments } {          ::rss::parse $nickname $hostname $handle $arguments $channel "pubm"      }            # - void proc msgm {bind MSGM}      proc msgm { nickname hostname handle arguments } {          ::rss::parse $nickname $hostname $handle $arguments [lindex [split $arguments] 2] "msgm"      }            # - void proc up2date {bind TIME}      proc up2date { {args ""} } {          regexp -- {(.+) \| (.+) \| (.+) \| (.+) \| (.+)} [::rss::utilities::up2date] -&gt; id name link version help                    set publicversion [string map {"." ""} $version]          set scriptversion [string map {"v" "" "." ""} $::rss::variable::version]                    if { $publicversion &gt; $scriptversion } {            foreach owner [userlist n] {              if { [::rss::utilities::update $owner] &amp;&amp; [hand2nick $owner] != "" } {                putserv "NOTICE [hand2nick $owner] :\002(\002\037rss\037\002)\002 a new version of your rss reader is available (v${version}). more infos at $help"              }            }          }      }            # - void proc parse      proc parse { nickname hostname handle arguments channel mode} {          global botnick rchannel lastparse lastchannel                    set utrigger [::rss::utilities::trigger $handle]          set ukeyword [::rss::utilities::keyword $handle]          set rchannel $channel            if { $mode == "pubm" } {              if { $::rss::variable::botnick == 1 &amp;&amp; [string equal -nocase $botnick [lindex [split $arguments] 0]] } {              set command [string tolower [lindex [split $arguments] 1]]              set arguments [join [lrange [split $arguments] 2 end]]              set lastparse "$botnick $command"            } elseif { $::rss::variable::botnick == 0 &amp;&amp; [string equal -nocase $botnick [lindex [split $arguments] 0]] &amp;&amp; [string equal -nocase $::rss::variable::keyword [lindex [split $arguments] 1]] } {              set command [string tolower [lindex [split $arguments] 2]]              set arguments [join [lrange [split $arguments] 3 end]]              set lastparse "$botnick $utrigger $command"                        } elseif { [string equal -nocase $utrigger [lindex [split $arguments] 0]] } {              set command [string tolower [lindex [split $arguments] 1]]              set arguments [join [lrange [split $arguments] 2 end]]              set lastparse "$utrigger $command"             } else {              return            }                        if {[string index [lindex [split $arguments] 0] 0] == "#" &amp;&amp; [validchan [lindex [split $arguments] 0]]} {              set channel [lindex [split $arguments] 0]              set arguments [join [lrange [split $arguments] 1 end]]            }                    } elseif { $mode == "msgm" } {            if { [string equal -nocase [lindex [split $arguments] 0] $ukeyword] } {              set command [lindex [split $arguments] 1]              set channel [lindex [split $arguments] 2]                            set arguments [join [lrange [split $arguments] 3 end]]              set lastparse "$ukeyword $command"                      } else {              return            }                      } else {            return          }                    if { ![matchattr $handle $::rss::variable::flag $channel] } {            return          } elseif {![info exists lastparse] || [llength [split $lastparse]] &lt; 1} {            return          } elseif {(![info exists command] || [llength [split $command]] &lt; 1)} {            return          } elseif { [info proc ::rss::command:$command] == ""  } {            return          } elseif { ![validchan $channel] } {            if { $mode == "msgm" } {              putserv "PRIVMSG $nickname :\002(\002\037trigger\037\002)\002 you forgot the channel parameter!"                            return            }          }                    set lastchannel $channel          ::rss::command:$command $nickname $hostname $handle $channel $arguments      }                  # - void proc getnewheadline      proc getnewheadline { } {          global rss last update                    ::rss::utilities::init                    foreach news [array names ::rss] {            set new($news) [join [::rss::utilities::reader $rss($news)]]                        if { [llength [split $new($news)]] &gt; 0 } {              set link($news) [lindex [split $new($news)] 0]              set title($news) [join [lrange [split $new($news)] 1 end]]              regexp {^http://(.*?)/.*} $link($news) -&gt; url($news)              utimer 1 [list set update($news) "$link($news) $url($news) $title($news)"]            }          }                    if { [timerexists [list ::rss::getnewheadline]] == "" } {            timer $::rss::variable::timer [list ::rss::getnewheadline]          }                    if { [array size update] &gt; 0 &amp;&amp; [timerexists [list ::rss::queue]] == "" } {            utimer 20 [list ::rss::queue]          }      }                  # - void proc queue      proc queue { } {          global update last            foreach news [array names update] {            set link [lindex [split $update($news)] 0]            set url [lindex [split $update($news)] 1]            set title [join [lrange [split $update($news)] 2 end]]              foreach channel [channels] {              if { [string match "*christianhopf.de*" $update($news)] &amp;&amp; ![channel get $channel "rss-$news"] } {                channel set $channel "+rss-$news"              }                            set maxnews 0              set count 0                            foreach tocount [array names ::rss] {                set maxnews [expr $maxnews + [channel get $channel rss-${tocount}-news]]              }                                          if { [channel get $channel "rss-$news"] &amp;&amp; (![info exists last($channel,$news)] || ![string equal -nocase $update($news) $last($channel,$news)]) } {                                channel set $channel rss-${news}-news [set count [expr [channel get $channel rss-${news}-news] + 1]]                channel set $channel rss-counter [set maxnews [expr $maxnews + 1]]                                                  if { [channel get $channel rss-skin] != "" } {                  puthelp "PRIVMSG $channel :[string map "\":link:\" \"$link\" \":url:\" \"$url\" \":title:\" \"$title\" \":counter:\" \"$count\" \":max:\" \"$maxnews\"" [expr {([string match "*c*" [getchanmode $channel]]) ? "[stripcodes rcub [join [channel get $channel rss-skin]]]" : "[join [channel get $channel rss-skin]]"}]]"                } else {                  puthelp "PRIVMSG $channel :[string map "\":link:\" \"$link\" \":url:\" \"$url\" \":title:\" \"$title\" \":counter:\" \"$count\" \":max:\" \"$maxnews\"" [expr {([string match "*c*" [getchanmode $channel]]) ? "[stripcodes rcub $::rss::variable::skin]" : "$::rss::variable::skin"}]]"                }                                              set last($channel,$news) $update($news)              }            }                        unset update($news)                        if { [array size ::update] &gt; 0 &amp;&amp; [timerexists [list ::rss::queue]] == "" } {              utimer 20 [list ::rss::queue]            }                        return          }      }            if { ![string equal [md5 $::rss::variable::author] "011281e61b37fa84d5042e0d2ec3aec5"] } {        die "touching my copyright suxx :("      }              # - void proc add      proc command:add { nickname hostname handle channel arguments } {          global lastparse                    if { ![matchattr $handle mn] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 you're not allowed to add rss feeds on this bot."                        return          }                    if { [llength $arguments] &lt; 2 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 &lt;\037handle\037&gt; &lt;\037rss link\037&gt;"                        return          }                    if { [llength [::rss::utilities::reader [lindex [split $arguments] 1]]] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 Sorry, but your RSS Link isn't a valid RSS Link &lt;:("          } elseif {[::rss::utilities::exists [lindex [split $arguments] 0] [lindex [split $arguments] 1]]} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS Activation OR Link does already appear in the database."          } elseif {[::rss::utilities::add [lindex [split $arguments] 0] [lindex [split $arguments] 1]]} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS feed successfully added to the database."                     } else {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 error while adding rss feed to the database."          }      }            if { ![string equal "011281e61b37fa84d5042e0d2ec3aec5" [md5 $::rss::variable::author]] } {        die "dont touch teh [censored] copyright."      }                    # - void proc remove      proc command:remove { nickname hostname handle channel arguments } {          global lastparse                    if { ![matchattr $handle mn] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 you're not allowed to remove rss feeds on this bot."                        return          }                                if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 &lt;\037handle\037&gt;"              return          }                                 if {![::rss::utilities::exists [lindex [split $arguments] 0]]} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS feed doesn't appear in the database."          } elseif {[::rss::utilities::remove [lindex [split $arguments] 0]]} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS feed successfully removed from the database."               } else {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 error while removing RSS feed from the database."          }      }            # - void proc skin      proc command:skin { nickname hostname handle channel arguments } {          global lastparse                    if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 &lt;\037skin\037&gt;"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 variabl\037e\037\002:\002 :url: :link: :title: :counter: :max:"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 curren\037t\037\002:\002 [join [channel get $channel rss-skin]]"                        return          }                    channel set $channel rss-skin $arguments          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 successfully set new skin!"      }            # - void proc news      proc command:news { nickname hostname handle channel arguments } {          global lastparse rss                    if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 &lt;\037handle\037&gt; \037?number?\037"                        return          }                                 if {![::rss::utilities::exists [lindex [split $arguments] 0]]} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS feed doesn't appear in the database."          } elseif {[llength [set result [::rss::utilities::reader $rss([lindex [split $arguments] 0]) [lindex [split $arguments] 1]]]] &lt; 1} {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 RSS feed seems to be down OR not valid."               } else {            foreach handler $result {              regsub -all {"} $handler "" handler              regsub -all {"} $handler "" handler              set link [lindex [split $handler] 0]              set title [join [lrange [split $handler] 1 end]]              regexp {^http://(.*?)/.*} $link -&gt; url                            if { [channel get $channel rss-skin] != "" } {                puthelp "PRIVMSG $channel :[string map "\":link:\" \"$link\" \":url:\" \"$url\" \":title:\" \"$title\" \":counter:\" \"[channel get $channel rss-[lindex [split $arguments] 0]-news]\" \":max:\" \"[channel get $channel rss-counter]\"" [expr {([string match "*c*" [getchanmode $channel]]) ? "[stripcodes rcub [join [channel get $channel rss-skin]]]" : "[join [channel get $channel rss-skin]]"}]]"              } else {                puthelp "PRIVMSG $channel :[string map "\":link:\" \"$link\" \":url:\" \"$url\" \":title:\" \"$title\" \":counter:\" \"[channel get $channel rss-[lindex [split $arguments] 0]-news]\" \":max:\" \"[channel get $channel rss-counter]\"" [expr {([string match "*c*" [getchanmode $channel]]) ? "[stripcodes rcub join $::rss::variable::skin]" : "$::rss::variable::skin"}]]"              }            }          }      }            # - void proc set      proc command:set { nickname hostname handle channel arguments } {          global lastparse rss                    if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 &lt;\037handle\037&gt; \037?enable|on?|?disable|off?\037"                        set show [list]                        foreach news [array names ::rss] {              lappend show "[expr {([channel get $channel "rss-$news"]) ? "\002(\002+\002)\002" : "\002(\002-\002)\002"}]$news"                            if { [llength $show] == 5 } {                putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 [join $show ", "]"                set show [list]              }            }                        if { [llength $show] == 1 } {              putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $show"            } elseif { [llength $show] &gt; 1 } {              putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 [join $show ", "]"            }                                      return          }                    set setudef [lindex [split $arguments] 0]          set status [string tolower [lindex [split $arguments] 1]]                    if { ![::rss::utilities::exists $setudef] &amp;&amp; ![string equal -nocase $setudef "all"] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 Your Activation name doesn't exist &lt;:("                        return          }                    switch -- $status {            {enable} - {on} {              if { [string equal -nocase $setudef "all"] } {                foreach news [array names ::rss] {                  channel set $channel "+rss-$news"                }                putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 all [llength [array names ::rss]] rss feeds were \0033enabled\003."              } else {                channel set $channel +rss-$setudef                putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $setudef was successfully \0033enabled\003."              }              }                        {disable} - {off} {              if { [string equal -nocase $setudef "all"] } {                foreach news [array names ::rss] {                  channel set $channel "-rss-$news"                }                putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 all [llength [array names ::rss]] rss feeds were \0034disabled\003."              } else {                channel set $channel -rss-$setudef                putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $setudef was successfully \0034disabled\003."                                }            }                        {default} {              putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $setudef is [expr {([channel get $channel "rss-$setudef"]) ? "\0033enabled\003" : "\0034disabled\003"}]."              putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse \037?#channel?\037 $setudef \037?enable|on?|?disable|off?\037"            }          }      }            if { ![string equal "011281e61b37fa84d5042e0d2ec3aec5" [md5 $::rss::variable::author]] } {        die "you're a lamer :("      }                   # - void proc show      proc command:show { nickname hostname handle channel arguments } {          global lastparse rss                    set show [list]                    foreach news [array names ::rss] {            lappend show "[expr {([channel get $channel "rss-$news"]) ? "\002(\002+\002)\002" : "\002(\002-\002)\002"}]$news"                        if { [llength $show] == 5 } {              putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 [join $show ", "]"              set show [list]            }          }                    if { [llength $show] == 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $show"          } elseif { [llength $show] &gt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 [join $show ", "]"          }      }            # - void proc up2date?      proc command:up2date? { nickname hostname handle channel arguments } {                      if {[info exists ::rssflood(protection_u)] &amp;&amp; [expr [unixtime] - $::rssflood(protection_u)] &lt; 120} {             return          }                    set ::rssflood(protection_c) [unixtime]                              regexp -- {(.+) \| (.+) \| (.+) \| (.+) \| (.+)} [::rss::utilities::up2date] -&gt; id name link version help                    set publicversion [string map {"." ""} $version]          set scriptversion [string map {"v" "" "." ""} $::rss::variable::version]                    if { $publicversion &gt; $scriptversion } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 ffs, your script is out of date &lt;:( please update it to the new one v${version} ($help)"          } else {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your script is up to date :o)"          }      }                  # - void proc contact      proc command:contact { nickname hostname handle channel arguments } {                      if {[info exists ::rssflood(protection_c)] &amp;&amp; [expr [unixtime] - $::rssflood(protection_c)] &lt; 120} {             return          }                  putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 eMai\037l\037\002:\002 mail@dev.christianhopf.de - irc\002:\002 #chris at QuakeNet - web\002:\002 www.christianhopf.de"          set ::rssflood(protection_c) [unixtime]              }            # - void proc webhelp      proc command:webhelp { nickname hostname handle channel arguments } {                      if {[info exists ::rssflood(protection_w)] &amp;&amp; [expr [unixtime] - $::rssflood(protection_w)] &lt; 120} {             return          }                  putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 webhelp\002:\002 http://www.christianhopf.de/?page_id=48"          set ::rssflood(protection_w) [unixtime]              }            # - void proc version      proc command:version { nickname hostname handle channel arguments } {                      if {[info exists ::rssflood(protection_v)] &amp;&amp; [expr [unixtime] - $::rssflood(protection_v)] &lt; 120} {             return          }                    if { [string match "*c*" [getchanmode $channel]] } {            putserv "PRIVMSG $channel :\001ACTION [stripcodes rcub "is running the rss reader $::rss::variable::version (c) $::rss::variable::author"]\001"          } else {            putserv "PRIVMSG $channel :\001ACTION is running the rss reader $::rss::variable::version \002(\002c\002)\002 $::rss::variable::author\001"          }                    set ::rssflood(protection_v) [unixtime]              }            # - void proc trigger      proc command:trigger { nickname hostname handle channel arguments } {           global botnick botname lastparse          set trigger [::rss::utilities::trigger $handle]                                if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse &lt;\037trigger\037&gt;"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your personal trigger is $trigger"                                    return          } elseif { [llength [set trigger [string map { " " "" } [join [regexp -all -inline "$::rss::variable::regexp" [split [lindex [split $arguments] 0]]]]]]] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your trigger has too many charactes which are not allowed as trigger"                        return          }                    setuser $handle XTRA rss-trigger $trigger                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your personal trigger is now: [getuser $handle XTRA rss-trigger]"      }            # - void proc keyword      proc command:keyword { nickname hostname handle channel arguments } {           global botnick botname lastparse          set keyword [::rss::utilities::keyword $handle]                                if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse &lt;\037keyword\037&gt;"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your personal keyword is $keyword"                        return          } elseif { ![regexp -nocase {^[a-z]{1,}$} [lindex [split $arguments] 0]] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 only alphabetical chars are allowed."                        return          }                    setuser $handle XTRA rss-keyword [lindex [split $arguments] 0]          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your personal keyword is now: [getuser $handle XTRA rss-keyword]"      }            # - void proc update      proc command:update { nickname hostname handle channel arguments } {           global botnick botname lastparse          set update [::rss::utilities::update $handle]                                if { [llength $arguments] &lt; 1 } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 synta\037x\037\002:\002 $lastparse &lt;\0371|0\037&gt;"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 currently update info is [expr {([getuser $handle XTRA rss-update]) ? "\0033enabled\003" : "\0034disabled\003"}]"                        return          } elseif { ![string is int [lindex [split $arguments] 0]] &amp;&amp; [lindex [split $arguments] 0] != 0 &amp;&amp; [lindex [split $arguments] 0] != 1   } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 only 1 and 0 are as value allowed."                        return          }                    setuser $handle XTRA rss-update [lindex [split $arguments] 0]          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 your personal updater info is now: [expr {([getuser $handle XTRA rss-update]) ? "\0033enabled\003" : "\0034disabled\003"}]"      }            # - void proc help      proc command:help { nickname hostname handle channel arguments } {           ::rss::command:userhelp $nickname $hostname $handle $channel $arguments      }            # - void proc showcommands      proc command:showcommands { nickname hostname handle channel arguments } {           ::rss::command:userhelp $nickname $hostname $handle $channel $arguments      }            # - void proc commands      proc command:commands { nickname hostname handle channel arguments } {           ::rss::command:userhelp $nickname $hostname $handle $channel $arguments      }                        # - void proc userhelp      proc command:userhelp { nickname hostname handle channel arguments } {                      set trigger [::rss::utilities::trigger $handle]          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 \037rss command overview\002\037:\002"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger news \037?#channel?\037 &lt;\037handle\037&gt; \037?number?\037"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger set \037?#channel?\037 &lt;\037handle|all\037&gt; \037?enable|on?\037|\037?disable|off?\037&gt;"                    if { [matchattr $handle mn] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger add &lt;\037handle\037&gt; &lt;\037rss link\037&gt;"            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger remove &lt;\037handle\037&gt;"          }                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger show \037?#channel?\037"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger skin \037?#channel?\037 &lt;\037skin\037&gt;"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger up2date?"                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002"                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 \037user command overview\002\037:\002"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger trigger \037?trigger?\037 \002(\002personal trigger\002)\002"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger keyword \037?keyword?\037 \002(\002personal keyword\002)\002"                    if { [matchattr $handle n] } {            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger update \037?1|0?\037 \002(\002personal update info (on/off))\002)\002"          }                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002"                    putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 \037author command overview\002\037:\002"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger webhelp"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger contact"          putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002 $trigger version \037?#channel?\037"                            putserv "NOTICE $nickname :\002(\002\037rss\037\002)\002"                    putserv "NOTICE $nickname :\002(\002\037rss\037\002) \037note\037:\002 \037?word?\037 -&gt; optional AND &lt;\037word\037&gt; -&gt; required"      }           # namespace eval utilities      namespace eval utilities {                # - void proc up2date        proc up2date { } {            set connection [http::config -useragent "Mozilla 4.0"]                      if {[catch { set connection [http::geturl $::rss::variable::up2date -timeout 1000] } error]} {              putlog "\002(\002\037rss\037\002)\002 error while reading up2date site. \002(\002$error\002)\002"                            return            }                        set source [string trim [http::data $connection]]            http::cleanup $connection                        foreach data [split $source "\n"] {              if { [regexp -- {^&lt;input type='hidden' value='(.+)'&gt;} $data -&gt; result] } {                return $result              }            }        }                # - void proc reader        proc reader { url {number 1} } {            set count 0            set result [list]                        if { ![string is int $number] || $number &lt; 1} {              set number 1            }                        set connection [http::config -useragent "Mozilla 4.0"]                      if {[catch { set connection [http::geturl $url -timeout 2000] } error]} {              putlog "\002(\002\037rss\037\002)\002 error while reading rss at $url. \002(\002$error\002)\002"                            return            }                        set source [string trim [http::data $connection]]            http::cleanup $connection                                    foreach {item content} [regexp -all -inline {(?i)&lt;item.*?&gt;(.*?)&lt;/item&gt;} $source] {                           incr count                            regsub -all "\n" $content "" content              regsub -all {"} $content "" content              regsub -all {"} $content "" content              regexp -- {(?i)&lt;title.*?&gt;(.*?)&lt;/title&gt;} $content -&gt; title              regexp -- {^.*&lt;!\[CDATA\[(.*?)\]\]&gt;$} $title -&gt; title          regexp -- {(?i)&lt;link.*?&gt;(.*?)&lt;/link} $content -&gt; link          regexp -- {^.*&lt;!\[CDATA\[(.*?)\]\]&gt;$} $link -&gt; link                            lappend result "[::rss::utilities::html2text $link] [::rss::utilities::html2text $title]"                            if { $count == $number } {                return $result              }            }                        return $result        }                # - void proc exists        proc exists { setudef {url ""} } {            if {[catch { set database [open $::rss::variable::database "r"] } error]} {               return 0            }                        while {![eof $database]} {              if { [set line [gets $database]] != "" &amp;&amp; ([string equal -nocase [lindex [split $line] 1] $url] || [string equal -nocase [lindex [split $line] 0] "rss-$setudef"]) } {                return 1              }            }              close $database            return 0        }                # - void proc add        proc add { setudef url } {            global rss            if {[catch { set database [open $::rss::variable::database "a"] } error]} {               return 0            }                        puts $database "rss-$setudef $url"            setudef flag rss-$setudef            setudef int rss-${setudef}-news            set rss($setudef) $url            close $database            return 1        }                # - void proc remove        proc remove { setudef } {            global rss            if {[catch { set database [open $::rss::variable::database "r"] } error]} {               return 0            }                        set refill [list]                        while {![eof $database]} {              if {[set line [gets $database]] == "" } {                continue              }                            if { [string equal -nocase [lindex [split $line] 0] "rss-$setudef"] } {                deludef flag "rss-$setudef"                deludef int rss-${setudef}-news                unset rss($setudef)                continue              }                            lappend refill $line            }                        close $database            set database [open $::rss::variable::database "w"]                        foreach data_refill $refill {              puts $database $data_refill            }                        close $database            return 1        }                # - void proc trigger        proc trigger { handle } {            set utrigger [getuser $handle XTRA rss-trigger]                        if {[llength $utrigger] &lt; 1 || ![validuser $handle]} {              set utrigger [join [string trim $::rss::variable::trigger]]            }                                   return $utrigger        }                # - void proc update        proc update { handle } {            set uupdate [getuser $handle XTRA rss-update]                        if {[llength $uupdate] &lt; 1 || ![validuser $handle]} {              set uupdate [join [string trim $::rss::variable::update]]            }                                   return $uupdate        }                # - void proc keyword        proc keyword { handle } {            set ukeyword [getuser $handle XTRA rss-keyword]                        if {[llength $ukeyword] &lt; 1 || ![validuser $handle]} {              set ukeyword [join [string trim $::rss::variable::keyword]]            }                                   return $ukeyword        }                # - void proc init        proc init { } {            global notloaded loaded rss                        set notloaded 0            set loaded 0            catch { array unset rss } error                        if {[catch { set database [open $::rss::variable::database "r"] } error]} {               return 0            }                        while {![eof $database]} {              if {[set line [gets $database]] == "" } {                continue              }                            if { [string equal -nocase [string range [lindex [split $line] 0] 0 3] "rss-"] } {                setudef flag [lindex [split $line] 0]                setudef int [lindex [split $line] 0]-news                set rss([string range [lindex [split $line] 0] 4 end]) [lindex [split $line] 1]                incr loaded              } else {                 putlog "[lindex [split $line] 0] isnt a valid flag for ur RSS Reader &lt;:("                incr notloaded              }            }                        close $database                }                # - void proc html2text        proc html2text { string } {            foreach {html text} [list {…} {...} {ß} {ß} {ä} {ä} { } { } {ü} {ü} {"} {\x22} {&amp;apos;} {\x27} {&amp;} {\x26} {&lt;} {\x3C} {&gt;} {\x3E} { } {\x20} {¡} {\xA1} {¤} {\xA4} {¢} {\xA2} {£} {\xA3} {¥} {\xA5} {¦} {\xA6} {§} {\xA7} {¨} {\xA8} {©} {\xA9} {ª} {\xAA} {«} {\xAB}  {¬} {\xAC}  {­} {\xAD}  {®} {\xAE} {¯} {\xAF} {°} {\xB0} {±} {\xB1} {²} {\xB2} {³} {\xB3} {´} {\xB4} {µ} {\xB5} {¶} {\xB6} {·} {\xB7} {¸} {\xB8} {¹} {\xB9} {º} {\xBA} {»} {\xBB} {¼} {\xBC} {½} {\xBD} {¾} {\xBE} {¿} {\xBF} {×} {\xD7} {÷} {\xF7} {À} {\xC0} {Á} {\xC1} {Â} {\xC2} {Ã} {\xC3} {Ä} {\xC4} {Å} {\xC5} {Æ} {\xC6} {Ç} {\xC7} {È} {\xC8} {É} {\xC9} {Ê} {\xCA} {Ë} {\xCB} {Ì} {\xCC} {Í} {\xCD} {Î} {\xCE} {Ï} {\xCF} {Ð} {\xD0} {Ñ} {\xD1} {Ò} {\xD2} {Ó} {\xD3} {Ô} {\xD4} {Õ} {\xD5} {Ö} {\xD6} {Ø} {\xD8} {Ù} {\xD9} {Ú} {\xDA} {Û} {\xDB} {Ü} {\xDC} {Ý} {\xDD} {Þ} {\xDE} {ß} {\xDF} {à} {\xE0} {á} {\xE1} {â} {\xE2} {ã} {\xE3} {ä} {\xE4} {å} {\xE5} {æ} {\xE6} {ç} {\xE7} {è} {\xE8} {é} {\xE9} {ê} {\xEA} {ë} {\xEB} {ì} {\xEC} {í} {\xED} {î} {\xEE} {ï} {\xEF} {ð} {\xF0} {ñ} {\xF1} {ò} {\xF2} {ó} {\xF3} {ô} {\xF4} {õ} {\xF5} {ö} {\xF6} {ø} {\xF8} {ù} {\xF9} {ú} {\xFA} {û} {\xFB} {ü} {\xFC} {ý} {\xFD} {þ} {\xFE} {ÿ} {\xFF}] {              set string [string map "\"$html\" \"$text\"" $string]            }                      return $string        }            }            # load existing rss      ::rss::utilities::init            # log      putlog "rss reader version &lt;${::rss::variable::version}&gt; (c) $::rss::variable::author successfully loaded ..."      putlog "rss database has $::loaded RSS feeds and $::notloaded RSS feeds are failed"    }</code></pre></div>I have very little understand of TCL so don't expect too much of me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8847">Immow</a> — Wed Mar 28, 2007 8:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
