12-13-2018, 06:01 +0100
Search result (1)
All posts by: Deflex
AuthorPost
Topic: [EGG] Anti Flood Trigger   Forum: #tclcode snippets      Goto post
Deflex  07-02-2004, 15:22 Homepage
(Moderator)

Avatar

Member since 03/2004
6 Posts
Location: Germany, NRW
(u)timer method:                                                                                                                               
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
bind pub - !example PROCNAME

proc PROCNAME { nick uhost handle chan arg } {

    # create a sub-proc to delay
    proc delay {} { return }

    # timer already running?
    if {[utimerexists delay] == ""} {

        # timer is not active, perform something
        puthelp "PRIVMSG $chan :your text here"
        # your code goes here, like call an other proc

        # starting timer to prevent flooding next time
        utimer 120 delay

    } else {

        # timer is already active
        puthelp "NOTICE $nick :Your Errormsg here"

    }
}

This post was edited 3 times, last on 08-12-2009, 22:22 by thommey
Go to forum
Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen | Time: 2124.5 msec, CPU time: 76.3 msec, 29 Database queries in 149.4 msec | 3.3 kB (12.3 kB) | Timezone: +0100