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

	<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-11-20T12:22:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2008-11-20T12:22:02-04:00</updated>

		<published>2008-11-20T12:22:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85902#p85902</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85902#p85902"/>
		<title type="html"><![CDATA[Print basic info from website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85902#p85902"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval svt {}setudef flag nopubsvtset svt(pref) "!"set svt(commands) "svt"set svt(time) 30set svt(page) http://svt.se/svttext/web/pages/358.htmlset svt(version) "1.0"set svt(author) "tvrsh @ IrcNet.ru"package require httpforeach bind [split $svt(commands) " "] {bind pub -|- $svt(pref)$bind ::svt::pubbind msg -|- $svt(pref)$bind ::svt::msg}proc ::svt::msg {nick uhost hand arg} {    ::svt::svt $nick $uhost $hand $nick $arg}proc ::svt::pub {nick uhost hand chan arg} {   if {[channel get $chan nopubsvt]} return   ::svt::svt $nick $uhost $hand $chan $arg}proc ::svt::svt {nick uhost hand chan arg} {global svt lastbind      set arg [lindex [split $arg] 0]if {[info exists svt(host,$uhost)]} {if {$chan == $nick} {putquick "PRIVMSG $nick :\00303Wait \00304$svt(time) \00303seconds before next request."return} else {putquick "NOTICE $nick :\00303Wait \00304$svt(time) \00303seconds before next request."return}}           set agent "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1"set svt(host,$uhost) 1set svt(timer,$uhost) [utimer $svt(time) [list ::svt::reset $uhost ] ]set svt_tok [::http::config -useragent $agent]set svt_tok [::http::geturl $svt(page) -timeout 30000]  set html [::http::data $svt_tok]::http::cleanup $svt_tok       set rgx "&lt;span\\\ class=\\\"W\\\ bgB\\\"&gt;(.*?)&lt;div\\\ class=\\\"subWrapper\\\"&gt;"       regsub -all -- {\n} $html "" html           foreach line [split $html \n] {               if {[regexp -nocase -- $rgx $line garb data]} {               set html $data               regsub -all -- {&lt;/span&gt;&lt;span.*?&gt;} $html " " html               regsub -all -- {&lt;span\ class=.*?&gt;} $html "|" html               regsub -all -- {&lt;/span&gt;} $html "" html               regsub -all -- {&lt;/div&gt;} $html "" html               regsub -all -- {&lt;/pre&gt;} $html "" html               regsub -all -- {\s+} $html " " html               #putlog $html                  foreach line [split $html "|"] {                      if {$line != " "} { putserv "PRIVMSG $chan :\00302$line" }                  }               return}}}proc ::svt::reset { uhost } { global svt catch {killutimer $svt(timer,$uhost)}  catch {unset svt(timer,$uhost)}   catch {unset svt(host,$uhost)}}putlog "svt.tcl v$svt(version) by $svt(author) loaded."</code></pre></div>This is the result:  <blockquote class="uncited"><div>[19:19:53] &lt;tvrsh&gt; !svt<br>[19:19:53] &lt;bionic&gt; ISHOCKEY Elitserien (55 omg.) <br>[19:19:53] &lt;bionic&gt; 17/11 Frцlunda - Sцdertдlje 3-2 <br>[19:19:53] &lt;bionic&gt;  Linkцping - Rцgle 3-1 <br>[19:19:53] &lt;bionic&gt;  Modo - Skellefteе 0-6 <br>[19:19:53] &lt;bionic&gt; 18/11 HV71 - Luleе 1-1 SD <br>[19:19:53] &lt;bionic&gt;  Fдrjestad - Timrе 2-0 <br>[19:19:56] &lt;bionic&gt;  Djurgеrden - Brynдs 2-4 <br>[19:19:58] &lt;bionic&gt;  S V O F VЦ GM IM P <br>[19:20:00] &lt;bionic&gt;  1 Linkцpin 22 12 5 5 1 65- 50 42 <br>[19:20:01] &lt;bionic&gt;  2 Skelleft 22 10 5 7 1 66- 54 36 <br>[19:20:04] &lt;bionic&gt;  3 Fдrjesta 22 11 3 8 0 53- 47 36 <br>[19:20:06] &lt;bionic&gt;  4 Brynдs 22 10 3 9 2 51- 58 35 <br>[19:20:08] &lt;bionic&gt;  5 Rцgle 22 9 5 8 1 62- 59 33 <br>[19:20:09] &lt;bionic&gt;  6 Modo 23 9 4 10 2 66- 71 33 <br>[19:20:12] &lt;bionic&gt;  7 Luleе 22 9 5 8 0 60- 57 32 <br>[19:20:14] &lt;bionic&gt;  8 Frцlunda 22 8 5 9 2 55- 56 31 <br>[19:20:16] &lt;bionic&gt;  9 HV71 22 7 7 8 3 60- 62 31 <br>[19:20:17] &lt;bionic&gt; 10 Djurgеrd 23 6 8 9 3 63- 66 29 <br>[19:20:20] &lt;bionic&gt; 11 Timrе 22 6 5 11 4 55- 66 27 <br>[19:20:22] &lt;bionic&gt; 12 Sцdertдl 22 5 7 10 2 53- 63 24 <br>[19:20:24] &lt;bionic&gt;  Kommande omgеngar sid. 359 </div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Thu Nov 20, 2008 12:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-11-20T09:03:08-04:00</updated>

		<published>2008-11-20T09:03:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85897#p85897</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85897#p85897"/>
		<title type="html"><![CDATA[Print basic info from website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85897#p85897"><![CDATA[
you must use sockets to do that i need to learn about sockets is very usefull so i would know who you can do that if someone want to make it .<br>gl<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Thu Nov 20, 2008 9:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[offndr]]></name></author>
		<updated>2008-11-18T03:48:31-04:00</updated>

		<published>2008-11-18T03:48:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85858#p85858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85858#p85858"/>
		<title type="html"><![CDATA[Print basic info from website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85858#p85858"><![CDATA[
hi<br><br>I want a script that when I do !text it takes information from <br><a href="http://svt.se/svttext/web/pages/358.html" class="postlink">http://svt.se/svttext/web/pages/358.html</a> and prints the whole table of stats into my channel(It is kind of experimental so it doesnt realy matter how it looks like, the main part is that something goes into the channel).<br><br> Further on I want to implement a !search function that for example !text &lt;searchword&gt; does output the whole row of that searchword.<br>So, If I do !text &lt;modo&gt; it should output the whole row for modo stats only.<br><br>Is this possible?<br>I would appreciate this ALOT<br>Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5859">offndr</a> — Tue Nov 18, 2008 3:48 am</p><hr />
]]></content>
	</entry>
	</feed>
