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

	<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>2008-10-21T04:17:52-04:00</updated>

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

		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-21T04:17:52-04:00</updated>

		<published>2008-10-21T04:17:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85581#p85581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85581#p85581"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85581#p85581"><![CDATA[
hi guys<br><br>Ignore previous post it seems to be working now - however i think when it runs the loop for the list i.e foreach x $list it obv runs very quickly so all dl start at same time - i tried to add a timer command in body of program which worked as in each dl started a minute after the previous - i saw this while i was in dcc chat with the bot - however it never sent the file or pm me or the user who i sent files to - also at the end it seemed to then spit out a timer split error and disconnect the bot - then reconnect<br>is there a way to slow that foreach loop?<br>or is there a way to say read the first 5 users - send file then read next 5 etc until the list is complete - i assume this is a major upgrade but with all the people getting the file at same time it hogs the server <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>thanks for input <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>Paul<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10261">PaulyboyUK</a> — Tue Oct 21, 2008 4:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-20T13:36:08-04:00</updated>

		<published>2008-10-20T13:36:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85574#p85574</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85574#p85574"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85574#p85574"><![CDATA[
thankyou - tht was spot on  - is there anyway to msg both the sender and the person who is revieving the file to show it sent ok? - i assume that the number returning from dcc send is 0  - i tried but when it sends to say 5 people it only sends the pm to the last person receiving the file<br><br>ty so much for the help - <br><div class="codebox"><p>Code: </p><pre><code>bind rcvd - paulyboy gotFileproc gotFile {h n f} {set txt [open nickplus.txt]set list [read $txt]close $txtforeach x $list {if {[set nick $x]!=""} {switch [dccsend $f $nick] {0 {set msg "CDClub has sent [lindex [split $f "/"] end] to $nick"}1 {set msg "the dcc table is full (too many connections)"}2 {set msg "can't open a socket for the transfer"}3 {set msg "the file doesn't exist"}default continue}putserv "PRIVMSG $nick :I am sending you [lindex [split $f "/"] end] Please do not release until Ad in channel, Thankyou"}putserv "PRIVMSG paulyboy : $msg"}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10261">PaulyboyUK</a> — Mon Oct 20, 2008 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-10-19T20:10:43-04:00</updated>

		<published>2008-10-19T20:10:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85568#p85568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85568#p85568"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85568#p85568"><![CDATA[
<blockquote class="uncited"><div>is there a way to remove the directories so it just shows the filename?<br>also excuse the code fomatting etc - its my first go at this hope to get better as time goes on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thankyou in anticipation<br><br>Paul</div></blockquote><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $nick :I have sent you [lindex [split $f "/"] end] thankyou"</code></pre></div>You failed to include that <strong class="text-strong">:</strong> in your posted code, it is required for privmsg to function. First split the entire thing by slashes, then lindex the very last position to get only the filename.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Oct 19, 2008 8:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-19T19:23:51-04:00</updated>

		<published>2008-10-19T19:23:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85566#p85566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85566#p85566"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85566#p85566"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind rcvd - Paulyboy gotFileproc gotFile {h n f} {set txt [open nickplus.txt]set list [read $txt]close $txtforeach x $list {if {[set nick $x]!=""} {switch [dccsend $f $nick] {1 {set msg "the dcc table is full (too many connections)"}2 {set msg "can't open a socket for the transfer"}3 {set msg "the file doesn't exist"}default continue}putlog "Error sending $f to $nick ($x): $msg"}}putserv "PRIVMSG $nick i have sent you $f thankyou"}</code></pre></div>the above code seems to work ok - i wanted the bot to sent a pm tpo me and the user it sends the file to once the file is complete - however it does pm the user ( Havent added my pm bit yet) however it shows the full path to the file ie &gt; i have sent you /home/myirc/botroom/mybot/filesys/incoming/test.zip.rar thankyou<br><br>is there a way to remove the directories so it just shows the filename?<br>also excuse the code fomatting etc - its my first go at this hope to get better as time goes on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thankyou in anticipation<br><br>Paul<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10261">PaulyboyUK</a> — Sun Oct 19, 2008 7:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-17T18:10:05-04:00</updated>

		<published>2008-10-17T18:10:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85552#p85552</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85552#p85552"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85552#p85552"><![CDATA[
TY TY TY - spot on and a gr8 start 4 me youare a star <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=10261">PaulyboyUK</a> — Fri Oct 17, 2008 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-10-15T06:46:13-04:00</updated>

		<published>2008-10-15T06:46:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85535#p85535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85535#p85535"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85535#p85535"><![CDATA[
Set up the filesys and transfer modules, put your handle in the bind and load the script below, add users and give them the F flag (uppercase F), then send a file to your bot to test it. (it will only send copies of the file to users that are visible to the bot at the time you completed your transfer - and I didn't test it, so it might have bugs)<div class="codebox"><p>Code: </p><pre><code>bind rcvd - PUT_YOUR_OWN_HANDLE_HERE gotFileproc gotFile {h n f} {foreach hand [userlist F] {if {[set nick [hand2nick $hand]]!=""} {switch [dccsend $f $nick] {1 {set msg "the dcc table is full (too many connections)"}2 {set msg "can't open a socket for the transfer"}3 {set msg "the file doesn't exist"}default continue}putlog "Error sending $f to $nick ($hand): $msg"}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Oct 15, 2008 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-12T06:42:02-04:00</updated>

		<published>2008-10-12T06:42:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85511#p85511</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85511#p85511"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85511#p85511"><![CDATA[
thanks for this - trying my best - will keep plugging away - any other input really appreciated - also thtanother way i could use would be when i send a file to the bot it sends that file out to a list of users - is this do-able? ......<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10261">PaulyboyUK</a> — Sun Oct 12, 2008 6:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-10-10T03:22:19-04:00</updated>

		<published>2008-10-10T03:22:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85489#p85489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85489#p85489"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85489#p85489"><![CDATA[
First, make sure you've loaded and set up the filesys and transfer modules correctly.<br><br>Do you want to initiate the sending or will the users do it on their own?<br>If the users will initiate the sending, why not give them partyline and file system access? (saves you some coding)<br><br>If you want to initiate the sending or don't want to give them partyline access, add the users to your bot and give them a custom flag (eg. .chattr user +F)<br><br>Make a list of files to send... either by hand...<div class="codebox"><p>Code: </p><pre><code>set filelist [list file1 file2]</code></pre></div>...or generate a list of all the files in a particular directory using glob<div class="codebox"><p>Code: </p><pre><code>set filelist [glob -dir /path/to/dir/containing/your/files -type f *]</code></pre></div>Make a proc to send all the files to one user<div class="codebox"><p>Code: </p><pre><code>proc sendfiles {nick} {foreach file $::filelist {dccsend $nick $file}}</code></pre></div>If YOU want to initiate the sending, find all users that have the flag and are currently on irc:<div class="codebox"><p>Code: </p><pre><code>foreach user [userlist F] {if {[set nick [hand2nick $user]]!=""} {sendfiles $nick}}</code></pre></div>If the user will initiate the send themselves, just make sure you include the flag in the bind they use to start the transfer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Oct 10, 2008 3:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PaulyboyUK]]></name></author>
		<updated>2008-10-09T18:52:59-04:00</updated>

		<published>2008-10-09T18:52:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85485#p85485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85485#p85485"/>
		<title type="html"><![CDATA[any help appreciated :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85485#p85485"><![CDATA[
i have searched and as yet cannot even find a script that does half what i need - am trying to learn tcl but long journey for me - heres what i am looking to do !<br><br>on a private channel i want to be able to send a complete folder of files to a list of users - i nned to be able to view - and mange those users - ie with something like !viewusrs to see all users in a list , !delusr !addusr etc<br> also abiltiy to selct folder to send - not just file it need to be a complete folder - if has to be fixed then fair enough!<br>i already have something similar in a mirc script - but cant seem to begin starting to create in tcl script!! any ideas? any help really appreciated - any further info needed just ask<br><br>ty in anticipation<br><br>Paul <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=10261">PaulyboyUK</a> — Thu Oct 09, 2008 6:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
