This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

How to!

Old posts that have not been replied to for several years.
Locked
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

How to!

Post by jsilvestre »

How to make a tcl with a timer to bot execute an command where the bot is running or he execute all commands who i request?
ex: !execute cd test && ./test
Best Regards

José Eduardo Silvestre
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind pub o !execute go
proc go {n u h c t} {
  eval exec $t
}
naturally, this will allow anyone with your +n hostmask to hack your shell - you have been warned!

also, you can't use compound commands like "cd test && ./test" since the [exec] command doesn't spawn a real UNIX shell to parse your input (you can use pipes though); see its manpage for more info
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

Post by jsilvestre »

Tks :)

And now one more question how to bot say in channel/partyline the answer of the server after execute the command. :wink:
Best Regards

José Eduardo Silvestre
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind pub o !execute go
proc go {n u h c t} {
  putserv "privmsg $c :[eval exec [split $t]]"
}
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm maybe change that o flag to n you wouldn't want every op on ur chan to be able and execute stuff.. on ur computer right
XplaiN but think of me as stupid
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

my typo... yes, of course that bind o should be bind n, that's what I meant
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

Post by jsilvestre »

Thanks all for your posts :)
Best Regards

José Eduardo Silvestre
Locked