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.
Help for those learning Tcl or writing their own scripts.
MUD
Voice
Posts: 1 Joined: Sat Aug 10, 2013 11:36 pm
Post
by MUD » Sat Aug 10, 2013 11:43 pm
It's been way over 10 years since I've used tcl and eggdrops, but I was trying to get a shell command to execute and display the results that outputs more then one line in the bash but not in a channel, right now I only get the first line output and stops there. Can anyone help remind me of what I am doing =) TIA
Code: Select all
bind pub -|- !ftpwho do_ftpwho
proc do_ftpwho {nick uhost hand chan text} {
set my_ftpwho [exec ftpwho]
puthelp "PRIVMSG $chan :$ftpwho"}
}
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Aug 11, 2013 5:57 am
if the output has multiple lines, then split it in multiple lines.
Code: Select all
bind pub -|- !ftpwho do_ftpwho
proc do_ftpwho {nick uhost hand chan text} {
set my_ftpwho [exec ftpwho]
foreach line [split $my_ftpwho \n] {
puthelp "PRIVMSG $chan :$line"
}
}
Something like this should do what you wanted.
Once the game is over, the king and the pawn go back in the same box.