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.

echo txt results to channel

Old posts that have not been replied to for several years.
Locked
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

echo txt results to channel

Post by harry »

how can i make my eggdrop echo txt results to the channel?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: echo txt results to channel

Post by user »

Code: Select all

putserv "PRIVMSG #chan :<line of text>"
Have you ever read "The Manual"?
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

Post by harry »

so this

putserv "PRIVMSG #chan :<line of text>"

putserv "PRIVMSG #mychannel : test.txt"


?

i want the contents of a txt displayed to the channel
i havent tried this but first off i dont even know where i would put this command. so please be more discriptive, sorry and thanks
User avatar
BarkerJr
Op
Posts: 104
Joined: Sun Mar 30, 2003 1:25 am
Contact:

Post by BarkerJr »

Ah, you should have specified that you wanted to echo a file's contents to the channel.

set contents [split [exec "cat test.txt"] \n]
foreach line $contents { puthelp "PRIVMSG #mychannel :$line" }
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

or in a more generic fashion (ie. supportive of windrops)

Code: Select all

set contents [split [read [set f [open "test.txt" r]]][close $f] \n]; #borrowed from user ;)
foreach line $contents { puthelp "PRIVMSG #mychannel :$line" }
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

Post by harry »

set contents [split [read [set f [open "test.txt" r]]][close $f] \n]; #borrowed from user ;)
foreach line $contents { puthelp "PRIVMSG #mychannel :$line" }



thanks but where do i type this at, should i just make a seperate tcl then just copy and paste that?
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

Post by harry »

where do i have to put the txt file?
User avatar
BarkerJr
Op
Posts: 104
Joined: Sun Mar 30, 2003 1:25 am
Contact:

Post by BarkerJr »

In the eggdrop directory.
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

Post by harry »

thank you
Locked