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.

TCL Script exec perl?!?

Old posts that have not been replied to for several years.
Locked
N
Netgrabber

TCL Script exec perl?!?

Post by Netgrabber »

I need a tcl script that runs a perl script every 10 min and says the perl output in a channel.

How do I do that????
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

proc sendperl {} {
  foreach a [split [exec perl command here] \n] {
    puthelp "PRIVMSG #channelnamehere :$a"
  }
  timer 10 sendperl
}
timer 10 sendperl
This works, and it usable, but could do with a lot of work, to provent multiple timers and such.
N
Netgrabber

Post by Netgrabber »

bind pub - !check sendperl
proc sendperl {} {
foreach a [split [exec /home/netgrabber/kuebel/scripts/test.pl] \n] {
puthelp "PRIVMSG #mychannel :$a"
}
timer 10 sendperl
}
timer 10 sendperl


-> [15:02] Tcl error [sendperl]: called "sendperl" with too many arguments

:(
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Why have you used a bind?

There is no need to do this.

You stated you needed a script that would do one job, not two.

If you do need the bind, then see tcl-command.doc for the required arguemnts for this sort of thing.
N
Netgrabber

Post by Netgrabber »

I don't need bind....

But it helps me to debugging the script
N
Netgrabber

Post by Netgrabber »

Can I ask you in on irc channel?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

PPslim on efnet
Locked