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

	<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-10-14T11:11:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2005-10-14T11:11:34-04:00</updated>

		<published>2005-10-14T11:11:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56633#p56633</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56633#p56633"/>
		<title type="html"><![CDATA[I need very simple extention. pls help me]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56633#p56633"><![CDATA[
<blockquote class="uncited"><div>#<br># Sendftp v1.01 (12/6/97) by Ernst &lt;<a href="mailto:ernst@studbox.uni-stuttgart.de">ernst@studbox.uni-stuttgart.de</a>&gt;<br># Ernst's eggdrop page:  <a href="http://www.sodre.net/ernst/eggdrop/" class="postlink">http://www.sodre.net/ernst/eggdrop/</a><br># =============================================================================<br><br># This is a proc to send a file via FTP to another server. Useful in many<br># situations, for example to upload a HTML file generated by eggdrop to your<br># www server if it is not the same as your eggdrops machine.<br><br># Change this to something to use to check if a host is alife.<br># set pingcheck "" to disable this checking.<br># "/bin/ping -c 1" works on Linux. Try just "/bin/ping" on other machines<br># Set to "" to disable this checking<br>set pingcheck "/bin/ping -c 1"<br><br># Include it with 'source scripts/sendftp.tcl'.  Call it with all parameters:<br>#<br>#   sendftp &lt;localfile&gt; &lt;server&gt; &lt;user&gt; &lt;password&gt; &lt;remotefile&gt;<br>#<br># 'localfile' and 'remotefile' *must* both be given as FULL paths to the<br># filenames, the first on the local, the secondon the remote server.<br>#<br># For example:<br>#<br># sendftp /home/bill/stats.htm <a href="http://www.ms.com" class="postlink">www.ms.com</a> bill secret /bgates/WWW/stats.htm<br>#             (local-file       server    user  pass       remote-file)<br><br>proc sendftp { localfile server user pass remotefile } {<br>global pingcheck<br>if {![file exist $localfile]} {<br>return "sendftp: File $localfile does not exist."<br>}<br>if {$pingcheck != ""} {<br>if {[catch {exec [lindex $pingcheck 0] [lrange $pingcheck 1 end] $server &gt; /dev/null 2&gt; /dev/null}]} {<br>return "sendftp: Machine $server seems to be dead."<br>}<br>}<br>set noftp [catch {set ftpprog [exec which ftd]}] <br>if {$noftp} {<br>if {[file executable /usr/bin/ftp]} {<br>set ftpprog /usr/bin/ftp<br>set noftp 0<br>}<br>if {[file executable /bin/ftp]} {<br>set ftpprog /bin/ftp<br>set noftp 0<br>}<br>}<br>if {$noftp} { return "sendftp: You don't seem to have the 'ftp' tool" }<br>set pipe [open "|$ftpprog -n $server" w]<br>puts $pipe "user $user $pass"<br>puts $pipe "bin"<br>puts $pipe "put $localfile $remotefile"<br>puts $pipe "quit"<br>close $pipe<br>return 1<br>}<br></div></blockquote>This script send a file normally if you use the command through partyline, but I need to be seted in the script the variables like :<br>$localfile<br>$server<br>$user<br>$pass<br>$remotefile (remotedir where to save the $localfile)<br><br>and to be added a timer to send the file every <strong class="text-strong">x</strong> minutes to server.<br><br>I think this will be not very complecated to extend the sctipt but I have no experience with tcl/tk.<br><br>Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Fri Oct 14, 2005 11:11 am</p><hr />
]]></content>
	</entry>
	</feed>
