on *:text:*:*:{
if (word isin $1-) || (word2 isin $1-) || (word3 isin $1-) {
if (!$window(@Log)) { window -nk0 @Log | echo @Log $timestamp < $+ $nick @ $chan $+ > $1- } | else echo @Log $timestamp < $+ $nick @ $chan $+ > $1-
}
}
I don't know how to do script but I found a sample I copied else where. This logs the whole line when the keyword is uttered, however I don't know what to add to make it log the line before and 3 lines after as well.
Example of what I am talking about say if I wanted to log when someone said "cold" in channel
19:07 @Nick1 The sky is blue
19:07 @Nick1 Winter is coming
19:07 @Nick1 Henry has cold
19:07 @Nick1 He needs to see a doctor
19:07 @Nick1 Lets take him there tomorrow
19:07 @Nick1 Remember to call me
19:07 @Nick1 Ok?
It should be able to log from "Winter is coming" all the way to "Remember to call me".
Any help to expand the script is appreciated. Thanks.