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

	<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>2002-12-23T12:36:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-23T12:36:16-04:00</updated>

		<published>2002-12-23T12:36:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14527#p14527</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14527#p14527"/>
		<title type="html"><![CDATA[Another PISG Topic... :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14527#p14527"><![CDATA[
Past the hour, not every min.<br><br>The tiem bind operates, by generating a text string using a specific time format<br><br>IE: 03 13 02 12 02<br>EQ: 13:03pm 2nd December 2002<br><br>Using a mask, you can pick which time you want the code to trigger<br><br>What you may find, it's easier to call the code every min, and use some simple math in Tcl, to check if the time is right to trigger.<br><br>However, if are simply looing to execute once per hour, you may well use the mask "&lt;min&gt; *"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Dec 23, 2002 12:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stylez]]></name></author>
		<updated>2002-12-21T03:08:44-04:00</updated>

		<published>2002-12-21T03:08:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14468#p14468</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14468#p14468"/>
		<title type="html"><![CDATA[Another PISG Topic... :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14468#p14468"><![CDATA[
Ok I got it working, here is a snippet from the section I modified and how I did it:<div class="codebox"><p>Code: </p><pre><code>set pisgpath "/home/stylez/pisg/pisg"set pisgtimer_trigger [timer $interval pisg:generate]#bind time - "01 * * * *" pisg:generate#bind time - "01 * * * *" pisg:ftpproc pisg:generate {} {global changlobal pisgpathexec $pisgpath --silent</code></pre></div>I also had to change the config for pisg because it said it couldn't find pageheader.txt (this worked fine when running from the shell), anyways I changed the entry from pageheader.txt to the full path to the pageheader.txt.<br><br>Ok now a question for bind time I want to clarify... as it is set right now in that snippet I posted, will it execute the command in it 01 minute past every hour, or every 01 minute? What are the different things I can do with the time formatting in this? tcl-commands.doc doesn't explain much about this. Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2322">Stylez</a> — Sat Dec 21, 2002 3:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-20T09:43:48-04:00</updated>

		<published>2002-12-20T09:43:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14454#p14454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14454#p14454"/>
		<title type="html"><![CDATA[Another PISG Topic... :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14454#p14454"><![CDATA[
For simplicity.<br><br>Timers are like any other command.<br><br>Once executed, they terminate, until called again.<br><br>If I use the command "chattr" in a Tcl script, that is th end of it. Unless my script is called again, or some other script is called, to use the chattr command, then it will never be called.<br><br>If you need a timer to call again, then you have to issue the timer command again.<br><br>The most simple way to do this, is to call it within a timer called command.<br><br>EG<div class="codebox"><p>Code: </p><pre><code>proc test {} {  timer 1 test}timer 1 test</code></pre></div>Allthough very crude, it shows what needs to be done.<br><br>As for the "file not found" issue.<br><br>You didn't show an example of how you are trying to do it.<br><br>As noted on a post yesterday, the exec command takes things literaly.<br><div class="codebox"><p>Code: </p><pre><code>exec "/path/to/app --silent --socket --port 21"exec /path/to/app --silent --socket --port 21</code></pre></div>The 2 lines above, are totaly different, not just because of the quotes (though, these are creating the bigger differance).<br><br>In *nix, you can have spaces in filenames. To access these in a shell, you have to escape the space, for it to work.<br><br>In Tcl, using the exec command, you can save excaping by using quotes.<br><br>You should see now what is heppening, and a example of how to get around it/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Dec 20, 2002 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stylez]]></name></author>
		<updated>2002-12-20T07:22:48-04:00</updated>

		<published>2002-12-20T07:22:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14449#p14449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14449#p14449"/>
		<title type="html"><![CDATA[Another PISG Topic... :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14449#p14449"><![CDATA[
Okay I'm making a script to run PISG from eggdrop... "USE CRONTAB DUMBASS" I know that's what you're all gonna say... lol, but I don't know the first thing about crontab, and how would I ftp it if I used crontab? Anyways, crontab isn't the subject... I have a very rough base for the script, basically a prototype, I will use 'bind time' in the finished script, but for now I'm using Timers. Anyhow here is what I have (lots of stuff is commented, messy, etc):<div class="codebox"><p>Code: </p><pre><code>#How often to update stats(in minutes)?set interval "1"set chan "#kc"set pisgpath "/home/stylez/pisg/pisg"set pisgtimer_trigger [timer $interval pisg:generate]#bind time - "01 * * * *" pisg:generate#bind time - "01 * * * *" pisg:ftpproc pisg:generate {} {global changlobal pisgpathexec $pisgpathset pisgtimer_ftp [timer 1 pisg:ftp]puthelp "PRIVMSG $chan:IRC Stats Page Updating begun..."#set pisgtimer_trigger [timer $interval update:pisg}proc pisg:ftp {} {global chanputhelp "PRIVMSG $chan:IRC Stats Page Updated, FTPing..."if {[set er [sendftp /home/stylez/pisg/kc-stats.html ftp.kronicconcerz.com login pass /httpdocs/kc-stats.html]] != "1"} {  putlog "Error in sendftp: $er"  puthelp "PRIVMSG $chan:IRC Stats Page FTP Failed"}else {puthelp "PRIVMSG $chan:"IRC Stats Page Update Successful."}#putlog "IRC Stats Page Update Successful."}putlog "Pisg update loaded"</code></pre></div>I realise it is incomplete... but the main concern is the exec part. When it execs the pisg perl script, it actually reads the output of it, such as:<blockquote class="uncited"><div>&lt;KronBot&gt; Analyzing log(/home/stylez/eggdrop/mel/logs/kc.12.10.2002.log) in 'eggdrop' format...<br>&lt;KronBot&gt; Finished analyzing log, 1 days total.<br>&lt;KronBot&gt; Analyzing log(/home/stylez/eggdrop/mel/logs/kc.12.11.2002.log) in 'eggdrop' format...</div></blockquote>It interprets this as an error and quits the script.<br>There is an argument for pisg, --silent, which wont output any of this, but I cant seem to execute it from the script, I get the No Such File Or Directory error.<br><br>Also have a basic question about timers.. When a timer goes through its cycle, then executes whatever command, what happens to it? Does it just stop a 0? Does it kill itself off? Or does it restart?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2322">Stylez</a> — Fri Dec 20, 2002 7:22 am</p><hr />
]]></content>
	</entry>
	</feed>
