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

	<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-07-09T11:39:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-07-09T11:39:34-04:00</updated>

		<published>2003-07-09T11:39:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23228#p23228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23228#p23228"/>
		<title type="html"><![CDATA[&quot;channel add&quot; from TCL script having problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23228#p23228"><![CDATA[
The reason I wanted it to check the channels is because if the channel does not exist, the script throws out TCL errors.  Rather than coding the script to be silent for those errors (giving a false sense of security), I set it up to check for the channel in the database and add it if it doesn't exist.<br><br>The "bind load - * chan_setup" command worked fine.<br><br>The ".chansave" command didn't seem to help, but I did a ".restart" once the channel was added, and I've had no problems since then.  Must be another thing wrong with the ".rehash" command for the eggdrop.<br><br>At least I have a workaround for now.<p>Statistics: Posted by Guest — Wed Jul 09, 2003 11:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-07-09T03:09:43-04:00</updated>

		<published>2003-07-09T03:09:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23217#p23217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23217#p23217"/>
		<title type="html"><![CDATA[Re: &quot;channel add&quot; from TCL script having problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23217#p23217"><![CDATA[
<blockquote class="uncited"><div>I defined one channel (#listen) in the config file (hard coded).  The other channel (#invite) was dynamically defined.  It seems that every time I .rehash, the dynamically configured channel gets created/erased.  If the channel existed, it gets erased.  If it didn't exist, it gets created.</div></blockquote>There is nothing in the code that will make your channel be erased.... so I suggest you type <span style="text-decoration:underline">.chansave</span> after you add the dynamic channel <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br><em class="text-italics">bind load - * chan_setup</em>  Wouldn't hurt to try.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> I've never really used the load bind, so I don't know what the mask is... my guess would be the name of the module beeing loaded<br>Why you want to check channels when loading a module anyway??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Jul 09, 2003 3:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-07-09T02:42:32-04:00</updated>

		<published>2003-07-09T02:42:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23213#p23213</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23213#p23213"/>
		<title type="html"><![CDATA[&quot;channel add&quot; from TCL script having problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23213#p23213"><![CDATA[
Kinda strange thing here.<br><br>Eggdrop 1.6.13 running on FreeBSD 5.1 Current server.<br><br>I coded a small TCL to check and see if the eggdrop is on 2 particular channels.  If the eggdrop does not have the channel in it's database, it performs a "channel add" command and adds the channel.  If the eggdrop does have the channel in the database, it just ignores the script.<br><br>I defined one channel (#listen) in the config file (hard coded).  The other channel (#invite) was dynamically defined.  It seems that every time I .rehash, the dynamically configured channel gets created/erased.  If the channel existed, it gets erased.  If it didn't exist, it gets created.<br><br>Is there something here that I'm missing?<br><br>Also, I'm looking to have this proc (chan_setup) run at load.  I understand that I'll need to use the "bind load &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;", but I don't know what the mask should be.  I was gonna use "bind load - * chan_setup", but I'm not sure if that is correct.  Any help here would be appreciated.<br><div class="codebox"><p>Code: </p><pre><code>set chan_listen "#listen"set chan_invite "#invite"bind evnt - rehash chan_setupproc chan_setup {chan} {  global chan_listen chan_invite  if (![validchan $chan_invite]) {     putlog "Created channel record for $chan_invite"     channel add $chan_invite {chanmode "+nt"}  }  if (![validchan $chan_listen]) {     putlog "Created channel record for $chan_listen"     channel add $chan_listen {chanmode "+nt"}  }}</code></pre></div><p>Statistics: Posted by Guest — Wed Jul 09, 2003 2:42 am</p><hr />
]]></content>
	</entry>
	</feed>
