View previous topic :: View next topic |
Author |
Message |
stevegarbz Op
Joined: 04 Dec 2004 Posts: 104
|
Posted: Mon Sep 26, 2005 10:15 pm Post subject: Making this not msg in a certain channel |
|
|
I want this script to not send a message to a channel that I add in there:
Code: | if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[utimerexists go] == ""} { utimer $timer go }
set queue {}
set frequency 120 ;# seconds
proc getqueue {} {
if {$::queue != {}} {
puthelp [lindex $::queue 0]
set ::queue [lreplace $::queue 0 0]
}
utimer $::frequency getqueue
}
proc putqueue {str} {
lappend ::queue $str
}
getqueue
proc go {} {
global text timer
foreach chan [channels] {
putqueue "PRIVMSG $chan :[lindex $text [rand [llength $text]]]"
}
if {[utimerexists go] == ""} { utimer $timer go }
}
putlog "Precision Effect advertising script" |
Thanks, I assume it'd be near the Code: | putqueue "PRIVMSG $chan :[lindex $text [rand [llength $text]]]" | line, but don't know where/what I would put. Please help. Thanks. |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Sep 26, 2005 10:50 pm Post subject: |
|
|
Code: | ...
foreach chan [channels] {
if {[string equal -nocase <yourchan> $chan]} {continue}
... |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
|