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.

timers keep crashing our bot

General support and discussion of Eggdrop bots.
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

timers keep crashing our bot

Post by Swift »

Hi --- We are very new to eggdrop and have been having loads of problems with timers crashing our bot. Because we are so new to it, we have no idea where to find these timers, but assume they are in FullTriviabot65 script file. We are so afraid of changing this file with such limited knowledge and therefore totally destroying the bot (we dont really want to start from scratch again)

Is there anyone here who can give a laymans view to timers, where to find them, how to correct them etc

Many thanks in advance :D
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Re: timers keep crashing our bot

Post by YooHoo »

Swift wrote:Hi --- We are very new to eggdrop and have been having loads of problems with timers crashing our bot. Because we are so new to it, we have no idea where to find these timers, but assume they are in FullTriviabot65 script file. We are so afraid of changing this file with such limited knowledge and therefore totally destroying the bot (we dont really want to start from scratch again)

Is there anyone here who can give a laymans view to timers, where to find them, how to correct them etc

Many thanks in advance :D
Nerfbendr's Trivia is a damn complicated piece of work, be very very careful messing with the actual tcl, you could moofie super-quick. Have you read the excellent tutorial/manual included yet? Be sure not to allow any question marks (?) or quotation marks (") in any of the question files, as this will also give a timer error and make the bot freeze and/or die.
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

Many thanks for your reply. Which manual are u referring to?

Yes, we are gradually going through all our question files removing ? and " as well as # [ ] { } ' ! --- it seems there are an awful lot of symbols that dont agree with eggdrop!!!!

Was I right in saying the timers are in FullTriviabot65 or do they appear in another script file?

Any further help would be greatly apprecaited. Thanks :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

your problem description is too vague

provide logs if you want more elaborated opinions
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

Ok this the a log of the problem yestereday:-

[08:47] Tcl error in script for 'timer7776':
[08:47] couldn't open "TriviaMonthlyScores/Apr2006.txt": too many open files
[08:48] Tcl error in script for 'timer7777':
[08:48] couldn't open "TriviaBankTotals.txt": too many open files
[08:48] Tcl error in script for 'timer7778':
[08:48] couldn't open "TriviaHangingReport.txt": too many open files
[08:52] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files

It is often the scores timer but can also be the logtimer.

Hope you can help :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

a buggy script, not properly closing files
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

So, is there a way to correct this? An easy way I mean lol
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

no

basically, you have 3 options: 1) contact the author, 2) post the script and hope someone would bother to debug it or 3) learn tcl and fix it yourself

I'd guess none of these is particularly appealing to you
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

lol, well we have contacted the owner, twice, but to no avail. As to posting the script, we are still not over sure which file these timers can be found in and this should give you the answer to the last option of correcting it ourselves lol

I have to admit eggdrop is one complicated bot!!!!

Thanks for your help anyway :D Much appreciated

PS I still think these timers are in FullTriviabot65 --- am i right?
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

ok another error message today and bot crashed:

[19:10] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files
[19:10] <<Jimbo>> !*! !repeat
[19:10] <<Jimbo>> !*! !trivia
[19:11] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files
[19:14] ERROR writing user file.


Think this is the script that refers to it (not over sure tho):-

## Autogreeting routine!
proc TriviaWelcome {nick uhost hand chan} {
global Greet1ToUse Greet2ToUse yearscore nameofbot antifloodenable usercounter triviachannel autovoiceenable autovoicescore autovoicesynch weekfilename monthfilename yearfilename dayfilename autojoin alreadygoing joinmsg server hintalreadygiven

## If autovoicing is enabled, the bot checks to see if the user that joined the channel has
## a score of x or more (defined in the config!), if so and if the bot is able to voice
## in the channel, then that user gets voiced...on entry to the channel only!
## (The bot won't re-voice them if they get de-voiced in the channel...sorry!)

if {$nick == $nameofbot} {return}
if {[string tolower $chan] != [string tolower $triviachannel]} {return}
if {$antifloodenable == 1} {
foreach usercounter [array names commandusers] {
if {[lindex $commandusers($usercounter) 1] == $uhost} {
return
}
}
set commandusers($usercounter) "$nick $uhost"
}

set greetknownplayers 1
if {$greetknownplayers == 1} {
if {[info exists yearscore($nick)]} {
putquick "privmsg $triviachannel :[get_Greet1] $nick...[get_Greet2]"
}
}
if {$autovoiceenable == 1} {
set scoreplayer $nick
regsub -all \[{}] $scoreplayer "~" scoreplayer
regsub -all {[\\]} $scoreplayer "|" scoreplayer
### END OF NICKFIX FOR LATEST SLASH GLITCH (FIXED AS OF V6.0)
set foundflag 0
if {$autovoicesynch == 0} {set scorefiletouse "GenericScoresTEXT/Today.txt"}
if {$autovoicesynch == 1} {set scorefiletouse "GenericScoresTEXT/ThisWeek.txt"}
if {$autovoicesynch == 2} {set scorefiletouse "GenericScoresTEXT/ThisMonth.txt"}
if {$autovoicesynch == 3} {set scorefiletouse "GenericScoresTEXT/ThisYear.txt"}
set f [open $scorefiletouse r]
if [file exists $scorefiletouse] {
while {[gets $f tally] != -1} {
set checker [lindex $tally 0]
if {$checker == $scoreplayer} {
if {[lindex $tally 1] >= $autovoicescore} {
pushmode $triviachannel +v $nick
}
}
}
close $f
}
}


Any ideas please would be gratefully received :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

MoxQuizz -- A quiz/trivia script for IRC eggdrop bots. Free and it works as expected.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Sometimes your shell might be having problems from outer programs that may cause applications not to be able to open files anymore (like what's happening with your eggdrop). If that's the case, you may want to contact your shell admin, otherwise use another script.

One thing you can try is this:

Code: Select all

set f [open $scorefiletouse r]
if [file exists $scorefiletouse] {
 while {[gets $f tally] != -1} {
  set checker [lindex $tally 0]
  if {$checker == $scoreplayer} {
   if {[lindex $tally 1] >= $autovoicescore} {
    pushmode $triviachannel +v $nick
   }
  }
 }
 close $f
}
move close $f after the last brace.

Code: Select all

   }
  }
 }
}
close $f
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

Thanks very much for your help. We will check this out :)
User avatar
Swift
Voice
Posts: 28
Joined: Sun Apr 09, 2006 1:21 pm
Location: UK
Contact:

Post by Swift »

I tried it and it crashed the bot. There were actually 5 brace in the script so I put it after the 5th. Was that right?

When it crashed it told of an error in Fulltriviabot65 and said it couldnt find config file so I had to replace the original and all was well (until the next time! lol)

pushmode $triviachannel +v $nick
}
}
}
close $f
}
}
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

closing braces

Post by DragnLord »

Sir_Fz gave it to you correctly, you need four (4) closing braces before 'close', like this:

Code: Select all

 pushmode $triviachannel +v $nick
}
}
}
}
close $f 
Post Reply