egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Making this not msg in a certain channel

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
stevegarbz
Op


Joined: 04 Dec 2004
Posts: 104

PostPosted: Mon Sep 26, 2005 10:15 pm    Post subject: Making this not msg in a certain channel Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Sep 26, 2005 10:50 pm    Post subject: Reply with quote

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

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber