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

	<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>2025-12-20T21:41:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-20T21:41:56-04:00</updated>

		<published>2025-12-20T21:41:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113420#p113420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113420#p113420"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113420#p113420"><![CDATA[
has TLS installed.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sat Dec 20, 2025 9:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-10-23T05:49:00-04:00</updated>

		<published>2025-10-23T05:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113381#p113381</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113381#p113381"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113381#p113381"><![CDATA[
As previous: add <strong class="text-strong">package require tls</strong>.<br><br>And concerning the warnings on tclhelp, don't mind about them. They are just warning because the code isn't following the good precepts of coding.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Oct 23, 2025 5:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-10-22T11:01:43-04:00</updated>

		<published>2025-10-22T11:01:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113378#p113378</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113378#p113378"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113378#p113378"><![CDATA[
the code I use<div class="codebox"><p>Code: </p><pre><code> ################################################################################################ Advanced Google.tcl for eggdrop by CP1832 &amp; Arnold_X-P networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls################################################################################################  ## To use this script you must set channel flag +google (ie .chanset #chan +google) ##  ################################################################################################## This tcl requires the following in eggdrop: http.tcl json.tcl ##package require httppackage require json################################################################################################  ##                             Start Setup.                                         ##  ################################################################################################## Change the country code between the "" below to change the language of your results.     ##set googlectry "en"## Change the number between the "" below to change the number of results returned.         ##set googlemax "3"set googlelogo "12G4o7o12g3l4e"## google api ###you must create a key for your google search engine in https://cloud.google.com/docs/authentication/api-keys?visit_id=637728160970526198-325218571&amp;rd=1 #creating_an_api_key# set API_KEY "Your-Api-Key" set SEARCH_ID "ID-Key"  ## time in seconds before requesting a search ## set googleantirepe 14 set googleS_ignore [dict create]################################################################################################  ##                           End Setup.                                              ## ################################################################################################set gaucho "CP1832 &amp; Arnold_X-P"set googlever "v3.5.7"setudef flag googleproc googleweb {nick host hand chan type search} {      global googlectry googlemax API_KEY SEARCH_ID url googlelogo googleantirepe googleS_ignore        http::register https 443 {tls::socket -tls1 1}  set url "https://www.googleapis.com/customsearch/v1?"      if {![channel get $chan google]} {return}      if {$search == ""} {puthelp "PRIVMSG $chan :Error: &lt;search&gt; is empty"; return 1 }      if {$type == ""} {   set googleurl $url[::http::formatQuery alt json key $API_KEY cx $SEARCH_ID hl $googlectry q $search]   } else { set googleurl $url[::http::formatQuery alt json key $API_KEY cx $SEARCH_ID hl $googlectry q $search searchType $type] }      if {[catch {http::geturl $googleurl -timeout 5000} sockerr]} {         puthelp "privmsg $chan :$googlelogo Timeout connecting to Google: $sockerr"         return 1      } elseif {[http::ncode $sockerr] != 200 || ![string equal [http::status $sockerr] "ok"]} {         puthelp "privmsg $chan :$googlelogo Error querying Google: [http::ncode $sockerr] -&gt; [http::status $sockerr]"         http::cleanup $sockerr         return 1      } else { if { $googleantirepe &gt;= 0 } {  if {[dict exists $googleS_ignore $host] &amp;&amp; [dict get $googleS_ignore $host] &gt;= [unixtime]} { putserv "NOTICE $nick :$googlelogo please must wait $googleantirepe seconds to perform a search."  return 0} dict set googleS_ignore $host [expr [unixtime] + $googleantirepe] utimer $googleantirepe [list dict unset googleS_ignore $host]}         set data [http::data $sockerr]         http::cleanup $sockerr         set json [ ::json::json2dict $data ]         for { set i 0 } { $i &lt; $googlemax } { incr i } {            set title ""            set link ""            catch { set title [ dict get [ lindex [ dict get $json items ] $i ] title ] }            catch { set link  [ dict get [ lindex [ dict get $json items ] $i ] link ] }             set index [ expr $i + 1 ]            if {[string length $title] &amp;&amp; [string length $link]} {putserv [encoding convertfrom utf-8 "PRIVMSG $chan :$googlelogo $index $title $link"]            } else {               puthelp "PRIVMSG $chan :$googlelogo I can't find any results for $search."            }         }      }return 1}proc google {nick host hand chan text} { googleweb $nick $host $hand $chan "" $text}proc gimage {nick host hand chan text} { googleweb $nick $host $hand $chan image $text}foreach bind [binds google] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}foreach bind [binds gimage] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}bind pub - .ghgoogle googlebind pub - .google googlebind pub - !google googlebind pub - .gimagen gimagebind pub - !gimagen gimageputlog "Google search loaded by $gaucho $googlever" </code></pre></div>and the paste <a href="http://paste.tclhelp.net/?id=72nf" class="postlink">http://paste.tclhelp.net/?id=72nf</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Oct 22, 2025 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-10-22T07:06:38-04:00</updated>

		<published>2025-10-22T07:06:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113377#p113377</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113377#p113377"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113377#p113377"><![CDATA[
