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

	<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>2008-05-07T14:42:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2008-05-07T14:42:09-04:00</updated>

		<published>2008-05-07T14:42:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82784#p82784</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82784#p82784"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82784#p82784"><![CDATA[
<blockquote class="uncited"><div>Papillon:<br>That code is unfortunately flawed, as the list you search using lsearch contains one single item, being the full content of ::123owner. Were you thinking of using split perhaps?<br><br>=====<br>I would advocate the use of user-records and flags, and replace the test with something like this:<div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand 9|9 $chan]} {...</code></pre></div>In this case, the binding would be similar to that one posted by DragnLord, except the flag would be - instead of 9.</div></blockquote>Not for anything dangerous/excutable so I am just doing this without flags <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=7220">cache</a> — Wed May 07, 2008 2:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2008-05-07T14:10:58-04:00</updated>

		<published>2008-05-07T14:10:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82783#p82783</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82783#p82783"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82783#p82783"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set 123activatecmd "!test"bind pub 9 $123activatecmd proc_thisatestproc proc_thisatest {nick uhost hand chan text} {        putquick "PRIVMSG $chan :xx blah"} </code></pre></div></div></blockquote>Thanks for the input, im trying to do this without having to setup a flag in the bot, so I see I left off pub -|- somewhere<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Wed May 07, 2008 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2008-05-07T13:34:47-04:00</updated>

		<published>2008-05-07T13:34:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82781#p82781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82781#p82781"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82781#p82781"><![CDATA[
it's 3-4 years since the last time i touched anything with tcl so I'm abit "rusty"...  yes, I was thinking about split, thought I'd added it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>as said in the last post, I recommend using user-flags instead of nick-matching along with nml375 and DragnLord<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed May 07, 2008 1:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-05-07T13:27:35-04:00</updated>

		<published>2008-05-07T13:27:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82779#p82779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82779#p82779"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82779#p82779"><![CDATA[
Papillon:<br>That code is unfortunately flawed, as the list you search using lsearch contains one single item, being the full content of ::123owner. Were you thinking of using split perhaps?<br><br>=====<br>I would advocate the use of user-records and flags, and replace the test with something like this:<div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand 9|9 $chan]} {...</code></pre></div>In this case, the binding would be similar to that one posted by DragnLord, except the flag would be - instead of 9.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed May 07, 2008 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2008-05-07T12:15:27-04:00</updated>

		<published>2008-05-07T12:15:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82775#p82775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82775#p82775"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82775#p82775"><![CDATA[
...unless he/she want to showoff by doing the command and have everyone else try it aswell <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> ..and then you have to tell them that they cannot offcourse<div class="codebox"><p>Code: </p><pre><code>set 123owner "cache nick2" set 123activatecmd "!test" bind pub - $123activatecmd proc_thisatest proc proc_thisatest {nick uhost hand chan text} { if {[lsearch [list $::123owner] $nick ] != -1} { putquick "PRIVMSG $chan :xx blah" } else { set niceoutputthingie [join [split $::132owner] " and "]putquick "NOTICE $nick :Only $niceoutputthingie can use this command." } }</code></pre></div>would not recommend this method though, atleast to execute any "dangerous" commands, anyone stealing your nick would be able to execute it..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed May 07, 2008 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2008-05-07T11:37:32-04:00</updated>

		<published>2008-05-07T11:37:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82774#p82774</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82774#p82774"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82774#p82774"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set 123activatecmd "!test"bind pub 9 $123activatecmd proc_thisatestproc proc_thisatest {nick uhost hand chan text} {        putquick "PRIVMSG $chan :xx blah"} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed May 07, 2008 11:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2008-05-07T11:31:25-04:00</updated>

		<published>2008-05-07T11:31:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82773#p82773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82773#p82773"/>
		<title type="html"><![CDATA[Re: Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82773#p82773"><![CDATA[
<blockquote class="uncited"><div>am trying to make a command only work by my nickname<br><br>I did this but no results or errors<br><div class="codebox"><p>Code: </p><pre><code>set 123owner "cache"set 123activatecmd "!test"proc proc_thisatest {nick uhost hand cmd} {    if {[string tolower $command] == [string tolower $123activatecmd]} {       if {[string tolower $nick] == [string tolower $123owner]} {        putquick "PRIVMSG $chan :xx blah"        } else {        putquick "NOTICE $nick :Only $132owner can use this command."      }}}</code></pre></div>Does anyone have one I can edit? I do want to make one that can work by 2 nicks.<br><br>Thanks</div></blockquote>This is why eggdrop has user flags. <br>Set the user flag "9" [example: .chattr cache 9] to who you want to be able to use the command and set that also in the bind.<div class="codebox"><p>Code: </p><pre><code>bind msg 9 $123activatecmd proc_thisatest</code></pre></div>The bind has to come after the sets.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed May 07, 2008 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2008-05-07T07:10:49-04:00</updated>

		<published>2008-05-07T07:10:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82769#p82769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82769#p82769"/>
		<title type="html"><![CDATA[Command - only function by my nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82769#p82769"><![CDATA[
am trying to make a command only work by my nickname<br><br>I did this but no results or errors<br><div class="codebox"><p>Code: </p><pre><code>set 123owner "cache"set 123activatecmd "!test"proc proc_thisatest {nick uhost hand cmd} {    if {[string tolower $command] == [string tolower $123activatecmd]} {       if {[string tolower $nick] == [string tolower $123owner]} {        putquick "PRIVMSG $chan :xx blah"        } else {        putquick "NOTICE $nick :Only $132owner can use this command."      }}}</code></pre></div>Does anyone have one I can edit? I do want to make one that can work by 2 nicks.<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Wed May 07, 2008 7:10 am</p><hr />
]]></content>
	</entry>
	</feed>
