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

	<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>2007-04-28T14:16:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2007-04-28T14:16:30-04:00</updated>

		<published>2007-04-28T14:16:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72333#p72333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72333#p72333"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72333#p72333"><![CDATA[
<blockquote class="uncited"><div>It would seem that you are using a msg-binding, rather than a pub-binding.<blockquote class="uncited"><div>    (1)  MSG<br>         bind msg &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;text&gt;<br><br>         Description: used for /msg commands. The first word of the user's<br>           msg is the command, and everything else becomes the text argument.<br>         Module: server<br>...<br>    (4)  PUB<br>         bind pub &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;text&gt;<br><br>         Description: used for commands given on a channel. The first word<br>           becomes the command and everything else is the text argument.<br>         Module: irc</div></blockquote>As you can see, there is no channel argument for msg-bindings (as it is not related to any channel). It would seem you intended to use a pub-binding but accidentally used the msg-binding?</div></blockquote>Works like a charm, thank you very much! You've been very helpful <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=8949">dokueki</a> — Sat Apr 28, 2007 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-28T12:29:13-04:00</updated>

		<published>2007-04-28T12:29:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72331#p72331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72331#p72331"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72331#p72331"><![CDATA[
It would seem that you are using a msg-binding, rather than a pub-binding.<blockquote class="uncited"><div>    (1)  MSG<br>         bind msg &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;text&gt;<br><br>         Description: used for /msg commands. The first word of the user's<br>           msg is the command, and everything else becomes the text argument.<br>         Module: server<br>...<br>    (4)  PUB<br>         bind pub &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;text&gt;<br><br>         Description: used for commands given on a channel. The first word<br>           becomes the command and everything else is the text argument.<br>         Module: irc</div></blockquote>As you can see, there is no channel argument for msg-bindings (as it is not related to any channel). It would seem you intended to use a pub-binding but accidentally used the msg-binding?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Apr 28, 2007 12:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2007-04-28T09:48:37-04:00</updated>

		<published>2007-04-28T09:48:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72327#p72327</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72327#p72327"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72327#p72327"><![CDATA[
Damn, It's still not working &gt;_&lt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sat Apr 28, 2007 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-28T09:18:51-04:00</updated>

		<published>2007-04-28T09:18:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72325#p72325</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72325#p72325"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72325#p72325"><![CDATA[
Oops, missed the second error...<br>tcl is newline-terminated, so this wont work:<div class="codebox"><p>Code: </p><pre><code>if {..} {...}else {...}</code></pre></div> However, this will:<div class="codebox"><p>Code: </p><pre><code>if {...} {...} else {...}</code></pre></div>Simply put, "else" is not a command, but a parameter to "if".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Apr 28, 2007 9:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2007-04-28T09:02:26-04:00</updated>

		<published>2007-04-28T09:02:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72323#p72323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72323#p72323"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72323#p72323"><![CDATA[
<blockquote class="uncited"><div>You are using localspace variables when you're actually trying to access globalspace variables within your msg:gen_url proc.<br><br>change $quicklink(url) to $::quicklink(url).<br><br>Secondly, try to avoid using "args" as a parameter for your proc, as it a "magic" name, allowing it to take 1 or more arguments (each placed as a list item within $args). Saves you the trouble of using [lindex $args 0] just to get the parameter in the first place</div></blockquote>Thanks for your help! I updated the script as so:<div class="codebox"><p>Code: </p><pre><code>#=========================================================================== # ** Quick Links 1.0 by Hen Asraf (C)2007 #=========================================================================== #    * Description: #--------------------------------------------------------------------------- #       * Allows quick link command to show a link with a keyword #          Example: #             !wikipedia Main_Page #                will output: #             http://en.wikipedia.org/wiki/Main_Page (Requested by Nickname) #--------------------------------------------------------------------------- #    * Future Plans: #--------------------------------------------------------------------------- #       * Multiple quicklinks drawn from a text file #       * Managable from chatroom/PM/DCC #=========================================================================== # Set version number for the script set quicklink(version) "1.0"# Command used to call the script. Default is "!command".set quicklink(cmd) "!xpro"# Quick link URL. Put two links in here: #    1. Base URL (Example: http://www.domain.com) w/o following slash. #       This will be echoed when only the shortcut is entered, with no #       arguments. #    2. Scripts relative URL (Example: index.php?) w/o slash before it. #       This will be echoed along with the URL before it and arguments #       after it. # Seperate the arguments with a vertical line (" | ") set quicklink(url) "http://xpro.zeeblo.com|index.php?" # Split the arguments set quicklink(url) [split $quicklink(url) |] # Bindings bind msg - $quicklink(cmd) msg:gen_url # Generate URLs proc msg:gen_url { nick host hand chan action } {    if {$action == ""} {       putserv "PRIVMSG $chan :[lindex $::quicklink(url) 0] (Requested by $nick)"    }    else {       putserv "PRIVMSG $chan :[lindex $::quicklink(url) 0]/[lindex $::quicklink(url) 1]$action (Requested by $nick)"   }    return 0 } putlog "Quick Links $quicklink(version) by Hen Asraf Loaded"</code></pre></div>But it's still not working. I'd appreciate it very much if you would continue helping.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sat Apr 28, 2007 9:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-28T08:55:48-04:00</updated>

		<published>2007-04-28T08:55:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72322#p72322</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72322#p72322"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72322#p72322"><![CDATA[
