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

	<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-05-04T02:55:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[iggy]]></name></author>
		<updated>2010-05-04T02:55:12-04:00</updated>

		<published>2010-05-04T02:55:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93026#p93026</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93026#p93026"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93026#p93026"><![CDATA[
Hello. Thank you for the fix, but we're still not on the finish line :p<br><br>I think there may be an error in  <br><div class="codebox"><p>Code: </p><pre><code>set url "http://www.sherdog.com/fightfinder.php?[http::formatQuery firstname $first lastname $last nickname ""</code></pre></div> because that didn't work, but your older solution <div class="codebox"><p>Code: </p><pre><code>set url "http://www.sherdog.com/fightfinder.php?firstname=$first&amp;lastname=$last&amp;nickname=&amp;search=yes"</code></pre></div> seemed to partially work. Ideas? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>Also, I'm wondering. There are three possible outcomes from a search; direct hit, multiple hits and no hits. Is it possible to separate these three possibilities? You've already separated direct hit.<br><br>If your search returns multiple hits, this is the message: We found 2 Fighter(s) matching your search criteria.<br><br>If the search return blank, this is the message: Sorry, your search came up with zero records.<br><br>Could this be included in the script, so that the bot will output whether there were zero or multiple hits?<br><br>Thanks for all your help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11191">iggy</a> — Tue May 04, 2010 2:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iggy]]></name></author>
		<updated>2010-05-03T11:23:53-04:00</updated>

		<published>2010-05-03T11:23:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93025#p93025</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93025#p93025"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93025#p93025"><![CDATA[
This just keeps getting better. But there seems to be an error in your script speechles <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">.<br><br>It doesnt seem to find the location of the url, so the only output is: Nothing found for \"$first $last\<br><br>Ideas? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks a bunch, this is perfect, all we need to do is make it workable <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11191">iggy</a> — Mon May 03, 2010 11:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-05-03T17:26:57-04:00</updated>

		<published>2010-05-02T18:22:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93015#p93015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93015#p93015"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93015#p93015"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>package require httpbind pub - !fighter fightproc fight {nick uhost hand chan arg} {if {[llength [set s [split $arg]]] != 2} {putserv "PRIVMSG $chan :\[Syntax\] !fighter &lt;first-name&gt; &lt;last-name&gt;"return 1}set first  [lindex $s 0]set last [lindex $s 1]set url "http://www.sherdog.com/fightfinder.php?[http::formatQuery firstname $first lastname $last nickname "" search yes]catch {set http [::http::geturl "$url" -timeout 5000]} errorif {![string match -nocase "::http::*" $error]} {putserv "privmsg $chan :[string totitle [string map {"\n" " | "} $error]] ( $url )"return 1}if {![string equal -nocase [::http::status $http] "ok"]} {putserv "privmsg $chan :[string totitle [::http::status $http]] ( $url )"http::cleanup $httpreturn 1}upvar #0 $http stateforeach {name value} $state(meta) {if {[regexp -nocase ^location$ $name]} {set newurl $value}}if {[string match "30*" [::http::ncode $http]] || [info exists newurl]} {putserv "privmsg $chan :$newurl"} else {putserv "privmsg $chan :Nothing found for \"$first $last\""}http::cleanup $http}</code></pre></div>edit: Using an array would've been nice, but it's not case insensitive, it has no -nocase. Hence the foreach looping through checking against a regular expression in it's place. This should work as expected.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun May 02, 2010 6:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iggy]]></name></author>
		<updated>2010-05-02T17:09:36-04:00</updated>

		<published>2010-05-02T17:09:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93012#p93012</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93012#p93012"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93012#p93012"><![CDATA[
Ohh, such beauty! That's how easy it can be done. Thank you very, very much! -- you're the best <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>Are you willing to also give any hints on how I can output the redirected URL too? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>Thanks again, much apreciated!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11191">iggy</a> — Sun May 02, 2010 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-04-30T15:00:34-04:00</updated>

		<published>2010-04-30T15:00:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92986#p92986</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92986#p92986"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92986#p92986"><![CDATA[
something for you to work on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code># Rls: Fighter.tcl v1.0# Date: 30/04/10# Coded by: doggo# Contact: #a.b.inner-sanctum@EFNET###################################bind pub - !fighter fightproc fight {nick uhost hand chan arg} {    set first  [lindex $arg 0]set last [lindex $arg 1 end]if { $last == "" } {putserv "PRIVMSG $chan :\[Syntax\] !fighter \&lt;FIRST NAME\&gt; \&lt;LASTNAME\&gt;"return}putserv "PRIVMSG $chan :http://www.sherdog.com/fightfinder.php?firstname=$first&amp;lastname=$last&amp;nickname=&amp;search=yes"}putlog "fighter #alt.binaries.inner-sanctum"</code></pre></div>tested and working, but ill let you figure out how to get the redirected address to display in channel <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>[07:51pm] &lt;dogga&gt; !fighter joachim[07:51pm] &lt;tsara&gt; [Syntax] !fighter &lt;FIRST NAME&gt; &lt;LASTNAME&gt;[07:52pm] &lt;dogga&gt; !fighter joachim hansen[07:52pm] &lt;tsara&gt; http://www.sherdog.com/fightfinder.php?firstname=joachim&amp;lastname=hansen&amp;nickname=&amp;search=yes</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Fri Apr 30, 2010 3:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iggy]]></name></author>
		<updated>2010-04-27T18:17:28-04:00</updated>

		<published>2010-04-27T18:17:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92947#p92947</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92947#p92947"/>
		<title type="html"><![CDATA[Url output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92947#p92947"><![CDATA[
I'm looking for a script that does the following. You type !fighter joachim hansen and the script will go to <a href="http://www.sherdog.com/stats/" class="postlink">http://www.sherdog.com/stats/</a> and insert joachim in the field firstname and hansen in the field lastname and then output the resulting URL.<br><br>I'm not sure if this of any help, but this url will redirect to the URL I want to output on irc <a href="http://www.sherdog.com/fightfinder.php?firstname=joachim&amp;lastname=hansen&amp;nickname=&amp;search=yes" class="postlink">http://www.sherdog.com/fightfinder.php? ... search=yes</a><br><br>The output I want is this <a href="http://www.sherdog.com/fighter/Joachim-Hansen-3177" class="postlink">http://www.sherdog.com/fighter/Joachim-Hansen-3177</a><br><br>Is this a tricky script to do? Can somebody do it? or can someone point me to similar looking scripts(I've been looking myself for the past hours) which I can work on?<br><br>Hoping for the best, Thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11191">iggy</a> — Tue Apr 27, 2010 6:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
