TerrordactylDesigns / boombot

Node.js powered Chat and DJ bot for Turntable.fm
http://terrordactyldesigns.github.com/boombot/
MIT License
24 stars 18 forks source link

Persistent Blacklist not saving/related errors #6

Closed tinyrsn closed 11 years ago

tinyrsn commented 11 years ago

Hiya,

Getting a lot of errors, plus the blacklist not saving to file, I believe due to the caps of the variable blacklist.

In some places it is

blacklist

and in others it is

blackList

John

TerrordactylDesigns commented 11 years ago

I'll check on it as sion as I can today. I must have merged the wrong branch since I recall that exact issue :(

tinyrsn commented 11 years ago

It's now working better but still not perfectly. It appears to not be saving to file. I have determined this by blacklisting a user:

when they come in after blacklisted, they are again booted,

however, if they come in again after being blacklisted and the bot has restarted, they are not booted.

On the intro-load-up code, I can see that there are no users in the blacklist.

This could be related to AppFog, ill do a bit of research and see if anyone else has had file saving issues!

EDIT: This is an issue with AppFog, as it runs out of a preset environment and local files are all reset! :( The only way to do it using AppFog is using a mySQL style database, so I hope that that may be a plan for the future :)

Edit 2: Appfog supports mongoDB - so im going to look into that.

Edit 3: mongoDB is complicated! :( I'll just deal with not having a persistent blacklist :)

TerrordactylDesigns commented 11 years ago

I use mongoDB on my personal bot, but have been looking for a non database persistence. Good to know this wont work on appfog. I'll check into key stores like Alfred and see if they persist hosted.

tinyrsn commented 11 years ago

Ahh right I see... I would host my bot on a VPS, which would make everything much easier, but I can't afford one at this stage. I look forward to hearing what you find.

razorruss commented 11 years ago

New version looks quite re-vamped. I'm excited to get it fully functional. Am running into blacklist errors upon 1st launch attempt. Set storage to false, perhaps my issue. Will touch base with you regarding when you have time.

TerrordactylDesigns commented 11 years ago

Can you post the error? I don't have a storage setting, so I'm confused on the set it to false.

technobly commented 11 years ago

Just a comment on the subject: I used to run a Blacklist from a database, but it's never foolproof.

Personally I think I'll stick with the hardcoded blacklist. It always works.

I would like to save to a JSON file though, for real time blacklist updates, this should be fairly error free as well once I get it going.

TerrordactylDesigns commented 11 years ago

@DubbyTT the current code uses a JSON object thats saved via Nodes 'fs' API. The original issue reported was that the file save wasnt persisting which turned out to be due to the hosting provider.

The second error listed in this thread by Russ I cannot get to duplicate and he mentions a config flag that is not in my bot. I have left this issue open to see Russ' response.

TerrordactylDesigns commented 11 years ago

Closing this issue. Cannot replicate locally, and have had no one else have this issue when ran un-hosted.