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.
Old posts that have not been replied to for several years.
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sun Oct 02, 2005 5:42 pm
Hi, somebody knows, why the bot is freezing
Code: Select all
set ochan "#opers"
bind pub - !startservices startservices_msg
proc startservices_msg {nick uhost hand chan arg} {
if {$::ochan != $chan} {return 0}
exec /var/www/IRC/HUB/services/services
exec /var/www/IRC/NeoStats/neostats
exec /var/www/IRC/Eggdrop/eggdrop
return 1
}
greets tessa
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Oct 02, 2005 5:59 pm
Try using [open] instead of exec. Example:
Code: Select all
set bla [open "|/var/www/IRC/HUB/services/services"]
close $bla
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Oct 02, 2005 6:01 pm
because of your unresponsive (or maybe interactive, waiting input) external apps you spawn with [exec], which waits for them to finish
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sun Oct 02, 2005 6:14 pm
Something like this?
Code: Select all
set ochan "#opers"
bind pub - !startservices startservices_msg
proc startservices_msg {nick uhost hand chan arg} {
if {$::ochan != $chan} {return 0}
set bla [open "|/var/www/IRC/HUB/services/services"]
close $bla
set blo [open "|/var/www/IRC/NeoStats/neostats"]
close $blo
set blu [open "|/var/www/IRC/Eggdrop/eggdrop"]
close $blu
return 1
}
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Oct 02, 2005 6:18 pm
possibly like it, but not quite; you need asynchronous I/O
search forum for "tail -f"
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sun Oct 02, 2005 6:31 pm
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Oct 02, 2005 6:41 pm
instead of making faces, do the search and try to understand what you find (go to tcl.tk and read about [fconfigure] and [fileevent])
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sun Oct 02, 2005 6:51 pm
ok...i think i should learn...learn...learn
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sun Oct 02, 2005 7:02 pm
Do you mean this?
Code: Select all
bind pub - !startservices startservices_msg
proc startservices_msg {nick uhost hand chan arg} {
if {$::ochan != $chan} {return 0}
set fc [open "|tail -f /var/www/IRC/HUB/services/services"]
fconfigure $fc -blocking 0
fileevent $fc readable {putserv "privmsg $::ochan :[load $fc]"}
}
return 1
}
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Oct 02, 2005 7:36 pm
nope, that tail has nothing to do with your stuff, don't take things literally; also, it's not [load], it's [read]
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Oct 02, 2005 7:54 pm
pity, you were on the right track
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use