Well, you use tls but I can't see any <strong class="text-strong">package require tls</strong><br>This is probably the main trouble.<br><br>And I don't see any bind for <strong class="text-strong">.ghgoogle</strong> so I don't think you shhow us the script you actually use.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Oct 22, 2025 7:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-10-22T01:08:00-04:00</updated>

		<published>2025-10-22T01:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113376#p113376</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113376#p113376"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113376#p113376"><![CDATA[
I also uploaded the code to the paste page and it made me notice that it has errors in <a href="http://paste.tclhelp.net/?id=72ne" class="postlink"> http://paste.tclhelp.net/?id=72ne</a><br><a href="https://postimages.org/" class="postlink"><img src="https://i.postimg.cc/1tZ88fq8/google-2.jpg" class="postimage" alt="Image"></a><br>Can you help me with those two options that I showed?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Oct 22, 2025 1:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-10-22T01:20:35-04:00</updated>

		<published>2025-10-22T00:58:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113375#p113375</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113375#p113375"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113375#p113375"><![CDATA[
I found this error in the Google search :<br>In the first search it works well for me<br>.ghgoogle irc<br>The detail is in the second search it gives me a result and then tells me : I can't find any results for calgaruns it<br>.ghgoogle calgaruns it<br><a href="https://postimages.org/" class="postlink"><img src="https://i.postimg.cc/x8zptpCD/google-1.jpg" class="postimage" alt="Image"></a><br>Apparently something is wrong on line 69 &amp; 70<br>Partyline doesn't show me any errors.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Oct 22, 2025 12:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-05-11T12:56:03-04:00</updated>

		<published>2025-05-11T12:56:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113325#p113325</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113325#p113325"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113325#p113325"><![CDATA[
