This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

bind time

Old posts that have not been replied to for several years.
Locked
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

bind time

Post by BrollY »

well i have been working on this for a few days now, n ive gotten quite tired. im using the 'bind time' thingy majig in order to trigger a proc at 16 minutes past every hour. below is the line:


bind time - "16 * * * *" dbot:download


problem is, when i run the bot with the '-n' mode with the command prompt, the bot goes ahead n acts normally n does wat its supposed to do, but if i launch the bot in the background (i launched it in quite a few different ways) it wont trigger the proc when its supposed to. not that im lazy, but its very frustrating to be at it for 4 days n have no idea wats wrong. any ideas wats wrong?

PS: yea im running a windrop (just in case u didnt notice the command prompt comment ¶:P), n its a 1.6.13 (tried it with .12 but same results)

PS2: i searched this forum for something similar to this n did find something about the 'bind time' thing, just didnt find anyone with this problem ¶:/

thx in advance
Yo momma's so fat she can be in the past, present, n future all at once
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Use the ".binds time" command in the partyline.

It should tell you how many times a bind has been triggered (IE, matched and called).

If the counter doesn't increase at the time (16 mins past hour) then it would seem there is a larger problem.

If it does increase, then you should review your code, as it would seem to be the problem.
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

nope, it doesnt get triggered at all.
i even added a temporary !test trigger to check all the other procs in the tcl, n they all work just fine, its only the bind time thats not working when the bot gets launched into the background.
Yo momma's so fat she can be in the past, present, n future all at once
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

So you're saying with -n, the bind time triggers, and without it, it doesn't?

Try using "*" instead of "16 * * * *" to test. That will make it happen every minute, but at least you can see if it's being called.
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

tried the "*" thing.... mr cranky bot now gives this error msg:

(server name) says I'm not registered, trying next one.

it keeps doing that over n over n over again in a never ending loop.

this is wat i wrote to do the test:

#########################
set test "BrollY"
bind time - "*" test
proc test {arg} {
global test
putserv "PRIVMSG $test :Worked."
}
#########################

now i took that little test off, n it connects just fine. so i guess using bind time - "*" wont work.
Yo momma's so fat she can be in the past, present, n future all at once
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Note your proc definition and what tcl-commands.doc says.

You need 5 arguments, one for each of the mins, hours, days months and years.

The error is likely to be "called test with too many arguments"
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

yea i noticed that, now i just tried a few tests n such, seems the bind all of a sudden is working (most probably just needed to fix something), but indeed the proc i want to execute is not cooperating. no idea why. below i will show the little edit i did to run a test with the real proc, atleast the beginning of it:

##################################
set savedir "domdb"
set max_retries "3"
set whehe "gamedata.info"

#This sets the time for the download.
bind time - "16 *" doit
proc doit {args} {
putserv "PRIVMSG BrollY :Weeee! $args"
set dbot(downloading) "[dbot:download info/url.links]"
putserv "PRIVMSG BrollY :Waaaa!"
return 1
}

#Downloader.
proc dbot:download {linkfile} {
global savedir
blah blah blah blah
###############################

from there on it just keeps on going with other stuff. odd thing is, i did a small 'bind msg - !test dbot:download' a few nights ago while i was checking that the bot downloaded things properly, n it worked just fine. but seems it doesnt wanna trigger in any other way. the lines that message me r just to see where it gets stuck. it does the first message (the weeee part), but never does the second one (waaaa). below is the original way it should be:

###############################
#Variables needed for the DBOT to operate.
set savedir "domdb"
set max_retries "3"
set whehe "gamedata.info"

#This sets the time for the download.
bind time - "16 *" dbot:download

#Downloader.
proc dbot:download {args} {
global savedir
blah blah blah blah
################################

the linkfile thing is not in the original part since the 'linkfile' is included in the original code a bit further down. any ideas wats up with it?
Yo momma's so fat she can be in the past, present, n future all at once
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

right, i just launched the bot with the -n mode, and it triggered everything just fine, but it simply will NOT work if i launch it in the background.
Yo momma's so fat she can be in the past, present, n future all at once
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

ok just to mention wat i have done throughout these last few hours, ive run all kinds of tests and such. apparently the bind time works for all other commands and the tests work out just fine, but that one SINGLE proc i want to execute wont work. below is one of the tests i ran:


################################
bind time - "*" dbot
proc dbot {min hour day month year} {
putserv "PRIVMSG BrollY :[clock format [clock seconds] -format "%d.%m.%Y %H:%M:%S"]"
  if {[clock format [clock seconds] "%M"] != "3?"} {
return 0
}
dbot:download info/url.links
}


proc dbot:download {linkfile} {
global savedir
if {[file exists $savedir/info.xml]} {
file delete $savedir/info.xml
dbot:parser "$linkfile"
}
dbot:parser "$linkfile"
}

###############################

just in case, i changed the bind time parameters many times, and i made all styles of procs to execute 'dbot:download', and just to get to the point, it just will NOT get triggered unless the bot is run with -n. i even tried with a few things ive seen in other bind time posts on this forum, but to no avail. if anyone can put that small part into their bot n plz check if it works for them, then tell me, or even better if there is some error is in there to let me know as well. appreciate it.
Yo momma's so fat she can be in the past, present, n future all at once
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Maybe dbot:download is blocking. How does it download the webpage? Try commenting out that line and see if it then works.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

First off, the download phase will never execute there.

Code: Select all

if {[clock format [clock seconds] "%M"] != "3?"} {
If the time DOESN'T equal 3?, the return.
Well, see as there is no digit ? in BASE10, this expression will allways use the "return" command.

That being said, it doesn't solve you main problem, as you should be seeing the output from the "putserv" command.

Maybe you should make the first line a "putlog". That will make sure you see some information, IRC server or not.

Are you sure you have a unique name for the proc, and that it doesn't conflict?

Are you sure it is even bound? Can you confirm the entry is lists when doing ".binds time" in the partline.
Locked