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

	<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>2008-12-11T08:45:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[dwickie]]></name></author>
		<updated>2008-12-11T08:45:30-04:00</updated>

		<published>2008-12-11T08:45:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86185#p86185</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86185#p86185"/>
		<title type="html"><![CDATA[Pre.tcl auto spamm :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86185#p86185"><![CDATA[
contact authors<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5343">dwickie</a> — Thu Dec 11, 2008 8:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[siriow]]></name></author>
		<updated>2008-12-11T08:06:55-04:00</updated>

		<published>2008-12-11T08:06:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86183#p86183</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86183#p86183"/>
		<title type="html"><![CDATA[Pre.tcl auto spamm :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86183#p86183"><![CDATA[
hello, I would want to make so that my script pre.tcl spam news in IRC chan every 10 minutes. Unfortunately it does not make it, I I have tried various ways but I do not succeed to resolve it, if someone can help me, thanks in advance.<br><br>Davide Torino Italy.<br><br>This is the code:<br><br>### BINDS ###<br>                                         <br>#bind time - "00 * * * *" dlx:pretimes:scnsrc2<br>#bind time - "15 * * * *" dlx:pretimes:scnsrc2<br>#bind time - "30 * * * *" dlx:pretimes:scnsrc2<br>#bind time - "45 * * * *" dlx:pretimes:scnsrc2<br>bind pub - !pre dlx:pretimes:scnsrc<br>bind pub - !pred dlx:pretimes:scnsrc2<br><br>if {![info exists dlx:pretimes:scnsrc2_running]} {   <br>    timer 10 dlx:pretimes:scnsrc2                      <br>    set dlx:pretimes:scnsrc2_running 1                 <br>  }                                <br><br># SCRIPT START<br><br>proc dlx:pretimes:scnsrc { nick host hand chan arg } {<br>global pre<br>set got_custom_number [regexp {\-n=([0-9]+)} $arg gothit custom_number]<br>if {$got_custom_number} { set arg [lrange $arg 1 end] }<br>set arg [string map { " " "%" } $arg]<br>set arg [string map { "*" "%" } $arg]<br>set urlEncodeArg [http::formatQuery search $arg]<br>if {([lsearch -exact $pre(availchans) $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}<br>if {([lsearch -exact $pre(quietchans) $chan] != -1) || ($chan == "privmsg")} {set chan $nick}<br>if {$got_custom_number} {<br>set url "<a href="http://scnsrc.net/pre/bots.php?user=$pre%28username%29&amp;pass=$pre%28password%29&amp;$urlEncodeArg&amp;results=$custom_number" class="postlink">http://scnsrc.net/pre/bots.php?user=$pr ... tom_number</a>"<br>} else {<br>set url "<a href="http://scnsrc.net/pre/bots.php?user=$pre%28username%29&amp;pass=$pre%28password%29&amp;$urlEncodeArg" class="postlink">http://scnsrc.net/pre/bots.php?user=$pr ... lEncodeArg</a>"<br>}<br><br>set page [http::data [http::geturl $url]]<br>if { $arg == "" } {<br>putquick "PRIVMSG $chan :Usage: !pre \[-n=number\]&lt;keywords or releasename&gt;"<br>} else {<br>if { $page == "Stay out." } {<br>putquick "PRIVMSG $chan :PREDB: Your account got revoked. Tough luck fool! This script is now useless!"<br>} else {<br>if { $page == "" } { putquick "PRIVMSG $chan :$pre(prefix) Got 0 hits to your query." } else {<br>foreach release [split $page "\n"] {<br>if { [string first "^" $release] != -1 } {<br>set item [split $release "^"]<br>set releasename [lindex $item 1]<br>set section [lindex $item 2]<br>set time [lindex $item 0]<br>set nuked [lindex $item 3]<br>set reason [lindex $item 4]<br>if { $nuked == "" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section $arg"<br>} elseif { $nuked == "nuked" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section. \0034 It was NUKED: $reason \003"<br>} elseif { $nuked == "unnuked" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section. \0033 It was UNNUKED: $reason \003"<br>}<br>}<br>}<br>}<br>}<br>}<br>}<br><br><br>proc dlx:pretimes:scnsrc2 { nick host hand chan arg } {<br>global pre<br>set got_custom_number [regexp {\-n=([0-9]+)} $arg gothit custom_number]<br>if {$got_custom_number} { set arg [lrange $arg 1 end] }<br>set arg [string map { " " "%" } $arg]<br>set arg [string map { "*" "%" } $arg]<br>set ast *<br>set arg ast<br>puts [set $arg]<br>set urlEncodeArg [http::formatQuery search $arg]<br>if {([lsearch -exact $pre(availchans) $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}<br>if {([lsearch -exact $pre(quietchans) $chan] != -1) || ($chan == "privmsg")} {set chan $nick}<br>if {$got_custom_number} {<br>set url "<a href="http://scnsrc.net/pre/bots.php?user=$pre%28username%29&amp;pass=$pre%28password%29&amp;$urlEncodeArg&amp;results=$custom_number" class="postlink">http://scnsrc.net/pre/bots.php?user=$pr ... tom_number</a>"<br>} else {<br>set url "<a href="http://scnsrc.net/pre/bots.php?user=$pre%28username%29&amp;pass=$pre%28password%29&amp;$urlEncodeArg" class="postlink">http://scnsrc.net/pre/bots.php?user=$pr ... lEncodeArg</a>"<br>}<br><br>set page [http::data [http::geturl $url]]<br>if { $arg == "" } {<br>putquick "PRIVMSG $chan :Usage: !pre \[-n=number\]&lt;keywords or releasename&gt;"<br>} else {<br>if { $page == "Stay out." } {<br>putquick "PRIVMSG $chan :PREDB: Your account got revoked. Tough luck fool! This script is now useless!"<br>} else {<br>if { $page == "" } { putquick "PRIVMSG $chan :$pre(prefix) Got 0 hits to your query." } else {<br>foreach release [split $page "\n"] {<br>if { [string first "^" $release] != -1 } {<br>set item [split $release "^"]<br>set releasename [lindex $item 1]<br>set section [lindex $item 2]<br>set time [lindex $item 0]<br>set nuked [lindex $item 3]<br>set reason [lindex $item 4]<br>if { $nuked == "" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section $arg"<br>} elseif { $nuked == "nuked" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section. \0034 It was NUKED: $reason \003"<br>} elseif { $nuked == "unnuked" } {<br>putquick "PRIVMSG $chan :\002 $pre(prefix) \002 $releasename was released $time ago in $section. \0033 It was UNNUKED: $reason \003"<br>}<br>}<br>}<br>}<br>}<br>}<br>timer 10 dlx:pretimes:scnsrc2                    <br>return 1                      <br>}<br><br>     <br>                                  <br><br># UPDATE CHECK<br><br>set url "<a href="http://www.scnsrc.net/pre/script_version.nfo" class="postlink">http://www.scnsrc.net/pre/script_version.nfo</a>"<br>set page [http::data [http::geturl $url]]<br>regexp {Latest@([0-9\.a-z]+)} $page gotlatest latest<br>regexp {URI@(.*)} $page goturi uri<br>regexp {Changelog@(.*)} $page gotlog changelog<br>if {$latest &gt; $scnsrc_pre_version} {<br>putlog "scnsrc-pre New version out: v$latest (you have v$scnsrc_pre_version)"<br>putlog "scnsrc-pre Get it while its hot: $uri"<br>putlog "scnsrc-pre Changelog: $changelog"<br>} else {<br>putlog "scnsrc-pre loaded.. you just got pwned by dlx. and youre up to date (v$scnsrc_pre_version)"<br>}<br><br># Change the putlog message and the world will end<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10357">siriow</a> — Thu Dec 11, 2008 8:06 am</p><hr />
]]></content>
	</entry>
	</feed>
