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

	<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>2003-08-12T14:44:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T14:44:30-04:00</updated>

		<published>2003-08-12T14:44:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24785#p24785</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24785#p24785"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24785#p24785"><![CDATA[
lol, yeah... but I was thinking this time, which made me forget it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <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=3085">Sir_Fz</a> — Tue Aug 12, 2003 2:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-12T14:03:27-04:00</updated>

		<published>2003-08-12T14:03:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24783#p24783</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24783#p24783"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24783#p24783"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} var]} {   puthelp "PRIVMSG $nick :$var - use prefix: \002#\002"  } else {   puthelp "PRIVMSG $nick :Succesfully joined $chan" }</code></pre></div></div></blockquote>Properly indenting the code would probably make you add another "}" without even thinking about it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 12, 2003 2:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T13:52:28-04:00</updated>

		<published>2003-08-12T13:52:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24781#p24781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24781#p24781"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24781#p24781"><![CDATA[
ok so this should do it:<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} var]} {   puthelp "PRIVMSG $nick :$var - use prefix: \002#\002"  } else {   puthelp "PRIVMSG $nick :Succesfully joined $chan" }</code></pre></div>thanx <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=3085">Sir_Fz</a> — Tue Aug 12, 2003 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-12T13:27:52-04:00</updated>

		<published>2003-08-12T13:27:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24777#p24777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24777#p24777"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24777#p24777"><![CDATA[
<blockquote class="uncited"><div>so this code is correct?<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} var]} {   puthelp "PRIVMSG $nick :$var - use prefix: \002#\002"  } else {   channel add $chan  puthelp "PRIVMSG $nick :Succesfully join $chan"}</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} "*Invalid channel*"]} {   puthelp "PRIVMSG $nick :Invalid Channel - use prefix: \002#\002"  } else {   channel add $chan  puthelp "PRIVMSG $nick :Succesfully join $chan"}</code></pre></div>?</div></blockquote>The first one was closer, however on successful completion of the 'channel add' command from within the catch claus, you do not want to execute 'channel add' again.. Remove it from the 'else' branch, and it will be fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Tue Aug 12, 2003 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T12:34:59-04:00</updated>

		<published>2003-08-12T12:34:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24772#p24772</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24772#p24772"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24772#p24772"><![CDATA[
so this code is correct?<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} var]} {   puthelp "PRIVMSG $nick :$var - use prefix: \002#\002"  } else {   channel add $chan  puthelp "PRIVMSG $nick :Succesfully join $chan"}</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} { set chan [lindex [split $arg] 0] if {[catch {channel add $chan} "*Invalid channel*"]} {   puthelp "PRIVMSG $nick :Invalid Channel - use prefix: \002#\002"  } else {   channel add $chan  puthelp "PRIVMSG $nick :Succesfully join $chan"}</code></pre></div>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Aug 12, 2003 12:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-12T12:19:35-04:00</updated>

		<published>2003-08-12T12:19:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24771#p24771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24771#p24771"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24771#p24771"><![CDATA[
syntax: catch {command(s)} name_of_variable_holding_the_result<br><br>"invalidName" was just an example of a invalid channel name...you should  replace it with "$chan" or whatever holds your channel name.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 12, 2003 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T12:08:08-04:00</updated>

		<published>2003-08-12T12:08:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24769#p24769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24769#p24769"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24769#p24769"><![CDATA[
ok I got it, but i didn't understand "{channel add invalidName}"<br><br>how does it work ? like is there a list for these catches ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Aug 12, 2003 12:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-12T09:59:23-04:00</updated>

		<published>2003-08-12T09:59:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24767#p24767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24767#p24767"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24767#p24767"><![CDATA[
<blockquote class="uncited"><div>how to catch the channel add ?</div></blockquote><div class="codebox"><p>Code: </p><pre><code>if {[catch {channel add invalidName} var]} {  # an error occured, $var is the error message} else {  # everything went fine...var contains the value returned by the command}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 12, 2003 9:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T09:50:21-04:00</updated>

		<published>2003-08-12T09:50:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24766#p24766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24766#p24766"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24766#p24766"><![CDATA[
I know there are better ways, but I couldn't figure out how.<br><br>how to catch the channel add ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Aug 12, 2003 9:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-12T09:35:38-04:00</updated>

		<published>2003-08-12T09:35:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24765#p24765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24765#p24765"/>
		<title type="html"><![CDATA[Suggestion]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24765#p24765"><![CDATA[
'catch' the 'channel add' and display the error message instead of doing the  manual #* match. There are more prefixes than just "#", and coding it this way will leave the boring stuff to the eggdrop <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 12, 2003 9:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-12T09:26:54-04:00</updated>

		<published>2003-08-12T09:26:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24763#p24763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24763#p24763"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24763#p24763"><![CDATA[
no, I guess what he wants is a script that makes the bot join a new channel when a master msg it <strong class="text-strong">.join #channel</strong><br><br>so I think this should be it:<div class="codebox"><p>Code: </p><pre><code>bind msg m .join pub_join proc pub_join {nick uhost hand arg} {set chan [lindex [split $arg] 0] if {[string match $chan "#*"]} {  channel add $chan} else { puthelp "PRIVMSG $nick :$chan is invalid, it should have # infron of it"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Aug 12, 2003 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-12T08:38:12-04:00</updated>

		<published>2003-08-12T08:38:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24759#p24759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24759#p24759"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24759#p24759"><![CDATA[
whats that ? its not a msg on joine eh it seems ur verrifiying something is a channel ?<br><br>its a msg join script from i what i can tell <br><blockquote class="uncited"><div>To make the bot join a channel</div></blockquote><br>if you want an on join script<br><br>you should use <br><div class="codebox"><p>Code: </p><pre><code>bind join - * join:pubproc join:pub {nick uhost handle channel} { ...</code></pre></div>but why use ops .. cause an user is only op after joining the channel not on joining it .. beter use on mode or something so if he gets opped he gets the msg ..<br><br>or if thats not what you mean plz specify cause your being little unclear<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Aug 12, 2003 8:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[crazy-nic]]></name></author>
		<updated>2003-08-12T08:00:41-04:00</updated>

		<published>2003-08-12T08:00:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24757#p24757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24757#p24757"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24757#p24757"><![CDATA[
Why i cannot make it into on message then the command works?<br><br>i cant seem to make it work<br><br>bind msg m .join pub_join<br><br>proc pub_join {n u h c a} {<br> set chan [lindex $a 0]<br> if {![string match #* $chan]} {<br>  puthelp "privmsg $n :$n: Channel must have a # in front."<br>  return 0<br> }<br> channel add $chan<br> puthelp "privmsg $nick :Roger that! $nick."<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3435">crazy-nic</a> — Tue Aug 12, 2003 8:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-10T05:54:43-04:00</updated>

		<published>2003-08-10T05:54:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24636#p24636</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24636#p24636"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24636#p24636"><![CDATA[
true and not true that only counts for the last one :p cause with the other 2 ones you can set an different msg for ops and voiced users and first one you can also change the trigger so .. you should keep that in mind, but true for the last one its shorter<br><br>oh and tnx for pointing that out cause i was wondering what the syntax was for that <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=3151">Ofloo</a> — Sun Aug 10, 2003 5:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-10T05:25:01-04:00</updated>

		<published>2003-08-10T05:25:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24631#p24631</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24631#p24631"/>
		<title type="html"><![CDATA[some help needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24631#p24631"><![CDATA[
u can make it shorter like this:<div class="codebox"><p>Code: </p><pre><code>if {[isop $nick $chan] || [ishalfop $nick $chan ] || [isvoice $nick $chan] } { putserv....} else { putserv....}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Aug 10, 2003 5:25 am</p><hr />
]]></content>
	</entry>
	</feed>
