Here is a code you can try:
on *:TEXT:*:#channel:{
if ($nick != NewsBot) return
if ($1 == news!) {
unset %news.*
set -u30 %news.rec 1
set -u30 %news.show 0
return
}
elseif ($1 == Topic:) {
set -u30 %news.topic $1-
;;; Check Topic below this line vvvvv
if (NASA isin $2-) set -u30 %news.show 1
;;; Check Topic above this line ^^^^^
}
elseif ($1 == Group:) {
set -u30 %news.group $1-
;;; Check Group below this line vvvvv
if ($istok(science space nasa,$2,32)) set -u30 %news.show 1
;;; Check Group above this line ^^^^^
}
elseif ($1 == Snippet:) {
set -u30 %news.snippet $1-
;;; Check Snippet below this line vvvvv
if (NASA isin $2-) set -u30 %news.show 1
;;; Check Snippet above this line ^^^^^
}
elseif ($1 == Link:) {
set -u30 %news.link $1-
;;; Check Link below this line vvvvv
if (www.nasa.com isin $2-) set -u30 %news.show 1
;;; Check Link above this line ^^^^^
}
if (%news.show) {
msg #mychannel News!
msg #mychannel %news.topic
msg #mychannel %news.group
msg #mychannel %news.snippet
msg #mychannel %news.link
unset %news.*
}
}
You need to change #channel, #mychannel, NewsBot as necessary.
Put your keyword checks between the
;;; Check _____ below this line vvvvv
and
;;; Check _____ above this line ^^^^^
lines in each section (Topic, Group, Snippet, Link). Samples are already there for your NASA example.
-genius_at_work