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.

Fatal errors who totally messed up my bot :/

Old posts that have not been replied to for several years.
Locked
C
Caribou
Voice
Posts: 28
Joined: Thu Apr 15, 2004 12:51 pm
Location: France

Fatal errors who totally messed up my bot :/

Post by Caribou »

Hello guys :)

Well i just launched my bot 2days ago on a shell, hes still in tryout but i fixed many bugs, i have to thanks your guys cause if i made it, it was with your helps when i needed.

But today an ultimate bug messed up the bot, it was impossible to join him on dcc chat after this, were afk, others ops were lost, they just replaced him by an mIRC bot.

When i came back i checked on logs, and i found thoses errors :

this one is not the most important but i wanna know what does it mean ?
[13:39] Tcl error [pub:ans]: list element in quotes followed by "<" instead of space

there are those errors who crashed the bot
[13:44] Tcl error [pub:ans]: couldn't open "data.txt": too many open files
[13:44] couldn't open "modules-1.6.15/oline.so": too many open files

then someone tried a command like a "Reset"
[13:57] Tcl error [pub:erase]: can not find channel named "couldn't open "data.txt": too many open files"

then some internal errors of the eggdrop, in french
[14:00] ERREUR pendant l'écriture de la liste utilisateurs.
* Error cannot write user list
[15:36] Echec de la tentative de TELNET en cours (Too many open files)
* TELNET connection failed (Too many open files)
[16:00] ERREUR pendant l'écriture de la liste utilisateurs.
* Error cannot write user list

Someone tried to join him in dcc
[16:21] Warning: Can't create new socket!
[16:21] Echec de la connexion DCC: CHAT (***********)
[16:21] (Too many open files)

repeated the same errors each times they tried to connect on dcc.. :cry:

i can't understand :cry:, maybe i got some problems with opening files and "closing" them properly

Code: Select all

proc write:data { arg } {
 if {[catch {open data.txt w} fileId]} {
  close $fileId
 }
 set fileId [open data.txt w]
 puts $fileId "$arg"
 close $fileId
}
proc read:data { } {
 set fileId [open data.txt r]
 set temp [gets $fileId]
 close $fileId
 return $temp
}
Oh and sorry for my bad english (again), good luck to decrypt my text lol
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

You are opening two instances of the file when you go to write it... one with your catch clause, and then another below it... also you can't close a file that hasn't been opened due to error, so you may as well just make it:

Code: Select all

proc write:data { arg } { 
 if {![catch {set fileId [open data.txt w]}]} { 
   puts $fileId "$arg" 
   close $fileId 
  }
}
C
Caribou
Voice
Posts: 28
Joined: Thu Apr 15, 2004 12:51 pm
Location: France

Post by Caribou »

Thanks i will try this, i still don't understand why it crashed, just a little, i have so much to learn :D

Oh and i will come back if i got the same problem again, and will paste more codes of my personal script, maybe i did more mistake :mrgreen:

Thanks for your help
Locked