Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TCL + Eggdrop how to trigger script on each line

17 views
Skip to first unread message

stefa...@googlemail.com

unread,
Apr 2, 2007, 7:25:59 AM4/2/07
to
Hello,

i want to write a small .tcl eggdrop script that checks each posted
line in a channel for existence of 2 Keywords and then execute
something, the problem is i dunno how :) So far i did something like:

set botlist {
tinky
dipsy
laalaa
}
set cmdlist {
weather
news
}

Just how do i check each line posted in for existence of the above
words ? How to make sure my script is actually executed ? Is there a
place on the net where i could find some simple examples ?

Any help on this subject would be greatly appreciated, I'm a
total .tcl newb :)

Cheers,
Stefan

Cameron Laird

unread,
Apr 3, 2007, 10:13:20 AM4/3/07
to
In article <1175513159....@n59g2000hsh.googlegroups.com>,
.
.
.
A. http://wiki.tcl.tk/16656
B. proc special_match posted_line {
foreach word [concat $botlist $cmdlist] {
if [regexp $word $posted_line] {return 1}
}
return 0
}

Is that the sort of thing you're after? Should the line
He felt his sinews creak
match "news"?

0 new messages