I'm not sure it will work but I will apply it.<div class="codebox"><p>Code: </p><pre><code># utimer $googleantirepe [list dict unset googleS_ignore $host]putlog "Time for $host is [dict get googleS_ignore $host]"</code></pre></div>I apply what you recommend to remove, the TCL stops working and gives me an error<div class="codebox"><p>Code: </p><pre><code>[16:46:32] Tcl error [google]: missing value to go with key</code></pre></div>I have to put it back the way it was before and it works<div class="codebox"><p>Code: </p><pre><code>utimer $googleantirepe [list dict unset googleS_ignore $host]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sun May 11, 2025 12:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-05-11T07:10:22-04:00</updated>

		<published>2025-05-11T07:10:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113323#p113323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113323#p113323"/>
		<title type="html"><![CDATA[Re: Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113323#p113323"><![CDATA[
Why do you unset googleS_ignore (even with a timer) ? It's useless and probably the root cause of your trouble.<br><br>You'd better remove the line, and you can add a debug:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl"># utimer $googleantirepe [list dict unset googleS_ignore $host]putlog "Time for $host is [dict get googleS_ignore $host]"</code></pre></div> <strong>script</strong> <p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun May 11, 2025 7:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-10-22T01:18:19-04:00</updated>

		<published>2025-05-10T23:29:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113320#p113320</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113320#p113320"/>
		<title type="html"><![CDATA[Google Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113320#p113320"><![CDATA[
Please help.<br>The wait time for a search sometimes doesn't work properly. I'm referring to this section: <strong class="text-strong">set googleantirepe 14</strong><div class="codebox"><p>Code: </p><pre><code> ################################################################################################ Advanced Google.tcl for eggdrop by CP1832 &amp; Arnold_X-P networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls################################################################################################  ## To use this script you must set channel flag +google (ie .chanset #chan +google) ##  ################################################################################################## This tcl requires the following in eggdrop: http.tcl json.tcl #### This tcl requires the following in windrop: http.tcl json.tcl tls.tcl ##package require httppackage require json################################################################################################  ##                             Start Setup.                                         ##  ################################################################################################## Change the country code between the "" below to change the language of your results.     ##set googlectry "en"## Change the number between the "" below to change the number of results returned.         ##set googlemax "3"set googlelogo "12G4o7o12g3l4e"## google api ###you must create a key for your google search engine in https://cloud.google.com/docs/authentication/api-keys?visit_id=637728160970526198-325218571&amp;rd=1 #creating_an_api_key# set API_KEY "Your-Api-Key" set SEARCH_ID "ID-Key"  ## time in seconds before requesting a search ## set googleantirepe 14 set googleS_ignore [dict create]################################################################################################  ##                           End Setup.                                              ## ################################################################################################set gaucho "CP1832 &amp; Arnold_X-P"set googlever "v3.5.7"setudef flag googleproc googleweb {nick host hand chan type search} {      global googlectry googlemax API_KEY SEARCH_ID url googlelogo googleantirepe googleS_ignore        http::register https 443 {tls::socket -tls1 1}  set url "https://www.googleapis.com/customsearch/v1?"      if {![channel get $chan google]} {return}      if {$search == ""} {puthelp "PRIVMSG $chan :Error: &lt;search&gt; is empty"; return 1 }      if {$type == ""} {   set googleurl $url[::http::formatQuery alt json key $API_KEY cx $SEARCH_ID hl $googlectry q $search]   } else { set googleurl $url[::http::formatQuery alt json key $API_KEY cx $SEARCH_ID hl $googlectry q $search searchType $type] }      if {[catch {http::geturl $googleurl -timeout 5000} sockerr]} {         puthelp "privmsg $chan :$googlelogo Timeout connecting to Google: $sockerr"         return 1      } elseif {[http::ncode $sockerr] != 200 || ![string equal [http::status $sockerr] "ok"]} {         puthelp "privmsg $chan :$googlelogo Error querying Google: [http::ncode $sockerr] -&gt; [http::status $sockerr]"         http::cleanup $sockerr         return 1      } else { if { $googleantirepe &gt;= 0 } {  if {[dict exists $googleS_ignore $host] &amp;&amp; [dict get $googleS_ignore $host] &gt;= [unixtime]} { putserv "NOTICE $nick :$googlelogo please must wait $googleantirepe seconds to perform a search."  return 0} dict set googleS_ignore $host [expr [unixtime] + $googleantirepe] utimer $googleantirepe [list dict unset googleS_ignore $host]}         set data [http::data $sockerr]         http::cleanup $sockerr         set json [ ::json::json2dict $data ]         for { set i 0 } { $i &lt; $googlemax } { incr i } {            set title ""            set link ""            catch { set title [ dict get [ lindex [ dict get $json items ] $i ] title ] }            catch { set link  [ dict get [ lindex [ dict get $json items ] $i ] link ] }            set index [ expr $i + 1 ]            if {[string length $title] &amp;&amp; [string length $link]} {putserv [encoding convertfrom utf-8 "PRIVMSG $chan :$googlelogo $title $link"]            } else {               puthelp "PRIVMSG $chan :$googlelogo I can't find any results for 4$search."            }         }      }return 1}proc google {nick host hand chan text} { googleweb $nick $host $hand $chan "" $text}proc gimage {nick host hand chan text} { googleweb $nick $host $hand $chan image $text}foreach bind [binds google] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}foreach bind [binds gimage] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}bind pub - .ghgooglebind pub - .google googlebind pub - !google googlebind pub - .gimagen gimagebind pub - !gimagen gimageputlog "Google search loaded by $gaucho $googlever" </code></pre></div> <br>Someone help me with the aforementioned detail<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sat May 10, 2025 11:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
