Terminus-Project / Terminus-Bot

A scriptable IRC bot written in Ruby.
http://terminus-bot.net/
Other
38 stars 18 forks source link

Fix reload break #61

Closed ghost closed 10 years ago

ghost commented 10 years ago

Currently, if the reloader encounters a syntax error or something that makes it unable to load at all, it will suddenly tell you that the script does not exist. Nothing can fix this except restarting the entire script, which is annoying to have to reboot and then identify on all servers it is on. Example:

<+Pixels> ;reload doggy
<+Dalek> Pixels: Failed to reload doggy: Problem loading script doggy: scripts/doggy.rb:131 words words words...
<+Pixels> ;reload doggy
<+Dalek> Pixels: Failed to reload doggy: Cannot reload: No such script doggy

I find this to decrease productivity intensely, and this needs to be fixed ASAP

ori-sky commented 10 years ago

After a script fails to reload, you should use load instead of reload.

<+Pixels> ;reload doggy
<+Dalek> Pixels: Failed to reload doggy: Problem loading script doggy: scripts/doggy.rb:131 words words words...
<+Pixels> ;reload doggy
<+Dalek> Pixels: Failed to reload doggy: Cannot reload: No such script doggy
<+Pixels> ;load doggy
<+Dalek> Pixels: Failed to load doggy: Problem loading script doggy: scripts/doggy.rb:131 words words words...
kabaka commented 10 years ago

@shockkolate is correct. Closing this issue.