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

	<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>2005-12-10T01:36:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-10T01:36:18-04:00</updated>

		<published>2005-12-10T01:36:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58133#p58133</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58133#p58133"/>
		<title type="html"><![CDATA[insult.tcl , slap]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58133#p58133"><![CDATA[
<blockquote class="uncited"><div>damn i pasted the wrong script!<br>it was 5 a.m...<br><br>oh and besides: your script aint working either. it always says "no news spcified for the channel"... channel is "#shu"</div></blockquote>that means the bot was unable (or still hasn't tried; it works on timer) to fetch RSS data from the feed(s) you specified; check the log<br><br>and post any further comments, should you have any, in the script's support thread<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Dec 10, 2005 1:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-12-09T20:14:11-04:00</updated>

		<published>2005-12-09T20:14:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58128#p58128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58128#p58128"/>
		<title type="html"><![CDATA[insult.tcl , slap]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58128#p58128"><![CDATA[
insult.tcl is a very old script written for eggdrop v1.6.2. The author, [DrN],  referred to this script as "lame".<br><blockquote class="uncited"><div>Insult is another lame TCL. It will hurl bad insults at yourself or others when triggered.</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Fri Dec 09, 2005 8:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JazzMatazz]]></name></author>
		<updated>2005-12-09T09:24:37-04:00</updated>

		<published>2005-12-09T09:24:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58108#p58108</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58108#p58108"/>
		<title type="html"><![CDATA[insult.tcl , slap]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58108#p58108"><![CDATA[
damn i pasted the wrong script!<br>it was 5 a.m...<br><br>oh and besides: your script aint working either. it always says "no news spcified for the channel"... channel is "#shu"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7087">JazzMatazz</a> — Fri Dec 09, 2005 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-09T02:07:26-04:00</updated>

		<published>2005-12-09T02:07:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58095#p58095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58095#p58095"/>
		<title type="html"><![CDATA[insult.tcl , slap]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58095#p58095"><![CDATA[
using my script together with a lowly script named insult.tcl? now that's an insult dude!!<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Dec 09, 2005 2:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JazzMatazz]]></name></author>
		<updated>2005-12-09T00:04:59-04:00</updated>

		<published>2005-12-09T00:04:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58092#p58092</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58092#p58092"/>
		<title type="html"><![CDATA[insult.tcl , slap]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58092#p58092"><![CDATA[
Hi,<br><br>i installed a bot and managed to get it up and running.<br>Ive trid to install a few TCLs, with mixed results.<br>One problem i have is with the insult.tcl (obtainable at <a href="ftp://ftp.chaotix.net/pub/RCS/TCL/insult102.tcl.gz" class="postlink">ftp://ftp.chaotix.net/pub/RCS/TCL/insult102.tcl.gz</a> )<br><br>It says something about<div class="codebox"><p>Code: </p><pre><code>if {[string tolower $rest] == [string tolower $botnick]} {putserv "KICK $channel $nick :Insult this beotch! LOL"; return 0}if {$rest == ""} {                  if {$insult(who) == 0} {set rest $nick}                  if {$insult(who) == 1} {set rest [getrnduser $channel]}                 }</code></pre></div>(whole code below)<br><br>unfortunately the Bot does not kick when insulted. Insteads nothing follows when the command is entered. (He is not insulted either)<br>With normal users this works fine.<br>Could you tell me what the problem is?<br><br>My second question would be how i can make a simple "!slap command".<br>All it should do is the standard "$nick slaps $nick2 with a large trout"<br><br>Kind regards,<br>      Jazz<br><br>insult.tcl<div class="codebox"><p>Code: </p><pre><code>########################################################################                                                                     ## rssnews.tcl - RSS news announcer for eggdrop by demond@demond.net   ##                                                                     ##               this will announce the updated news from RSS feed(s), ##               periodically polling the feed(s); supports multiple   ##               channels, one feed per channel; you only need to set  ##               the feeds array, see below                            ##                                                                     ##        Usage: !rss &lt;news#|*&gt; (read news# or * for headlines list)   ##                                                                     ########################################################################package require Tcl 8.3package require eggdrop 1.6package require http 2.0namespace eval rssnews {# set your feed(s) sources here: channel, poll frequency in mins, feed URL#set feeds(#shu) {17 http://www.shortnews.com/rss/HighTech.xml}set feeds(#shu) {11 http://enews.ebaumsworld.com/enews.rss}set feeds(#shu) {30 http://www.davesdaily.com/rss/davesdaily.rss}set feeds(#shu) {20 http://slashdot.org/slashdot.rss}# maximum number of announced new headlines#variable maxnew 5# feed fetch timeout in seconds#variable timeout 20# public trigger flood settings#variable pubflud 5:15# support SSL feeds (requires TLS package)#variable usessl 0# if usessl is 1, request/require valid certificate from server#variable reqcert yes:no######################################################################## nothing to edit belowvariable version "rssnews-1.5"if {$usessl} {package require tls 1.5scan $reqcert {%[^:]:%s} r1 r2if {$r1 == "yes"} {set r1 1} {set r1 0}if {$r2 == "yes"} {set r2 1} {set r2 0}set ssl [list ::tls::socket -request $r1 -require $r2]::http::register https 443 $ssl}bind pub  - !rss [namespace current]::newsbind time - *    [namespace current]::timerputlog "$version by demond loaded"proc timer {min hour day month year} {variable feedsif {[info exists feeds]} {if {$min} {set min [string trimleft $min 0]}foreach {chan feed} [array get feeds] {if {$min &amp;&amp; $min % [lindex $feed 0] == 0} {fetch [lindex $feed 1] $chan}}}}proc fetch {url chan} {variable timeoutvariable version; variable tokenset to [expr {$timeout * 1000}]set cmd [namespace current]::callback::http::config -useragent "$version by demond"if {[catch {set t [::http::geturl $url -command $cmd -timeout $to]} err]} {putlog "$version: ERROR($chan): $err"} {set token($t) $chan}}proc callback {t} {variable version; variable tokenset chan $token($t)switch -exact [::http::status $t] {"timeout" {putlog "$version: ERROR($chan): timeout"}"error" {putlog "$version: ERROR($chan): [::http::error $t]"}"ok" {if {[::http::ncode $t] != 200} {putlog "$version: ERROR($chan): [::http::code $t]"} {process [::http::data $t] $chan}}default {putlog "$version: ERROR($chan): got EOF from socket"}}::http::cleanup $t}proc process {data chan} {variable news; variable hashvariable maxnew; variable sourceset idx 1; set count 0set news($chan) {}; set source($chan) ""if {[regexp {(?i)&lt;title&gt;(.*?)&lt;/title&gt;} $data -&gt; foo]} {append source($chan) $foo}if {[regexp {(?i)&lt;description&gt;(.*?)&lt;/description&gt;} $data -&gt; foo]} {append source($chan) " | $foo"}regsub -all {(?i)&lt;items.*?&gt;.*?&lt;/items&gt;} $data {} dataforeach {foo item} [regexp -all -inline {(?i)&lt;item.*?&gt;(.*?)&lt;/item&gt;} $data] {regexp {(?i)&lt;title.*?&gt;(.*?)&lt;/title&gt;}  $item -&gt; titleregexp {(?i)&lt;link.*?&gt;(.*?)&lt;/link}     $item -&gt; linkregexp {(?i)&lt;desc.*?&gt;(.*?)&lt;/desc.*?&gt;} $item -&gt; descrif {![info exists title]} {set title "(none)"}if {![info exists link]}  {set link  "(none)"}if {![info exists descr]} {set descr "(none)"}strip title link descrif {[info exists hash($chan)]} {if {[lsearch -exact $hash($chan) [md5 $title]] == -1 &amp;&amp; [botonchan $chan]} {if {$count &lt; $maxnew} {puthelp "privmsg $chan :($idx) $title"incr count} {lappend indices $idx}}}lappend news($chan) [list $title $link $descr]lappend hashes [md5 $title]incr idx}if {[info exists indices] &amp;&amp; [botonchan $chan]} {set count [llength $indices]set indices "(indices: [join $indices {, }])"puthelp "privmsg $chan :...and $count more $indices" }set hash($chan) $hashes}proc strip {args} {variable htmlforeach a $args {upvar $a xset amp {&amp; &amp;}set x [string map $amp $x]set x [string map $html $x]while {[regexp -indices {(&amp;#[0-9]{1,3};)} $x -&gt; idxs]} {set b [lindex $idxs 0]; set e [lindex $idxs 1]set num [string range $x [expr {$b+2}] [expr {$e-1}]]if {$num &lt; 256} {set x [string replace $x $b $e [format %c $num]]}}regexp {(?i)&lt;!\[CDATA\[(.*?)\]\]&gt;}   $x -&gt;    xregsub -all {(?i)&lt;/t[dr]&gt;&lt;t[dr].*?&gt;} $x { | } xregsub -all {(?i)(&lt;p&gt;|&lt;br&gt;|\n)}      $x { }   xregsub -all {&lt;[^&lt;]+?&gt;}               $x {}    x}}proc news {nick uhost hand chan text} {variable sourcevariable news; variable feedsvariable pcount; variable pubfludif {[info exists pcount]} {set n [lindex $pcount 1]; incr nset ts [lindex $pcount 0]set pcount [list $ts $n]scan $pubflud {%[^:]:%s} maxr maxtif {$n &gt;= $maxr} {if {[unixtime] - $ts &lt;= $maxt} {return}set n 1; set ts [unixtime]}} {set n 1; set ts [unixtime]}set pcount [list $ts $n]set num [lindex [split $text] 0]if {$num == ""} {puthelp "notice $nick :Usage: $::lastbind &lt;news#|*&gt;"return}if {$num != "*" &amp;&amp; ![string is integer $num]} {puthelp "notice $nick :argument must be number or *"return}if {![info exists news($chan)]} {puthelp "notice $nick :no news for this channel"return}if {$num == "*"} {set idx 1if {$source($chan) != ""} {set title $source($chan)} {set title [lindex $feeds($chan) 1]}puthelp "notice $nick :News source: \002$title\002"foreach item $news($chan) {puthelp "notice $nick :($idx) [lindex $item 0]"incr idx}return 1} {if {$num &lt; 1 || $num &gt; [llength $news($chan)]} {puthelp "notice $nick :no such news index, try $::lastbind *"} {set idx [expr {$num-1}]puthelp "notice $nick :......title($num): [lindex [lindex $news($chan) $idx] 0]"puthelp "notice $nick :description($num): [lindex [lindex $news($chan) $idx] 2]"puthelp "notice $nick :.......link($num): [lindex [lindex $news($chan) $idx] 1]"return 1}}}variable html {"     \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}}</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7087">JazzMatazz</a> — Fri Dec 09, 2005 12:04 am</p><hr />
]]></content>
	</entry>
	</feed>
