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

	<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>2015-02-10T03:06:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ezekiel]]></name></author>
		<updated>2015-02-10T03:06:25-04:00</updated>

		<published>2015-02-10T03:06:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103472#p103472</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103472#p103472"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103472#p103472"><![CDATA[
Yeah, i think i did it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thank you.<br><div class="codebox"><p>Code: </p><pre><code>bind msg - request vhostproc vhost { nick uhost handle text} {global botnickif {[scan $text {%s%s} vhost password] != 2} {puthelp "PRIVMSG $nick :Syntax: request &lt;your.vhost.here&gt; &lt;pass&gt;"} else {puthelp "PRIVMSG Florian :add $nick *!*@$uhost *!*@$vhost $password"puthelp "PRIVMSG $nick :Your Vhost has been changed to: $vhost. Have fun!"}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12473">Ezekiel</a> — Tue Feb 10, 2015 3:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-02-10T01:43:19-04:00</updated>

		<published>2015-02-10T01:43:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103471#p103471</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103471#p103471"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103471#p103471"><![CDATA[
Easy, replace $channel with $nick on the lines you wish to have the message be sent to the person triggering the command, not to the channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 10, 2015 1:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ezekiel]]></name></author>
		<updated>2015-02-09T15:42:04-04:00</updated>

		<published>2015-02-09T15:42:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103467#p103467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103467#p103467"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103467#p103467"><![CDATA[
and for private message? <div class="codebox"><p>Code: </p><pre><code>bind msg - !vhost vhost proc:msg vhost { nick uhost handle channel text} {    if {[scan $text {%s%s} vhost password] != 2} {       puthelp "PRIVMSG $channel :$nick: To change your host type: !vhost &lt;your.vhost&gt; &lt;pass&gt;"    } else {       puthelp "PRIVMSG H :add $nick $uhost $vhost $password"       puthelp "PRIVMSG $channel :$nick: Your Vhost has been changed to: $vhost"    } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12473">Ezekiel</a> — Mon Feb 09, 2015 3:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2014-12-25T04:24:25-04:00</updated>

		<published>2014-12-25T04:24:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103399#p103399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103399#p103399"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103399#p103399"><![CDATA[
@speechles : Awww.. yeah, missed that. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Thanks buddy. No grudge at all. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Merry Christmas everyone! <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=187">caesar</a> — Thu Dec 25, 2014 4:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ezekiel]]></name></author>
		<updated>2014-12-25T03:18:45-04:00</updated>

		<published>2014-12-25T03:18:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103398#p103398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103398#p103398"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103398#p103398"><![CDATA[
Yes, it's $vhost indeed <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br>I just tested it and it's working great with that change, thanks a lot caesar and speechles too. <br>Merry XMas and a Happy New Year full of achievements and opportunities!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12473">Ezekiel</a> — Thu Dec 25, 2014 3:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2014-12-24T16:52:56-04:00</updated>

		<published>2014-12-24T16:52:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103393#p103393</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103393#p103393"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103393#p103393"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>puthelp "PRIVMSG H :add $nick $uhost $text $password"</code></pre></div></div></blockquote>Shouldn't $text be $vhost ?<br><br>caesar, I admire the time you take with new people. Even the time you took on this post too. The explanations and such are something not enough people are doing. This helps spread the joy of eggdrop to all. I am not knocking you at all. Please don't see it that way. Merry Christmas and hopefully Santa brings you good tidings. Even if he doesn't, your good cheer is well noticed. <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=8138">speechles</a> — Wed Dec 24, 2014 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2014-12-25T04:25:16-04:00</updated>

		<published>2014-12-24T10:52:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103392#p103392</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103392#p103392"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103392#p103392"><![CDATA[
The pub bind accepts only 5 arguments: <em class="text-italics">nick</em>, <em class="text-italics">user@host</em>, <em class="text-italics">handle</em>, <em class="text-italics">channel</em>, and <em class="text-italics">text</em>.<br><br>You need to check the text for a vhost and password. You could do this by either splitting the $text variable with <a href="http://www.tcl.tk/man/tcl8.6/TclCmd/split.htm" class="postlink">split</a> then <a href="http://www.tcl.tk/man/tcl8.6/TclCmd/lindex.htm" class="postlink">lindex</a> to or by using <a href="http://www.tcl.tk/man/tcl8.6/TclCmd/scan.htm" class="postlink">scan</a>. I prefer the second option.<br><br>Anyway, the two methods are:<div class="codebox"><p>Code: </p><pre><code>set text [split $text]if {[llength $text] != 2} {putserv "PRIVMSG $channel :$nick: To change your host type: !vhost &lt;your.vhost&gt; &lt;pass&gt;"} else {set vhost [lindex $text 0]set password [lindex $text 1]# use $vhost and $password to do whatever}</code></pre></div>and the one I prefer that's a little less messy:<div class="codebox"><p>Code: </p><pre><code>if {[scan $text {%s%s} vhost password] != 2} {putserv "PRIVMSG $channel :$nick: To change your host type: !vhost &lt;your.vhost&gt; &lt;pass&gt;"}# use $vhost and $password to do whatever</code></pre></div>Now, with the above in mind your proc is changed like this:<div class="codebox"><p>Code: </p><pre><code>bind pub - !vhost vhostproc vhost { nick uhost handle channel text} {if {[scan $text {%s%s} vhost password] != 2} {puthelp "PRIVMSG $channel :$nick: To change your host type: !vhost &lt;your.vhost&gt; &lt;pass&gt;"} else {puthelp "PRIVMSG H :add $nick $uhost $vhost $password"puthelp "PRIVMSG $channel :$nick: Your Vhost has been changed to: $vhost"}}</code></pre></div>Edit: Typo fix. <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=187">caesar</a> — Wed Dec 24, 2014 10:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ezekiel]]></name></author>
		<updated>2014-12-24T05:40:07-04:00</updated>

		<published>2014-12-24T05:40:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103391#p103391</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103391#p103391"/>
		<title type="html"><![CDATA[a little help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103391#p103391"><![CDATA[
I am new and I need a little help to understand something. <br>I have an eggdrop who is logged as iRcop and I want to use this public command to let users set their own vhosts.<br><br>Tcl error [vhost]: wrong # args: should be "vhost nick uhost handle channel arg pass"<div class="codebox"><p>Code: </p><pre><code>bind pub - !vhost vhostproc vhost { nick uhost handle channel arg pass } {if {[llength $pass]==0} {   putserv "PRIVMSG $channel :$nick: To change your host type: !vhost &lt;your.vhost&gt; &lt;pass&gt;"     } else {   putquick "PRIVMSG H :add $nick $uhost $arg $pass"   putserv "PRIVMSG $channel :$nick: Your Vhost has been changed to: $arg"   } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12473">Ezekiel</a> — Wed Dec 24, 2014 5:40 am</p><hr />
]]></content>
	</entry>
	</feed>
