Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Add Campfire bot plugin #177

Merged
merged 1 commit into from
Jan 25, 2014
Merged

Add Campfire bot plugin #177

merged 1 commit into from
Jan 25, 2014

Conversation

andyhite
Copy link

I've been playing with Gekko a lot over the last few days and had some time to spare tonight, so I figured it might be worth slapping together a Campfire plugin for it to exercise my Node chops.

For now, the advice that it gives is just the standard "go short", "go long", or "hold" spiel because I felt like all of the additional information the irc bot gives might be unnecessary. If you think it is necessary, it's easy enough to add in.

You do need to install the Ranger package in order to get things up and running, so keep that in mind if you decide to fire this guy up.

The configuration options are pretty self-explanatory. The only one that may be of any interest is the "nickname" field, which is used to direct commands at the bot. If your bot is named "Gordon", then you could talk to it using commands like "hey gordon - give me some advice", or "I need to know what the current price is - can you tell me, Gordon?"

There is no specific format for the commands you can send to the bot - as long as the nickname and command are somewhere in the message, the bot will know what he needs to do. Also, both nickname and command are case-insensitive.

@askmike
Copy link
Owner

askmike commented Jan 25, 2014

This is great thanks!

Looks very good as is, maybe a small speed enhancement could be to go for an indexOf instead of creating a new regex object (very small detail). But this looks really good, you've used the plugin system and the code is inline with the rest of Gekko's codebase :)

The only thing left to do is add a small piece to the plugins section of the configuring gekko doc. If you want you can do it, else I'll put it on my todo.

askmike added a commit that referenced this pull request Jan 25, 2014
@askmike askmike merged commit e35e36e into askmike:localDB Jan 25, 2014
@andyhite
Copy link
Author

Awesome! I didn't expect for it to get merged so fast.

Good point about using indexOf - I'll issue another PR w/ an update for that later today. I'll also include the config docs update as well.

Gekko is a pretty awesome project - thanks for creating it! I have the localDB branch running under tmux on an micro EC2 instance - seems to be working quite well so far, and has successfully predicted the last few up / down trends. I'm keeping an eye out for other additions / improvements I can make, so you might see another pull request from me in the near future.

I'm a Ruby guy by day, but I love playing with Node whenever I have the chance.

@askmike
Copy link
Owner

askmike commented Jan 26, 2014

Great, I'll merge in your additions. I can't really test it as I don't use campfire myself but looking at the code it looks pretty solid.

If you have other additions just send a pull.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants