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

	<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-05-30T04:48:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[cinder]]></name></author>
		<updated>2003-05-30T04:48:44-04:00</updated>

		<published>2003-05-30T04:48:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20932#p20932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20932#p20932"/>
		<title type="html"><![CDATA[bgexec.mod problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20932#p20932"><![CDATA[
Do you mean using "/bin/ps x" as opposed to just "ps x"?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1127">cinder</a> — Fri May 30, 2003 4:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lordares]]></name></author>
		<updated>2003-05-29T18:53:08-04:00</updated>

		<published>2003-05-29T18:53:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20915#p20915</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20915#p20915"/>
		<title type="html"><![CDATA[bgexec.mod problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20915#p20915"><![CDATA[
ps is hashed (/bin/ps)<br><br>Try calling it with path.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2401">lordares</a> — Thu May 29, 2003 6:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cinder]]></name></author>
		<updated>2003-05-24T13:49:39-04:00</updated>

		<published>2003-05-24T13:49:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20598#p20598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20598#p20598"/>
		<title type="html"><![CDATA[bgexec.mod problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20598#p20598"><![CDATA[
Right, I decided (and a bit of boredom) I was going to update the bgexec.mod, originally meant for eggdrop 1.3.x, to the latest 1.6.x series. After going through every error with a fine-tooth comb, there's all but one error left which I have no idea how to fix. The problem occurs when I use the Tcl command "bgexec tmpfilename commandname" e.g. <strong class="text-strong">bgexec ps.tmp ps x</strong>, with the bot sending a private message containing: "sh: Avps: command not found". As you can see there is an added "Av" coming from the actual bgexec command. I've managed to whittle down the problem to the source code for the bgexec binary, so here's the code:<br><div class="codebox"><p>Code: </p><pre><code>/*** Background Execution for Eggdrop** Written by Fosters@G0**** (c) Copyright 1998 Eden Developments**     All Rights Reserved**** Usage:****  bgexec filename command [args]**** Compile With:****  gcc bgexec.c -o bgexec*/#include &lt;sys/types.h&gt;#include &lt;unistd.h&gt;#include &lt;stdio.h&gt;#include &lt;string.h&gt;#include &lt;stdlib.h&gt;extern void bgexec(char *file, char *command);int main(int ac, char *av[]){        char buf[512];        int loop;        if(ac &lt; 3)        {                fprintf(stderr, "Usage: %s filename command [args]\n", av[0]);                return(20);        }        /* Build string for system() */        for(loop = 2;loop &lt; ac;loop++)        {                strcat(buf, av[loop]);                strcat(buf, " ");        }        bgexec(av[1], buf);        exit(0);}void bgexec(char *file, char *command){        char buf[1024], tmp[256], cbuf[512];        FILE *ip, *op;        if(fork() == 0)        {                tmpnam(tmp);                sprintf(buf, "%s &gt;&gt;%s 2&gt;&gt;%s", command, tmp, tmp);                system(buf);                if(ip = fopen(tmp, "r"))                {                        if(op = fopen(file, "w"))                        {                                while(fgets(cbuf, sizeof(cbuf), ip))                                {                                        fputs(cbuf, op);                                }                                fclose(op);                        }                        fclose(ip);                }                remove(tmp);        }        return;}</code></pre></div>Apart from this, it seems to work fine. The eggdrop module runs the bgexec binary just fine, but for some reason the executable adds "Av" to the command when it runs it. Any help much appreciated <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=1127">cinder</a> — Sat May 24, 2003 1:49 pm</p><hr />
]]></content>
	</entry>
	</feed>
