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

	<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>2005-06-01T04:45:31-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sikes]]></name></author>
		<updated>2005-06-01T04:45:31-04:00</updated>

		<published>2005-06-01T04:45:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50049#p50049</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50049#p50049"/>
		<title type="html"><![CDATA[Dump chanlist to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50049#p50049"><![CDATA[
<blockquote class="uncited"><div>You need to globalize my_nick and my_chan. Here try this:</div></blockquote>Thanks heaps Sir_Fz. You saved me a load of time. I wouldn't have got the syntax right without siiting down to properly learn TCL.<br><br>Appreciate all your help.<br><br>Sikes<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6297">Sikes</a> — Wed Jun 01, 2005 4:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-05-31T05:46:20-04:00</updated>

		<published>2005-05-31T05:46:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50015#p50015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50015#p50015"/>
		<title type="html"><![CDATA[Dump chanlist to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50015#p50015"><![CDATA[
You need to globalize my_nick and my_chan. Here try this:<div class="codebox"><p>Code: </p><pre><code># Get list of current online usernames set my_chan "#accounts" set my_nick "Sikes" # pub bindbind pub - !writelist pubm:write_chanlist # timer 3 minutestimer 3 [list write:these 1 $my_chan $my_nick]# procsproc pubm:write_chanlist {nick uhost hand chan arg} {  global my_chan my_nick  write:these 0 $my_chan $my_nick}proc write:these {istimer chan nick} { set my_file [open onchan.chanlist w]  puts $my_file [chanlist $chan]  putserv "PRIVMSG $nick :Done"  close $my_file  if {$istimer} {  timer 3 [list write:these $istimer $chan $nick] }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue May 31, 2005 5:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sikes]]></name></author>
		<updated>2005-05-31T04:31:41-04:00</updated>

		<published>2005-05-31T04:31:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50011#p50011</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50011#p50011"/>
		<title type="html"><![CDATA[Dump chanlist to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50011#p50011"><![CDATA[
Thanks for the reply awyeah.<br><blockquote class="uncited"><div>1) If you use a trigger in the bind you should use the PUB bind, not PUBM bind.</div></blockquote>Ok, was reading <a href="http://johoho.eggheads.org/eggdrop/other/guide2tcl.html" class="postlink">http://johoho.eggheads.org/eggdrop/other/guide2tcl.html</a><br><blockquote class="uncited"><div>2) You have an incorrect number of arguments in your procedure, for bind pub or even pubm. It should be like this:<br><br>bind pub - !writelist pub:write_chanlist <br><br>proc pub:write_chanlist {nick uhost hand chan text} { <br> #your stuff here <br>}<br></div></blockquote>I now have;<div class="codebox"><p>Code: </p><pre><code>bind pub - !writelist pub:write_chanlistproc pub:write_chanlist {nick uhost hand chan text} {                set my_file [open onchan.chanlist w]...</code></pre></div>But still no go getting any reply.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6297">Sikes</a> — Tue May 31, 2005 4:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-05-31T04:17:52-04:00</updated>

		<published>2005-05-31T04:17:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50010#p50010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50010#p50010"/>
		<title type="html"><![CDATA[Re: Dump chanlist to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50010#p50010"><![CDATA[
<blockquote class="uncited"><div>I have been asked to write a bash script that interacts with ftp. Part of that is they need the users online for certain announcements. I have the bash part under control, and just need to check logins against a dump of who is in the channel.<br><br>To be honest I thought this would only be a couple of lines of code and was hoping to get away with out having to learn TCl (at least leave it till I get some time), so I have been scanning scripts and these forums for correct syntax. Below is what i have come up with so far;<br><div class="codebox"><p>Code: </p><pre><code># Get list of current online usernamesset my_chan "#accounts"set my_nick "Sikes"# Need this to be a timer every 3(?) minutes# timer 180 [puts $my_file [chanlist $my_chan]]# Try a bind to get imediate outputbind pubm - !writelist pubm:write_chanlist# Open,write to, and close fileproc pubm:write_chanlist {my_chan my_nick} {                set my_file [open onchan.chanlist w]                puts $my_file [chanlist $my_chan]                putserv "PRIVMSG $my_nick :Done"                # try to get output from chanlist                putserv "PRIVMSG $my_nick :$chanlist"                close $my_file                }</code></pre></div>Now the above trigger dosn't work. But no matter what I do I can't get any output from $chanlist. I started off simple with;<div class="codebox"><p>Code: </p><pre><code>set my_file onchan.chanlistopen $my_file wputs $my_file [chanlist $my_chan]close $my_file</code></pre></div>Without any luck. Can anyone point me to why the above bind dosn't work and I can never seem to get any output from chanlist?<br><br>Thanks</div></blockquote>First of all:<br><br>1) If you use a trigger in the bind you should use the PUB bind, not PUBM bind.<br>2) You have an incorrect number of arguments in your procedure, for bind pub or even pubm. It should be like this:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !writelist pub:write_chanlistproc pub:write_chanlist {nick uhost hand chan text} { #your stuff here}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue May 31, 2005 4:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sikes]]></name></author>
		<updated>2005-05-31T04:15:58-04:00</updated>

		<published>2005-05-31T04:15:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50009#p50009</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50009#p50009"/>
		<title type="html"><![CDATA[Dump chanlist to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50009#p50009"><![CDATA[
I have been asked to write a bash script that interacts with ftp. Part of that is they need the users online for certain announcements. I have the bash part under control, and just need to check logins against a dump of who is in the channel.<br><br>To be honest I thought this would only be a couple of lines of code and was hoping to get away with out having to learn TCl (at least leave it till I get some time), so I have been scanning scripts and these forums for correct syntax. Below is what i have come up with so far;<br><div class="codebox"><p>Code: </p><pre><code># Get list of current online usernamesset my_chan "#accounts"set my_nick "Sikes"# Need this to be a timer every 3(?) minutes# timer 180 [puts $my_file [chanlist $my_chan]]# Try a bind to get imediate outputbind pubm - !writelist pubm:write_chanlist# Open,write to, and close fileproc pubm:write_chanlist {my_chan my_nick} {                set my_file [open onchan.chanlist w]                puts $my_file [chanlist $my_chan]                putserv "PRIVMSG $my_nick :Done"                # try to get output from chanlist                putserv "PRIVMSG $my_nick :$chanlist"                close $my_file                }</code></pre></div>Now the above trigger dosn't work. But no matter what I do I can't get any output from $chanlist. I started off simple with;<div class="codebox"><p>Code: </p><pre><code>set my_file onchan.chanlistopen $my_file wputs $my_file [chanlist $my_chan]close $my_file</code></pre></div>Without any luck. Can anyone point me to why the above bind dosn't work and I can never seem to get any output from chanlist?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6297">Sikes</a> — Tue May 31, 2005 4:15 am</p><hr />
]]></content>
	</entry>
	</feed>
