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 add information to a file

Old posts that have not been replied to for several years.
Locked
t
the_crow
Halfop
Posts: 42
Joined: Fri Feb 28, 2003 7:37 am
Location: Lisboa, Portugal

how to add information to a file

Post by the_crow »

set file "scripts/answer.dat"

bind pub - !answer borlix:pub

proc borlix:pub {nick uhost hand chan args} {
global file
set one [lindex $args 0 ]
set the_rest [lrange $args 1 end]
set fp [open $file a+]
puts $fp "$nick -> $one ->$the_ret"
puts $fp ""
catch {close $fp}
}
hello all. Can you help me with one thing?
what i want to do is like this:
in channel i put !answer first and the rest of the text

and he saves me to file

mynick -> first -> and the rest of the text

Why can he do it??
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Code: Select all

>
that is a special char it means greater than. try changing your > to

Code: Select all

\>
HTH.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
t
the_crow
Halfop
Posts: 42
Joined: Fri Feb 28, 2003 7:37 am
Location: Lisboa, Portugal

Post by the_crow »

thanks it worked...
Locked