I would like to get some help on a script.
Searched the forum , found some bits and pieces of the script i'd like to have.
TCL aint my strongest side
This is what i found :
Code: Select all
set relay(chans) "[list #chan1 #chan2 #etc]"; # put the channels within this list of which you want to relay messages from
set relay(who) "[list nick1 nick2 nick3 etc]"; # put here the nicknames of who you want to relay messages from
set relay(to) "#relay-to-this-channel"
bind pubm - {*} relay:pubm
proc relay:pubm {nick uhost hand chan text} {
global relay
if {[lsearch -exact "$relay(chans)" $chan] == -1} { return }
if {[lsearch -exact "$relay(who)" $nick] == -1} { return }
if {[validchan $relay(to)] && [botonchan $relay(to)]} {
puthelp "PRIVMSG $relay(to) :\[[clock format [clock seconds] -format %H:%M:%S]\] <$nick> $text"
}
}
But instead of relaying to a channel / network , i'd like the bot to write to a file.
IE.
My bot says:
<NFOrce> (NEWS) : blablabla http://blabla
then i wanna put "(NEWS) : blablabla http://blabla" into a file in /home/NFOrce/data.txt ( or any other word i want to echo later )
Also like to know if it's possible if the bot can write his own txt into the file or do i need a new eggdrop for that ??
TIA
JAFO