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

	<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>2020-04-29T08:35:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2020-04-29T08:30:13-04:00</updated>

		<published>2020-04-29T08:30:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108343#p108343</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108343#p108343"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108343#p108343"><![CDATA[
no, have not looked for another script as i don't have control of the bot anymore<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Wed Apr 29, 2020 8:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-04-29T08:35:25-04:00</updated>

		<published>2020-04-29T08:26:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108342#p108342</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108342#p108342"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108342#p108342"><![CDATA[
ah ok do you know of a current google script ?<br><br>i am trying to create a new script will publish at <br><br><a href="https://github.com/computertech312" class="postlink">https://github.com/computertech312</a><br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>EDIT <br><br>Ah ok np<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Wed Apr 29, 2020 8:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2020-04-29T08:25:26-04:00</updated>

		<published>2020-04-29T08:25:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108341#p108341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108341#p108341"/>
		<title type="html"><![CDATA[thx anyways]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108341#p108341"><![CDATA[
no longer use this script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Wed Apr 29, 2020 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-04-29T08:05:23-04:00</updated>

		<published>2020-04-29T08:05:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108339#p108339</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108339#p108339"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108339#p108339"><![CDATA[
can you pastebin the way you have your current script   <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=12849">ComputerTech</a> — Wed Apr 29, 2020 8:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2020-04-19T02:35:33-04:00</updated>

		<published>2020-04-19T02:35:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108251#p108251</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108251#p108251"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108251#p108251"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> Tanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Sun Apr 19, 2020 2:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-04-18T21:38:03-04:00</updated>

		<published>2020-04-18T21:38:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108244#p108244</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108244#p108244"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108244#p108244"><![CDATA[
LOL your special eh i have had the same problem with that script cant remember how i fixed it, if i remember i will post how i did it <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=12849">ComputerTech</a> — Sat Apr 18, 2020 9:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-28T20:07:50-04:00</updated>

		<published>2019-10-28T20:07:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107914#p107914</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107914#p107914"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107914#p107914"><![CDATA[
lol maybe it's my own personal error?   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Mon Oct 28, 2019 8:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2019-10-29T09:46:41-04:00</updated>

		<published>2019-10-28T18:20:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107913#p107913</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107913#p107913"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107913#p107913"><![CDATA[
seems like, its because of trimleft the regexp in news_print proc fails.<br>but,at the same time, trimleft helps to get fixed shortened news link! <br><br>you can try this edit: <a href="http://paste.tclhelp.net/?id=6gqu" class="postlink">http://paste.tclhelp.net/?id=6gqu</a><br>I've been watching at partyline and checking logs for half an hour,i still didn't see error!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Mon Oct 28, 2019 6:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-28T14:45:23-04:00</updated>

		<published>2019-10-28T14:45:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107912#p107912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107912#p107912"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107912#p107912"><![CDATA[
did the modes you posted, works fine as wine.<br> lol, but,  ok - HTTP/1.1 502 Bad Gateway<br>and  Tcl error [Google:News]: can't read "links": no such variable  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Mon Oct 28, 2019 2:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-26T19:21:48-04:00</updated>

		<published>2019-10-26T19:21:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107910#p107910</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107910#p107910"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107910#p107910"><![CDATA[
thanks, gonna try that right after i stuff me face.<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Sat Oct 26, 2019 7:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2019-10-26T16:07:38-04:00</updated>

		<published>2019-10-26T16:07:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107909#p107909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107909#p107909"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107909#p107909"><![CDATA[
I haven't checked url shortener option before,but yes, you were right! somethings looks suspicious in there.<br>I've just checked to bot/logs ,still I couldn't see any error like yours in there!<br><br>workaround for url shortener:<br>goto getshort procedure and replace it :<div class="codebox"><p>Code: </p><pre><code>if {[info exists data]} {return $data} else {return $newslink}</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>if {[info exists data]} {return $data}</code></pre></div>and in Google:News proc replace :<div class="codebox"><p>Code: </p><pre><code>set newslink [lindex [split $news |] 1]</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>set newslink [string trimleft [lindex [split $news |] 1]]</code></pre></div>then find :<div class="codebox"><p>Code: </p><pre><code>news_print $chan "$newsdesc $newslink ([duration [expr {[clock seconds] - $newstime}]] ago.)"} else {news_print $chan "$newsdesc $newslink ([duration [expr {[clock seconds] - $newstime}]] ago.)"</code></pre></div>and replace it with :<div class="codebox"><p>Code: </p><pre><code>news_print $chan "$newsdesc [news_shortened $newslink] ([duration [expr {[clock seconds] - $newstime}]] ago.)"} else {news_print $chan "$newsdesc [news_shortened $newslink] ([duration [expr {[clock seconds] - $newstime}]] ago.)"</code></pre></div>and .rehash or .restart the bot and see if it works as expected!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Sat Oct 26, 2019 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-26T11:01:41-04:00</updated>

		<published>2019-10-26T11:01:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107907#p107907</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107907#p107907"/>
		<title type="html"><![CDATA[google news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107907#p107907"><![CDATA[
[08:58:02] Tcl error [Google:News]: wrong # args: should be "set varName ?newValue?"<br><br> new error to work on lol<br><br>can't use the url shortener, the original url works fime, still get that error tho, not sure why<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Sat Oct 26, 2019 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-26T10:49:19-04:00</updated>

		<published>2019-10-26T10:49:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107906#p107906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107906#p107906"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107906#p107906"><![CDATA[
the good new is that there is  no more error<br><br>the bad news is, it's not working lol<br><br> rebooted the bot, now it works <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>  thank you heartbroken<br> much appreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Sat Oct 26, 2019 10:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2019-10-26T11:19:15-04:00</updated>

		<published>2019-10-26T08:38:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107905#p107905</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107905#p107905"/>
		<title type="html"><![CDATA[googlenews]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107905#p107905"><![CDATA[
this one: <a href="http://paste.tclhelp.net/?id=6gql" class="postlink">http://paste.tclhelp.net/?id=6gql</a> is latest GoogleNews version.<br>I think,he didn't send it to TclArchive yet.<br><br>Edit: Updated paste.tclhelp link! I've took this from my bot and I don't get any error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Sat Oct 26, 2019 8:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2019-10-24T13:08:57-04:00</updated>

		<published>2019-10-24T13:08:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107903#p107903</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107903#p107903"/>
		<title type="html"><![CDATA[nothing changed, original script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107903#p107903"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Google news v0.3 by nrt (01Dec2015)# Updated GoogleNews Country links and added some more lines for redirected link support (04Jan2018) karakedipackage require tdompackage require httppackage require htmlparsepackage require textutil::splitpackage require tls 1.6.4package present Tcl 8.6set ::oldnews [list ]set googlelink {https://news.google.com/news/rss/headlines/section/topic/NATION}# Length of chars in a line.set newsmax 412# Links shortened to tinyurl. 1 = true , 0 = falseset tinyurl 1# 1 = US_en (U.S.A), 2 = TR (Turkey) , 3 = FR (France), 4 = DE (Germany), 5 = UK_en (U.K) , 6 = RU (Russia)# 7 = IT (Italy) , 8 = NL (Netherlands) , 9 = AU_en (Australia) , 10 = PT (Portugal) , 11 = AR (Arabian World) , 12 = AT_de (Austria)# 13 = BE_fr (Belgium) , 14 = BR_pt (Brazil) , 15 = BG (Bulgaria) , 16 = CA_en (Canada) , 17 = NZ_en (New Zealand) , 18 = PL (Poland)# 19 = RO (Romania) , 20 = CS (Czech Republic) , 21 = NO (Norway) , 22 = CH_fr (Switzerland) , 23 = SV (Sweden) , 24 = SR (Serbia)# 25 = CN_zh (China) , 26 = JA (Japan) , 27 = GR (Greece) , 28 = LT (Lithuania) , 29 = IN_en (India) , 30 = HU (Hungary)# 31 = AR (Argentina) , 32 = ID (Indonesia) , 33 = MY (Malaysia) , 34 = BN (Bangladesh) , 35 = MX (Mexico) , 36 = PK_en (Pakistan)# news in this language/nationset newslang 1# This is for set a limit, do not post if that headline older than ** minutesset headlinedelay 20# .news on &lt;- to enable on your #channel / .news off &lt;- for turn this off!setudef flag googlenewsbind pub mnf|oa ".news" news_controlbind evnt - init-server news_refreshif {[package vcompare [package present tls] 1.7] &gt; 0} {::http::register https 443 [list ::tls::socket -autoservername 1]} else {::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]}proc langSel {} {switch -exact -- $::newslang {1 { set url {us&amp;hl=en&amp;gl=US} }2 { set url {tr_tr&amp;hl=tr&amp;gl=TR} }3 { set url {fr&amp;hl=fr&amp;gl=FR} }4 { set url {de&amp;hl=de&amp;gl=DE} }5 { set url {uk&amp;hl=en-GB&amp;gl=GB} }6 { set url {ru_ru&amp;hl=ru&amp;gl=RU} }7 { set url {it&amp;hl=it&amp;gl=IT} }8 { set url {nl_nl&amp;hl=nl&amp;gl=NL} }9 { set url {au&amp;hl=en-AU&amp;gl=AU} }10 { set url {pt-PT_pt&amp;hl=pt-PT&amp;gl=PT} }11 { set url {ar_me&amp;hl=ar&amp;gl=ME} }12 { set url {de_at&amp;hl=de-AT&amp;gl=AT} }13 { set url {fr_be&amp;hl=fr&amp;gl=BE} }14 { set url {pt-BR_br&amp;hl=pt-BR&amp;gl=BR} }15 { set url {bg_bg&amp;hl=bg&amp;gl=BG} }16 { set url {ca&amp;hl=en-CA&amp;gl=CA} }17 { set url {nz&amp;hl=en-NZ&amp;gl=NZ} }18 { set url {pl_pl&amp;hl=pl&amp;gl=PL} }19 { set url {ro_ro&amp;hl=ro&amp;gl=RO} }20 { set url {cs_cz&amp;hl=cs&amp;gl=CZ} }21 { set url {no_no&amp;hl=no&amp;gl=NO} }22 { set url {fr_ch&amp;hl=fr-CH&amp;gl=CH} }23 { set url {sv_se&amp;hl=sv&amp;gl=SE} }24 { set url {sr_rs&amp;hl=sr&amp;gl=RS} }25 { set url {cn&amp;hl=zh-CN&amp;gl=CN} }26 { set url {jp&amp;hl=ja&amp;gl=JP} }27 { set url {el_gr&amp;hl=el&amp;gl=GR} }28 { set url {lt_lt&amp;hl=lt&amp;gl=LT} }29 { set url {in&amp;hl=en-IN&amp;gl=IN} }30 { set url {hu_hu&amp;hl=hu&amp;gl=HU} }31 { set url {es_ar&amp;hl=es-419&amp;gl=AR} }32 { set url {id_id&amp;hl=id&amp;gl=ID} }33 { set url {en_my&amp;hl=en-MY&amp;gl=MY} }34 { set url {bn_bd&amp;hl=bn&amp;gl=BD} }35 { set url {es_mx&amp;hl=es-419&amp;gl=MX} }36 { set url {en_pk&amp;hl=en&amp;gl=PK} }default { set url {us&amp;hl=en&amp;gl=US} }}return ${::googlelink}?ned=$url}proc news_refresh {type} {foreach chan [channels] newsbind [binds time] {if {([lsearch -exact [channel info $chan] "+googlenews"] != "-1")\&amp;&amp; ![string match "*Google:News*" $newsbind]} {bind time - "*" Google:Newsreturn 1}}}proc news_control {nick uhost hand chan text} {switch -nocase -- [lindex [split $text] 0] {"on" { if {[channel get $chan googlenews]} {puthelp "privmsg $chan :News already running @ $chan"} {bind time - "*" Google:Newschannel set $chan +googlenewsputhelp "privmsg $chan :News now enabled @ $chan"}}"off" { if {![channel get $chan googlenews]} {puthelp "privmsg $chan :News already disabled @ $chan"} {unbind time - "*" Google:Newschannel set $chan -googlenewsputhelp "privmsg $chan :News now stopped @ $chan"}}default { puthelp "privmsg $chan :Usage: $::lastbind &lt;on/off&gt;" }}return 0}proc getit {url} {if {[catch {set token [http::geturl $url -binary 1 -timeout 15000]} error]} {putcmdlog "[string map [list \n " "] $error]"return 0} elseif {[http::status $token] eq "ok" &amp;&amp; [http::ncode $token] == "200"} {set data [http::data $token]::http::cleanup $token} elseif {[string match *[http::ncode $token]* "307|303|302|301"]} {upvar #0 $token stateforeach {names values} $state(meta) {if {[regexp -- {^Location$} $names]} {putlog "Redirecting to $values"::http::cleanup $tokenif {[catch {set tok [http::geturl $values -binary 1 -timeout 15000]} err]} {putcmdlog "[string map [list \n " "] $err]"break} elseif {[http::status $tok] eq "ok" &amp;&amp; [http::ncode $tok] == "200"} {set data [http::data $tok]::http::cleanup $tok} else {putcmdlog "[http::status $tok] - [http::code $tok]"::http::cleanup $tok}}}} else {putcmdlog "[http::status $token] - [http::code $token]"::http::cleanup $token}if {[info exists data]} {return [encoding convertfrom utf-8 $data]}}proc newsdom {} {set document [dom parse [getit [langSel]]]set root [$document documentElement]foreach id [$root selectNodes "/rss/channel/item"] {set description [[$id selectNodes "description"] text]set pubDate [[$id selectNodes "pubDate"] text]set newsurl [[$id selectNodes "link"] text]lappend news "[dom_trim $description] | [dom_trim $newsurl] | [clock scan [dom_trim $pubDate]]"}$document deleteset listnews [lindex [lsort -integer -decreasing -index end $news] 0]return [join [htmlparse::mapEscapes $listnews]]}proc news_print {where what} {regexp {^(.*?)(http(?:s|)://[^\s]+)(.*?)$} $what - res links _set output [textutil::split::splitn $what $::newsmax]if {[string match *${links}* $output]} {lmap newsout $output { puthelp "privmsg $where :$newsout" }} else {lmap newsout [textutil::split::splitn $what [string length $res]] { puthelp "privmsg $where :$newsout" }}}proc dom_trim {str} {regsub -all -nocase {(?:&lt;strong&gt;|&lt;/strong&gt;|&lt;b&gt;|&lt;/b&gt;)} $str "\002" strregsub -all -- {&lt;font color="#6f6f6f"&gt;(.*?)&lt;/font&gt;} $str "(\00304\\1\003)" strset str [string map [list &amp;lt\; \u003c &amp;gt\; \u003e &amp;nbsp\; \u0020 \" \u0027] $str]regsub -all -- "&lt;.+?&gt;" $str { } strregsub -all -- {\s+} $str "\u0020" strreturn [string trim $str]}proc news_tiny {link} {set tinyurl [getit http://tinyurl.com/api-create.php?[http::formatQuery url $link]]if {[info exists tinyurl] &amp;&amp; [string length $tinyurl]} {return $tinyurl} else {return $link}}proc Google:News {args} {foreach chan [channels] {if {[channel get $chan googlenews]} {set news [newsdom]set newsdesc [lindex [split $news |] 0]set newslink [lindex [split $news |] 1]set newstime [lindex [split $news |] end]scan $newsdesc {%[^(]} headlineif {![string match *${newslink}* $::oldnews] &amp;&amp; ($headline ni $::oldnews)\&amp;&amp; ([expr {([clock seconds] - ${newstime}) &lt; (${::headlinedelay} * 60)}])} {if {$::tinyurl &lt; "1" || ![string length $::tinyurl]} {news_print $chan "$newsdesc : $newslink ([duration [expr {[clock seconds] - $newstime}]] ago.)"} else {news_print $chan "$newsdesc : [news_tiny [string trim $newslink]] ([duration [expr {[clock seconds] - $newstime}]] ago.)"}set ::oldnews $news}}}return 0}putlog "ok..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12747">roger</a> — Thu Oct 24, 2019 1:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
