egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Startup another bot.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
StaleJoke
Voice


Joined: 29 Nov 2005
Posts: 10

PostPosted: Thu Dec 29, 2005 2:06 pm    Post subject: Startup another bot. Reply with quote

I searched already, didnt find so posting

I need to know how can i make one bot startup another one which is in a different directory.

Please dont tell me to use contrab because i do not want the contrab to check it every some minutes and then start. I want to start another bot only as a result of some specific action.

I have tried this,

Code:

catch {exec /home/otherbot/scripts/botchk >/dev/null 2>&1}


It does not work.

Any suggestions ?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Dec 29, 2005 7:41 pm    Post subject: Reply with quote

Try encolse the command within quotes "".
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
StaleJoke
Voice


Joined: 29 Nov 2005
Posts: 10

PostPosted: Thu Dec 29, 2005 10:13 pm    Post subject: Reply with quote

This way ?

Code:

proc sother {} {
   catch {exec "./home/otherbot/scripts/botchk >/dev/null 2>&1"}
}


Does not work.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Dec 29, 2005 10:28 pm    Post subject: Reply with quote

The first '.' (dot) after the quote is for? I only said quotes.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
StaleJoke
Voice


Joined: 29 Nov 2005
Posts: 10

PostPosted: Thu Dec 29, 2005 10:30 pm    Post subject: Reply with quote

With or without the '.' Either ways it does not work.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Dec 30, 2005 1:18 am    Post subject: Reply with quote

[exec] is not your Unix shell, it doesn't support redirection in the form of 2>&1 (it supports redir, but its syntax/semantics is a bit different)

so either try without it, or exec bash and pass the command with redir to it
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
StaleJoke
Voice


Joined: 29 Nov 2005
Posts: 10

PostPosted: Fri Dec 30, 2005 8:43 pm    Post subject: Reply with quote

You lost me there.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Dec 30, 2005 11:47 pm    Post subject: Reply with quote

if [exec] is rocket science to you, give up on it and try something easier

I wonder what exactly is it that you didn't understand
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sat Dec 31, 2005 5:47 am    Post subject: Reply with quote

Why don't you just create a shell script and call it via exec as demond sugested?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber