pzs-ng
Table of contents
Homepage
See http://www.pzs-ng.comHow to auto announce after SOME_EVENT
Insert 1 line into dZSbot.confset pre_announce_bw "SECTIONS DELIMITERED BY SPACE"
Patch for dZSbot.tcl:
--- dZSbot.tcl.before 2009-02-19 18:50:13.000000000 +0100
+++ dZSbot.tcl 2009-02-19 18:49:29.000000000 +0100
@@ -264,6 +264,14 @@
return 1
}
+proc auto_bw {} {
+ global staffchan mainchan spamchan
+ putlog "DEBUG: Saying ng_bw 3 times."
+ ng_bw one two three $staffchan ""
+ ng_bw one two three $mainchan ""
+ ng_bw one two three $spamchan ""
+}
+
proc readlogtimer {} {
global dZStimer errorInfo
if {[catch {readlog}]} {
@@ -273,7 +281,7 @@
}
proc readlog {} {
- global defaultsection disable glversion lastread loglist max_log_change msgreplace msgtypes variables
+ global defaultsection disable glversion lastread loglist max_log_change msgreplace msgtypes variables pre_announce_bw
set lines ""
foreach {logtype logid logpath} $loglist {
@@ -332,6 +340,11 @@
foreach {nick user group flags} $line {break}
ng_inviteuser $nick $user $group $flags
}
+ if {[lsearch -exact $pre_announce_bw $event] != -1} {
+ utimer 15 auto_bw
+ utimer 30 auto_bw
+ utimer 45 auto_bw
+ }
if {[lsearch -exact $msgtypes(SECTION) $event] != -1} {
set path [lindex $line 0]
if {[denycheck $path]} {continue}- + : A leading plus sign indicates that this word must be present in every object returned.
- - : A leading minus sign indicates that this word must not be present in any row returned.
- By default (when neither plus nor minus is specified) the word is optional, but the object that contain it will be rated higher.
- < > : These two operators are used to change a word's contribution to the relevance value that is assigned to a row.
- ( ) : Parentheses are used to group words into subexpressions.
- ~ : A leading tilde acts as a negation operator, causing the word's contribution to the object relevance to be negative. It's useful for marking noise words. An object that contains such a word will be rated lower than others, but will not be excluded altogether, as it would be with the - operator.
- * : An asterisk is the truncation operator. Unlike the other operators, it should be appended to the word, not prepended.
- " : The phrase, that is enclosed in double quotes ", matches only objects that contain this phrase literally, as it was typed.
