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 

timers keep crashing our bot
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Sun Apr 09, 2006 1:27 pm    Post subject: timers keep crashing our bot Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Apr 09, 2006 5:06 pm    Post subject: Re: timers keep crashing our bot Reply with quote

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 Very Happy
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.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Sun Apr 09, 2006 5:10 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Apr 10, 2006 3:12 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Mon Apr 10, 2006 3:17 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Apr 10, 2006 4:06 am    Post subject: Reply with quote

a buggy script, not properly closing files
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Mon Apr 10, 2006 4:10 am    Post subject: Reply with quote

So, is there a way to correct this? An easy way I mean lol
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Apr 10, 2006 4:18 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Mon Apr 10, 2006 7:24 am    Post subject: Reply with quote

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 Very Happy Much appreciated

PS I still think these timers are in FullTriviabot65 --- am i right?
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Tue Apr 11, 2006 3:50 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Apr 11, 2006 6:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Apr 12, 2006 5:47 am    Post subject: Reply with quote

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:
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:

   }
  }
 }
}
close $f

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Wed Apr 12, 2006 7:37 am    Post subject: Reply with quote

Thanks very much for your help. We will check this out Smile
Back to top
View user's profile Send private message Visit poster's website
Swift
Voice


Joined: 09 Apr 2006
Posts: 27
Location: UK

PostPosted: Wed Apr 12, 2006 4:22 pm    Post subject: Reply with quote

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
}
}
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 4:34 pm    Post subject: closing braces Reply with quote

Sir_Fz gave it to you correctly, you need four (4) closing braces before 'close', like this:
Code:
 pushmode $triviachannel +v $nick
}
}
}
}
close $f
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 -> Eggdrop Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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