This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Making this not msg in a certain channel

Old posts that have not been replied to for several years.
Locked
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Making this not msg in a certain channel

Post by stevegarbz »

I want this script to not send a message to a channel that I add in there:

Code: Select all

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: Select all

  putqueue "PRIVMSG $chan :[lindex $text [rand [llength $text]]]" 
line, but don't know where/what I would put. Please help. Thanks.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

...
 foreach chan [channels] { 
  if {[string equal -nocase <yourchan> $chan]} {continue}
  ...
Locked