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

	<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>2014-07-31T06:46:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2014-07-31T06:46:13-04:00</updated>

		<published>2014-07-31T06:46:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103097#p103097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103097#p103097"/>
		<title type="html"><![CDATA[$arg is not being returned?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103097#p103097"><![CDATA[
There's no difference in the placement of the return with this "simple" procedure, but there is a condition in it. So it's better to have the return exactly when needed.<br><br>And I agree with the inline comment from heartbroken : use a nocase comparison for channel name, because if you do:<div class="codebox"><p>Code: </p><pre><code># In party-line.+chan #DaIgO# In tclset givechan "#daigo"</code></pre></div>The eggdrop will see that the channel is #DaIgO, doesn't equal #daigo.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jul 31, 2014 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daigo]]></name></author>
		<updated>2014-07-26T02:49:26-04:00</updated>

		<published>2014-07-26T02:49:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103053#p103053</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103053#p103053"/>
		<title type="html"><![CDATA[$arg is not being returned?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103053#p103053"><![CDATA[
For the last 3 lines, what is the difference between:<br><div class="codebox"><p>Code: </p><pre><code>       return 0      }  } </code></pre></div>and<br><div class="codebox"><p>Code: </p><pre><code>      }  return 0  } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12410">daigo</a> — Sat Jul 26, 2014 2:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2014-07-26T02:02:43-04:00</updated>

		<published>2014-07-26T02:02:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103052#p103052</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103052#p103052"/>
		<title type="html"><![CDATA[$arg is not being returned?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103052#p103052"><![CDATA[
you need bind pub instead of pubm there...<br>and you already have "global" line for "givechan" in give proc..<br>you have to choose one of :<br><br>global givechan <br>.. $givechan  <br><br>or remove "global" line and just use :<br><br> .. $::givechan <br><div class="codebox"><p>Code: </p><pre><code> set givechan "#daigo" bind pub - !give pub_give proc pub_give {nick host hand chan arg} {     # this one is "case sensitive"     if {$chan eq $::givechan} {        # you can use string match -nocase or string equal -nocase   # if {[string match -nocase $::givechan $chan]} {     # if {[string equal -nocase $::givechan $chan]} {   # or add a line outside of the proc , an user defined channel flag     # setudef flag something    # and add a line just under the proc line to check this channel flag    #  activated or not    # if {[channel get $chan something]} {   # and no need to set givechan "..."    # do : .chanset #your-channel +something    # voilà  if you would go this way ,don't forget to replace all    # $::givechan vars to $chan in proc too...     # !cmd first Word to last Word. it takes whole line.       set given [join [lrange [split $arg] 0 end]]       # if you want to post !cmd first-word :      # set given [lindex [split $arg] 0]      #  or if you want to post !cmd three-words :      # set given [join [lrange [split $arg] 0 2]]       puthelp "PRIVMSG $::givechan :Here is $given for you"       return 0      }   }  </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Sat Jul 26, 2014 2:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daigo]]></name></author>
		<updated>2014-07-26T01:08:11-04:00</updated>

		<published>2014-07-26T01:08:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103051#p103051</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103051#p103051"/>
		<title type="html"><![CDATA[$arg is not being returned?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103051#p103051"><![CDATA[
Here is my script:<br><div class="codebox"><p>Code: </p><pre><code>bind pubm - !give giveset givechan "#daigo"proc give {nick host hand chan arg} {  global givechan  if {$chan eq $::givechan} {  puthelp "PRIVMSG $givechan :Here is $arg for you"  }  return 0}</code></pre></div>But when I do something like: !give milk and cookies<br>In the channel, but the bot doesn't return anything, not even an error. But if I make the bind pubm as * (bind pubm - * give) then it does work. How come?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12410">daigo</a> — Sat Jul 26, 2014 1:08 am</p><hr />
]]></content>
	</entry>
	</feed>
