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

	<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>2004-10-04T19:21:05-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sir]]></name></author>
		<updated>2004-10-04T19:21:05-04:00</updated>

		<published>2004-10-04T19:21:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41555#p41555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41555#p41555"/>
		<title type="html"><![CDATA[it just doesn't work...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41555#p41555"><![CDATA[
ok, I'm not sure why, but it doesnt work.<br>it loads correctly (log is inserted), but other than that, there is absolutely no response from the bot in public channels.<br><div class="codebox"><p>Code: </p><pre><code># Maximum Number of Resultsset maxresults 3# setting up the way our output looksset start ""set end ""set delim ":"# Binds!# bind pub - .find gametiger_query### The following function is used to query the gametiger database in order to # search for online players or servers, also forwards steamid requests to the steamid function## set game "cstrike" o "all" proc gametiger_query { nick host hand chan text } {global start end delim maxresultsset buffer ""set sname ""set result "results"set type ""set game "all"set results 0set valid 1set first [expr {[string first " " $text]} + 1]set query [string range "$text" $first end]switch -glob $text {"player *" {set type "player"set stype "player"set iname 2set ihost 6set iip 12set imap 18set icurrmax 22}"server *" {set type "server"set stype "server"set ihost 3set iip 9set imap 15set icurrmax 19}"map *" {set type "map"set stype "map"set ihost 3set iip 9set imap 15set icurrmax 19}"steamid*" { steam_query $nick $host $hand $chan $query }default {set valid 0puthelp "NOTICE $nick :Usage: .find &lt;server|map|player&gt; &lt;hostname|mapname|playername&gt;" }}if { $valid == 1 &amp;&amp; ![string equal $query ""] } {regsub -all " " $query "+" queryset host "www.gametiger.net"set url "/search?$type=$query&amp;game=$game"set FD [socket $host 80]# setup single line bufferingfconfigure $FD -buffering line -buffersize 1024# yay HTTP/1.1 standards!puts $FD "GET $url HTTP/1.1"puts $FD "Host: $host"puts $FD "Connection: close"puts $FD ""while { ![eof $FD] &amp;&amp; ![string equal $buffer "&lt;!-- cstiger results --&gt;"] } { gets $FD buffer }gets $FD buffergets $FD bufferwhile { ![eof $FD] &amp;&amp; $results &lt; $maxresults &amp;&amp; ![string equal "&lt;/table&gt;" $buffer] &amp;&amp; ![string match "*no such $type online*" $buffer] } {regsub -all "&gt;" $buffer "\t" bufferregsub -all "&lt;/" $buffer "\t" bufferregsub -all "&lt;" $buffer "&lt;" bufferregsub -all "&gt;" $buffer "&gt;" bufferset line [split $buffer "\t"]set hostname [lindex $line $ihost]set ip [lindex $line $iip]set map [lindex $line $imap]set currmax [lindex $line $icurrmax]if { [string equal $type "player"] } {set name [lindex $line $iname]set sname "Name$delim $name"}set shostname "Hostname$delim $hostname"set sip "IP$delim $ip"set smap "Map$delim $map"set scurrmax "Players$delim $currmax"set outtxt "$sname  $shostname  $sip  $smap  $scurrmax"putserv "NOTICE $nick :$outtxt"incr resultsgets $FD buffer}if { $results == 1 } {set result "result"}putserv "NOTICE $nick :Search Results: (Found $results (of a maximum $maxresults $sytpe $result)putserv "NOTICE $nick :Powered by $host."close $FD} }putlog "game-server-query written/modified by brian -blaze947- kelly"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5387">sir</a> — Mon Oct 04, 2004 7:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