You are using localspace variables when you're actually trying to access globalspace variables within your msg:gen_url proc.<br><br>change $quicklink(url) to $::quicklink(url).<br><br>Secondly, try to avoid using "args" as a parameter for your proc, as it a "magic" name, allowing it to take 1 or more arguments (each placed as a list item within $args). Saves you the trouble of using [lindex $args 0] just to get the parameter in the first place<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Apr 28, 2007 8:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2007-04-28T08:48:57-04:00</updated>

		<published>2007-04-28T08:48:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72318#p72318</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72318#p72318"/>
		<title type="html"><![CDATA[URL Quick Linking Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72318#p72318"><![CDATA[
Hey everyone. I'm pretty new to TCL scripting, and I could use some help  <br>I'm making a script that will respond to a user saying !xpro [args] and will show text accordingly. The script is right here (including better description of everything):<div class="codebox"><p>Code: </p><pre><code>#=========================================================================== # ** Quick Links 1.0 by Hen Asraf (C)2007 #=========================================================================== #    * Description: #--------------------------------------------------------------------------- #       * Allows quick link command to show a link with a keyword #          Example: #             !wikipedia Main_Page #                will output: #             http://en.wikipedia.org/wiki/Main_Page (Requested by Nickname) #--------------------------------------------------------------------------- #    * Future Plans: #--------------------------------------------------------------------------- #       * Multiple quicklinks drawn from a text file #       * Managable from chatroom/PM/DCC #=========================================================================== # Set version number for the script set quicklink(version) "1.0"# Command used to call the script. Default is "!command".set quicklink(cmd) "!xpro" # Quick link URL. Put two links in here: #    1. Base URL (Example: http://www.domain.com) w/o following slash. #       This will be echoed when only the shortcut is entered, with no #       arguments. #    2. Scripts relative URL (Example: index.php?) w/o slash before it. #       This will be echoed along with the URL before it and arguments #       after it. # Seperate the arguments with a vertical line (" | ") set quicklink(url) "http://xpro.zeeblo.com|index.php?" # Split the arguments set quicklink(url) [split $quicklink(url) |] # Bindings bind msg - $quicklink(cmd) msg:gen_url # Generate URLs proc msg:gen_url { nick host hand chan args } {    if {[lindex $args 0] == ""} {       putserv "PRIVMSG $chan :[lindex $quicklink(url) 0] (Requested by $nick)"    }    else {       putserv "PRIVMSG $chan :[lindex $quicklink(url) 0]/[lindex $quicklink(url) 1][lindex $args 0] (Requested by $nick)"    }    return 0 } putlog "Quick Links $quicklink(version) by Hen Asraf Loaded"</code></pre></div>Thing is, I say !xpro or for example !xpro topic=36 and nothing happens. <br>Anyone got any idea? Thanks in advance!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sat Apr 28, 2007 8:48 am</p><hr />
]]></content>
	</entry>
	</feed>
