03-23-2017, 15:26 +0100
AuthorPost
CyBex  10-01-2005, 13:40   | [EGG] 4. Queue System Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
Another example for custom queue where you have full controll:
                                                                                                                              
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
variable newsbuffer {}
proc putnews {text {options ""}} {
    variable newsbuffer
    if {$options!=""} {set newsbuffer [linsert $newsbuffer 0 $text]} {lappend newsbuffer $text}
}
proc queuenews {} {
    variable newsbuffer
    if {$newsbuffer!=[list]} {
        puthelp [lindex $newsbuffer 0]
        set newsbuffer [lreplace $newsbuffer 0 0]
        utimer 4 queuenews
    } {
        utimer 10 queuenews
    }
}
if {[timerexists queuenews] ==  ""} { utimer 4 queuenews }

Now  you can replace your puthelp "PRIVMSG #chan/nick :text"  with  putnews "PRIVMSG #chan/nick :text" for not flooding the Bot and keep your normal queue clean. And you have full controll on the queuenews list.

mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
This post was edited 2 times, last on 09-11-2010, 21:44 by thommey
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen