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

	<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>2010-04-10T17:09:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-04-10T17:09:46-04:00</updated>

		<published>2010-04-10T17:09:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92792#p92792</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92792#p92792"/>
		<title type="html"><![CDATA[Re: IF / ELSEIF Help??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92792#p92792"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !site website_dispproc website_disp {nick host handle channel testes} {   switch -- $channel {      "#techhelpwithjeff" { putserv "PRIVMSG $channel :$nick, our website is http://www.techhelpwithjeff.com/" }       "#sams-tech" { putserv "PRIVMSG $channel :$nick, our website is http://www.smartysamscomputerbuilds.com/" }      "#thenerdtv" { putserv "PRIVMSG $channel :$nick, our website is http://www.thenerdtv.com/" }      default { putserv "PRIVMSG $channel :$nick, I do not have a site defined for this channel yet" }   }   return 1}</code></pre></div>[switch] makes sense here, as those nested if/elseif/elseif/etc look horrible. You also want to make sure to return 1 from this "pub" procedure. If this were a glob matched "pubm" bind instead, a return of 0 would be used.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Apr 10, 2010 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CharlesZink]]></name></author>
		<updated>2010-04-10T16:26:53-04:00</updated>

		<published>2010-04-10T16:26:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92791#p92791</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92791#p92791"/>
		<title type="html"><![CDATA[IF / ELSEIF Help??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92791#p92791"><![CDATA[
Hi, this is what I have gotten so far and it doesn't say anything in chat, but I do get this error message in Telnet..<br> <blockquote class="uncited"><div>[20:22] Tcl error [website_disp]: syntax error in expression "$channel == #techhelpwithjeff": character not legal in expressions</div></blockquote>So I guess the '#' is the problem, but how do I tell it what channel then?<br><br><div class="codebox"><p>Code: </p><pre><code>bind pub - !site website_dispproc website_disp {nick host handle channel testes  } {if {$channel == #techhelpwithjeff} {putserv "PRIVMSG $channel :$nick, our website is http://www.techhelpwithjeff.com/"} elseif {$channel == #sams-tech} {putserv "PRIVMSG $channel :$nick, our website is http://www.smartysamscomputerbuilds.com/"} elseif {$chanel == #thenerdtv} { putserv "PRIVMSG $channel :$nick, our website is http://www.thenerdtv.com/"} else { putserv  "PRIVMSG $channel :$nick, I do not have a site defined for this channel yet"}return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11123">CharlesZink</a> — Sat Apr 10, 2010 4:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
