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.

bot quits

Old posts that have not been replied to for several years.
Locked
d
dropman
Voice
Posts: 15
Joined: Fri Mar 21, 2003 3:55 pm
Location: Latvia, Daugavpils

bot quits

Post by dropman »

Problem: I have windrop not on my pc running, and i have only ftp access to pc where the bot sits (it's windrop). So when i make mistake in may config file and upload it, after .rehash bot quits because there is some stupid error in config file, and i need to ask owner of pc where my bot is to run the bot manually. Maybe in windrop there are some settings to make bot only inform me that ther is an error in configa file, not quitting from irc :(
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

There is no option for this.

Errors in the config file are terminal, and because Tcl doesn't parse any more after the error, eggdrop is stuck and has to exit.

I sugest downloading a copy to your local computer, and testing the config file, before putting it into production.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Make a new config that contains:

Code: Select all

if {[catch {source <name of the old config>} err]} {
  putlog "Error parsing config file: $err"
} else {
  return $err
}
...it'll make the bot survive a .rehash but if you've got errors when starting the bot for the first time it might not even get on irc depending on where/what the error is.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You might want to use

Code: Select all

if {[catch {source <name of the old config>} err]} { 
  putlog "Error parsing config file: $err" 
  if {![info exists _start]} {
    die "Can't continue, fatal error"
  }
} else { 
  return $err 
}
set _start ""
This will allow a rehash to work correctly, but prevent the bot from starting on initialisation.

That way, even if your bot does get on IRC, settings that mat cause potential error, can't be of issue.
d
dropman
Voice
Posts: 15
Joined: Fri Mar 21, 2003 3:55 pm
Location: Latvia, Daugavpils

bot quits

Post by dropman »

Can aomeone explain what every line in this script does ?
thanx.
Locked