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 

Bin time to secondes

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
neoclust
Halfop


Joined: 14 Aug 2009
Posts: 55

PostPosted: Sat Aug 15, 2009 5:36 pm    Post subject: Bin time to secondes Reply with quote

It is possible to launch a "bind time" every 15 seconds?
Code:
bind time - * Auto:scan
proc Auto:scan {minute hour day month year} {
     foreach chan [channels] {
     putserv "PRIVMSG $chan :test"
   }
}

then it is that triggers every minute
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Sat Aug 15, 2009 6:40 pm    Post subject: Reply with quote

No there isn't. Time binds deal only with minutes, hours, days, months and years.

You would have to use a utimer to call a proc recursively, perhaps first started when the bot joins a network.

Code:

bind EVNT - init-server pTimerStart

proc pTimerStart {type} {
    utimer 15 pTimerOutput
    return 0
}

proc pTimerOutput {} {
    foreach chan [channels] {
        if {[botonchan $chan]} {
            putquick "PRIVMSG $chan :test"
        }
    }
    utimer 15 pTimerOutput
    return 0
}

_________________
I must have had nothing to do
Back to top
View user's profile Send private message
neoclust
Halfop


Joined: 14 Aug 2009
Posts: 55

PostPosted: Sat Aug 15, 2009 8:54 pm    Post subject: Reply with quote

Oh thanks arfer very glad Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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