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

	<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>2010-11-26T20:38:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[notrox]]></name></author>
		<updated>2010-11-26T20:38:08-04:00</updated>

		<published>2010-11-26T20:38:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95197#p95197</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95197#p95197"/>
		<title type="html"><![CDATA[Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95197#p95197"><![CDATA[
Thanks! That worked like a charm. I'm sorry for my late response, I wasn't notified of the replies. <br><br>Thanks again<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9030">notrox</a> — Fri Nov 26, 2010 8:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2010-11-20T09:51:35-04:00</updated>

		<published>2010-11-20T09:51:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95144#p95144</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95144#p95144"/>
		<title type="html"><![CDATA[Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95144#p95144"><![CDATA[
I'm so getting this script when you finish it hehehe  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Sat Nov 20, 2010 9:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Trixar_za]]></name></author>
		<updated>2010-11-19T23:32:54-04:00</updated>

		<published>2010-11-19T23:32:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95142#p95142</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95142#p95142"/>
		<title type="html"><![CDATA[Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95142#p95142"><![CDATA[
Sorry for the late response, but I normally check out Script Support &amp; Releases rather than here. It's normally simpler to send me a pm to get my attention, because I check my e-mail more than I do here.<br><br>Anyway, the problem with the regex is that it's trying to use &lt;a&gt;&lt;/a&gt; tags to match, while the clean up code ends up removing all of them:<div class="codebox"><p>Code: </p><pre><code>     regsub -all {&lt;a.+?&gt;} $html {} html     regsub -all {&lt;/a&gt;} $html {} html </code></pre></div> so you could probably try removing them to make the suggested regexes work.<br><br>But it would probably be better to preserve that code (for future fml like in-line ad links) and rather use a regex without relying on them:<div class="codebox"><p>Code: </p><pre><code>     if {[regexp -- {&lt;div class="sc"&gt;(.+?)&lt;/div&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]     } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10958">Trixar_za</a> — Fri Nov 19, 2010 11:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-11-08T17:21:00-04:00</updated>

		<published>2010-11-08T17:21:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95006#p95006</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95006#p95006"/>
		<title type="html"><![CDATA[Re: Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95006#p95006"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Try...<div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc"&gt;.*?&lt;a class="storylink".*?&gt;(.+?)&lt;/a&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div></div></blockquote>Thanks but it was a no go.</div></blockquote><div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc"&gt;.*?&lt;a class="storylink" href=".*?"&gt;(.*?)&lt;/a&gt;.*?&lt;/div&gt; $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div><p>Statistics: Posted by Guest — Mon Nov 08, 2010 5:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[notrox]]></name></author>
		<updated>2010-11-07T14:33:12-04:00</updated>

		<published>2010-11-07T14:33:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95000#p95000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95000#p95000"/>
		<title type="html"><![CDATA[Re: Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95000#p95000"><![CDATA[
<blockquote class="uncited"><div>Try...<div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc"&gt;.*?&lt;a class="storylink".*?&gt;(.+?)&lt;/a&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div></div></blockquote>Thanks but it was a no go.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9030">notrox</a> — Sun Nov 07, 2010 2:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-11-07T14:16:36-04:00</updated>

		<published>2010-11-07T14:16:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94999#p94999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94999#p94999"/>
		<title type="html"><![CDATA[Re: Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94999#p94999"><![CDATA[
<blockquote class="uncited"><div>I am getting stuck at this part.  The div's are slightly different from FML, I tried a few different ways and nothing. <br>  <div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc".+?&gt;&lt;p&gt;(.+?)&lt;/p&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div></div></blockquote>Try...<div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc"&gt;.*?&lt;a class="storylink".*?&gt;(.+?)&lt;/a&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Nov 07, 2010 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[notrox]]></name></author>
		<updated>2010-11-07T13:58:22-04:00</updated>

		<published>2010-11-07T13:58:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94998#p94998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94998#p94998"/>
		<title type="html"><![CDATA[Trying to convert the FML script to That High]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94998#p94998"><![CDATA[
I have been trying to modify Trixar_za's FML Script to pull from <a href="http://www.thathigh.com" class="postlink">http://www.thathigh.com</a> The two sites are very similar in design. <br><br>Site source <div class="codebox"><p>Code: </p><pre><code>&lt;div id="content"&gt;    &lt;!--&lt;div id="top"&gt;    &lt;/div&gt;--&gt;     &lt;div id="lc"&gt;                &lt;div id="stories"&gt;    &lt;div id="s_123" class="story s"&gt;        &lt;div class="sc"&gt;            &lt;a class="storylink" href="/story/93818/"&gt;Thought lying was bad so I chewed up my friends fake id.. That high.&lt;/a&gt;        &lt;/div&gt;</code></pre></div> I am getting stuck at this part.  The div's are slightly different from FML, I tried a few different ways and nothing. <br>  <div class="codebox"><p>Code: </p><pre><code> if {[regexp -- {&lt;div class="sc".+?&gt;&lt;p&gt;(.+?)&lt;/p&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]</code></pre></div>( For testing purposes I kept the commands the same)  <br><div class="codebox"><p>Code: </p><pre><code># Fmylife.com Script by Trixar_za# Based on the Twitter script by Warlord v1.0# Type in partyline: ".chanset #channel +fml" to enable it.# Sets the logoset fml(logo) "\002\[FML\]:\002"# Sets the user agentset fml(agent) "Mozilla/4.75 (X11; U; Linux 2.2.17; i586; Nav)"setudef flag fmlif {[catch {package require http 2.5} e] != 0} {  set fml(noutf8) 1  package require http}bind pub - !fml proc:fmlbind pub - .fml proc:fml# wordwrap code by speechlessproc msg {type dest data} {   set len [expr {500-[string len ":$::botname $type $dest :\r\n"]}]   foreach line [wordwrap $data $len] {      putserv "$type $dest :$line"   }}proc wordwrap {data len} {   set out {}   foreach line [split [string trim $data] \n] {      set curr {}      set i 0      foreach word [split [string trim $line]] {         if {[incr i [string len $word]]&gt;$len} {            lappend out [join $curr]            set curr [list $word]            set i [string len $word]         } {            lappend curr $word         }         incr i      }      if {[llength $curr]} {         lappend out [join $curr]      }   }   set out}proc proc:fml {nick uhand handle chan input} {  if {[channel get $chan fml]} {     global fml     if {[info exists fml(noutf8)]} {        set http [::http::config -useragent $fml(agent)]     } else {        set http [::http::config -useragent $fml(agent) -urlencoding "utf-8"]     }     catch { set http [::http::geturl "http://www.thathigh.com/random/"]}error      if {![string match -nocase "::http::*" $error]} {        msg "PRIVMSG" $chan "$fml(logo) [string totitle [string map {"\n" " | "} $error]]"        return 0     }     if {![string equal -nocase [::http::status $http] "ok"]} {        msg "PRIVMSG" $chan "$fml(logo) [string totitle [::http::status $http]]"        return 0     }     set html [::http::data $http]     # Clean up :P     regsub -all {\n} $html { } html     regsub -all {\t} $html { } html     regsub -all {&lt;br/&gt;} $html { } html     regsub -all { } $html { } html     regsub -all {    } $html { } html     regsub -all {   } $html { } html     regsub -all {  } $html { } html     regsub -all {&lt;a.+?&gt;} $html {} html     regsub -all {&lt;/a&gt;} $html {} html     regsub -all {&lt;strong.+?&gt;} $html {} html     regsub -all {&lt;/strong&gt;} $html {} html     regsub -all {—} $html {-} html     regsub -all {&gt;} $html {&gt;} html     regsub -all {&lt;} $html {&lt;} html     regsub -all {&amp;} $html {\&amp;} html     regsub -all {×} $html {*} html     regsub -all {(?:\x91|\x92|’|‘|')} $html {'} html     regsub -all {(?:\x93|\x94|“|”|")} $html {"} html     regsub -all {×} $html {x} html     regsub -all {(?:&lt;!\[CDATA\[)} $html {} html     if {[regexp -- {&lt;div class="sc".+?&gt;&lt;p&gt;(.+?)&lt;/p&gt;} $html - fmlq]} {        set fmlq [string trim $fmlq]     }     if {[info exists fmlq]} {        msg "PRIVMSG" $chan "$fml(logo) $fmlq"     } else {        msg "PRIVMSG" $chan "$fml(logo) Error: Couldn't get a FML quote!"     }  }}putlog "Fmylife.com Script by Trixar_za Loaded"</code></pre></div>Could someone please point me in the right direction.<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9030">notrox</a> — Sun Nov 07, 2010 1:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
