Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


stop posts on chan.
#6
slt..hi.
first i've tried like this :
Code:
bind pub - !start foo_start
bind pub - !stop stop_foo
  
proc foo_start {nick uhost hand chan text} {
     if {![isop $nick $chan]} {
         global foo_status
         if {![array exists foo_status]} {
             set foo_status(1) [list [utimer 1 [list puthelp "PRIVMSG $chan :message"]]]
             set foo_status(2) [list [utimer 3 [list puthelp "PRIVMSG $chan :message 1"]]]
             set foo_status(3) [list [utimer 5 [list puthelp "PRIVMSG $chan :message 2"]]]
             set foo_status(4) [list [utimer 7 [list puthelp "PRIVMSG $chan :message 3"]]]
         }
     }
}
proc stop_foo {nick uhost hand chan text} {
     global foo_status
     if {[array exists foo_status]} {
      foreach tId [list 1 2 3 4] { killutimer $foo_status[$tId] }
     array unset foo_status
     }
}
than i tried to add another line like:

Code:
bind pub - !start foo_start
bind pub - !stop stop_foo

proc foo_start {nick uhost hand chan text} {
    if {![isop $nick $chan]} {
        global foo_status
        if {![array exists foo_status]} {
            set foo_status(1) [list [utimer 1 [list puthelp "PRIVMSG $chan :message"]]]
            set foo_status(2) [list [utimer 3 [list puthelp "PRIVMSG $chan :message 1"]]]
            set foo_status(3) [list [utimer 5 [list puthelp "PRIVMSG $chan :message 2"]]]
            set foo_status(4) [list [utimer 7 [list puthelp "PRIVMSG $chan :message 3"]]]
            set foo_status(5) [utimer 8 [list array unset ::foo_status]]
        }
    }
}
proc stop_foo {nick uhost hand chan text} {
    global foo_status
    if {[array exists foo_status]} {
        foreach tld [list 1 2 3 4 5] { killutimer $foo_status($tld) }
        array unset foo_status
    }
}
but still nuthin. no any error within !start or !stop cmds.and no any action with'em on channel...

i guess i'm gonna give up ...

i wanna thank you for your patience and for your advance.
i realy appreciated for your help thanks anyway CrazyCat ^^
Away


Messages In This Thread
stop posts on chan. - by heartbroken - 18/11/2012, 10:44
RE: stop posts on chan. - by CrazyCat - 18/11/2012, 11:39
RE: stop posts on chan. - by heartbroken - 19/11/2012, 03:56
RE: stop posts on chan. - by heartbroken - 21/11/2012, 00:59
RE: stop posts on chan. - by CrazyCat - 21/11/2012, 15:17
RE: stop posts on chan. - by heartbroken - 21/11/2012, 17:44
RE: stop posts on chan. - by CrazyCat - 22/11/2012, 10:11
RE: stop posts on chan. - by Artix - 23/11/2012, 22:07

Possibly Related Threads…
Thread Author Replies Views Last Post
  [aide] trivia.tcl, commande !stop inactive blackdevil 3 4,014 19/04/2010, 01:52
Last Post: sebastien

Forum Jump:


Users browsing this thread: 1 Guest(s)