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

	<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-06-17T14:05:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Pizza_Guy]]></name></author>
		<updated>2008-06-17T14:05:20-04:00</updated>

		<published>2008-06-17T14:05:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83590#p83590</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83590#p83590"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83590#p83590"><![CDATA[
Thank you. It works like a charm<br><br>i think i made a little head room with the other script but i can't post it i not at home, stupid work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9981">Pizza_Guy</a> — Tue Jun 17, 2008 2:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-06-17T00:03:39-04:00</updated>

		<published>2008-06-17T00:03:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83580#p83580</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83580#p83580"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83580#p83580"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># amount of posts to showvariable herebe_limit 5package require httpsetudef flag herebegamesbind pub - !MarketUU herebe:games1bind pub - !MarketAT herebe:games2bind pub - !MarketPlanet herebe:games3bind pub - !MarketDiscussion herebe:games4bind pub - !Awards herebe:games5proc herebe:games1  {nick uhost handle chan text} {  herebe:games $nick $uhost $handle $chan 90 $text}proc herebe:games2  {nick uhost handle chan text} {  herebe:games $nick $uhost $handle $chan 91 $text}proc herebe:games3  {nick uhost handle chan text} {  herebe:games $nick $uhost $handle $chan 93 $text}proc herebe:games4  {nick uhost handle chan text} {  herebe:games $nick $uhost $handle $chan 94 $text}proc herebe:games5  {nick uhost handle chan text} {  herebe:games $nick $uhost $handle $chan 89 $text}proc herebe:games {nick uhost handle chan tag text} {   if {[lsearch -exact [channel info $chan] +herebegames] == -1} { return }   set query "http://herebegames.com/StarGateWarsNew/viewforum.php?f=$tag"   set ua "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"   set http [::http::config -useragent $ua -useragent "utf-8"]   catch {set http [::http::geturl "$query" -timeout [expr 1000 * 5]]} error   if {[string match -nocase "*couldn't open socket*" $error]} {      putserv "privmsg $chan :Socket Error accessing '$query' .. It must be down.. :("      return 0   }   if { [::http::status $http] == "timeout" } {      putserv "privmsg $chan :Connection has timed out"      return 0   }   set html [::http::data $http]   ::http::cleanup $http   regsub {(^.+?)&lt;td class="row3" colspan="6"&gt;&lt;b class="gensmall"&gt;Topics&lt;/b&gt;&lt;/td&gt;} $html "" html   set counter 0   while {$counter &lt; $::herebe_limit} {      regexp -nocase {&lt;a title.+?href=.+?class=.+?"&gt;(.+?)&lt;/a&gt;.+?&lt;p class="topicdetails"&gt;.*?&lt;/a&gt;.*?&lt;a href="\.(.+?)"&gt;} $html -&gt; subject url      set url "http://herebegames.com/StarGateWarsNew[string map {&amp; &amp;} $url]"      regsub -nocase {&lt;a title.+?href=.+?class=.+?"&gt;.+?&lt;/a&gt;.+?&lt;p class="topicdetails"&gt;.*?&lt;/a&gt;.*?&lt;a href=".+?"&gt;} $html "" html      incr counter 1      putserv "privmsg $chan :\002$subject\002 - $url"   }   return 1}putlog "herebegames loaded."</code></pre></div>Use the partyline and .chanset #youchan +herebegames to activate on each desired channel. Below is an example of how this looks for marketuu. Also added examples of how you can add all the forum sections to triggers and have one single procedure scrape them all. Keep in mind the scraping template is designed for just this site, it won't work for others, but will for every forum section of that site.<blockquote class="uncited"><div>&lt;speechles&gt; !marketUU<br>&lt;sp33chy&gt; <strong class="text-strong">selling 38 mil UU @ 720 bil per mil</strong> - <a href="http://herebegames.com/StarGateWarsNew/viewtopic.php?f=90&amp;t=116872&amp;sid=4a210084b71293d5cbeed13dc1a29506&amp;p=1398657#p1398657" class="postlink">http://herebegames.com/StarGateWarsNew/ ... 7#p1398657</a><br>&lt;sp33chy&gt; <strong class="text-strong">Buying 1mil UU (700 bil / 1mil uu) ~ online</strong> - <a href="http://herebegames.com/StarGateWarsNew/viewtopic.php?f=90&amp;t=116690&amp;sid=4a210084b71293d5cbeed13dc1a29506&amp;p=1398628#p1398628" class="postlink">http://herebegames.com/StarGateWarsNew/ ... 8#p1398628</a><br>&lt;sp33chy&gt; <strong class="text-strong">buying 4,5mil uu / 720bil per 1 mil</strong> - <a href="http://herebegames.com/StarGateWarsNew/viewtopic.php?f=90&amp;t=116860&amp;sid=4a210084b71293d5cbeed13dc1a29506&amp;p=1398308#p1398308" class="postlink">http://herebegames.com/StarGateWarsNew/ ... 8#p1398308</a><br>&lt;sp33chy&gt; <strong class="text-strong">Selling 1mil UU for 5k Turns</strong> - <a href="http://herebegames.com/StarGateWarsNew/viewtopic.php?f=90&amp;t=116878&amp;sid=4a210084b71293d5cbeed13dc1a29506&amp;p=1398266#p1398266" class="postlink">http://herebegames.com/StarGateWarsNew/ ... 6#p1398266</a><br>&lt;sp33chy&gt; <strong class="text-strong">Selling 15m UU 750b/m</strong> - <a href="http://herebegames.com/StarGateWarsNew/viewtopic.php?f=90&amp;t=114870&amp;sid=4a210084b71293d5cbeed13dc1a29506&amp;p=1393781#p1393781" class="postlink">http://herebegames.com/StarGateWarsNew/ ... 1#p1393781</a></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Jun 17, 2008 12:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pizza_Guy]]></name></author>
		<updated>2008-06-16T19:44:35-04:00</updated>

		<published>2008-06-16T19:44:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83579#p83579</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83579#p83579"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83579#p83579"><![CDATA[
well there are a two basically what i am looking at is this <br><br>someone says <br><br>!MarketUU it would give the say top 5 threads from here<br><a href="http://herebegames.com/StarGateWarsNew/viewforum.php?f=90" class="postlink">http://herebegames.com/StarGateWarsNew/ ... m.php?f=90</a><br><br>i was thinking of the format<br>thread title | Thread link<br><br>!MarketAT - would give the top 5 from <br><a href="http://herebegames.com/StarGateWarsNew/viewforum.php?f=91" class="postlink">http://herebegames.com/StarGateWarsNew/ ... m.php?f=91</a><br><br>i was thinking of the format<br>thread title | Thread link<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9981">Pizza_Guy</a> — Mon Jun 16, 2008 7:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2008-06-15T08:49:26-04:00</updated>

		<published>2008-06-15T08:49:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83539#p83539</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83539#p83539"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83539#p83539"><![CDATA[
Its possible via the http package and a regexp to grab the links from the html code.<br><br>If you provide us the link to the page, we might be able to help you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sun Jun 15, 2008 8:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pizza_Guy]]></name></author>
		<updated>2008-06-14T21:55:23-04:00</updated>

		<published>2008-06-14T21:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83531#p83531</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83531#p83531"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83531#p83531"><![CDATA[
thank you for the help<br>after looking at what you wrote it appears that this is a bit beyond my current understanding<br>I am going to need to keep reading and learning more before i can get this working<br><br><br>a side note<br>is there a script that can do some type of fetching of links on a specific page?<br>so if i would do !sitemarket<br>it would go out and look at a determined # of the top links and past back the topic of the thread and the link<br><br>or is this again something i am going to need to learn more about?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9981">Pizza_Guy</a> — Sat Jun 14, 2008 9:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2008-06-14T07:50:19-04:00</updated>

		<published>2008-06-14T07:50:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83524#p83524</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83524#p83524"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83524#p83524"><![CDATA[
it depends on how you structured your file. If its structure in the format: 'nickline info_here' you can search for the nickname.<br><br>Example:<br><div class="codebox"><p>Code: </p><pre><code>set file [open file.txt r]set read [read -nonewline $file]close $fileset file [open file.txt w]foreach line [split $read \n] {    if {$line == ""} { continue }    if {[string equal -nocase $nick [lindex [split $line] 0]]} {        continue    } else {        puts $file "$line"    }}close $file</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jun 14, 2008 7:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pizza_Guy]]></name></author>
		<updated>2008-06-13T23:09:23-04:00</updated>

		<published>2008-06-13T23:09:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83521#p83521</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83521#p83521"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83521#p83521"><![CDATA[
how can i get it to remove the line for a person?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9981">Pizza_Guy</a> — Fri Jun 13, 2008 11:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2008-06-13T21:38:52-04:00</updated>

		<published>2008-06-13T21:38:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83520#p83520</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83520#p83520"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83520#p83520"><![CDATA[
when writing to the file, instead of using the 'w' flag use the 'a' flag which will append to the end of the file.<br><br>example:<br><div class="codebox"><p>Code: </p><pre><code>set file [open file.txt a]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri Jun 13, 2008 9:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pizza_Guy]]></name></author>
		<updated>2008-06-13T21:20:54-04:00</updated>

		<published>2008-06-13T21:20:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83519#p83519</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83519#p83519"/>
		<title type="html"><![CDATA[Market script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83519#p83519"><![CDATA[
I am looking for a script where people can list things to sell and then others can look them up<br>basic commands are<br>!sell<br>!remove<br>!search<br><br>there are only 3 things to sell and they are<br>Naq<br>UU<br>AT<br><br>most people use the layout 1k AT 160B Naq<br><br>I tried doign this myself but i ran into the issue of when writing to a file it removing all of the information already there<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9981">Pizza_Guy</a> — Fri Jun 13, 2008 9:20 pm</p><hr />
]]></content>
	</entry>
	</feed>
