GithubHelp home page GithubHelp logo

archseer / scarlet Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 2.0 672 KB

Scriptable IRC bot framework. Full support for modern irc features: login tracking, SASL, SSL, DCC, CAP extensions

Ruby 100.00%

scarlet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bawng togaurav

scarlet's Issues

Formalize plugins

I started a plugin system, but heaven knows, ITS A MESS, I'm braindead when it comes to architecture.

Currently the plugins are attached to the Handler module, I'd like if we could just spawn an instance of the bot and attach plugins to that so we didn't have so many singletons.

Plugins are meant to remove the clutter from the handle and command modules.

convert command is broken

Because the upstream api is down at the moment (for the past few months).

We'll need a new currency api, I wonder if google has a free one

Not reconnecting after a ping quit

This happened today:

[21:08:08]  < PING chat.freenode.net
[21:08:39]  < QUIT :Ping timeout
[21:08:39]  < 

And Scarlet never reconnected afterwards

Stop using Log.write

Sad discovery after using multiple servers for the first time, Logs are shared across servers.
THIS IS A NO.

So, we'll need a logs attribute on servers which contain a LogPool (maybe I should consider renaming that to LogBuffer)

In addition I believe times should be stored in ISO format instead of integers, so timezones remain intact

Throttle `send`

For networks like freenode, we need to throttle the bots send rate.

Some ideas where to use a EM.defer with a EM::ThrottledQueue to push the data over time.
Another idea was to use a continous EM.add_timer recursion to push the messages.

Add a `time in` command

Sometimes we need the time for a location, sadly our current time command only returns the time for a user who had set his/her timezone, not very useful in all cases.

IRC colors are broken.

Nothing much to say here, irc colors will break with UTF-8, I have no idea how to fix this.

Add Scarlet Nick

This so we can do things like @time for :you or @time for Scarlet

Add a `rubygems` command

Because sometimes you wanna find a gem, besides we have a github command set, why not gems, IT IS A RUBY BOT.

Parsing MODE

Parsing User and Channel modes is a horror. Why? The MODE message used for setting both public user modes, private user modes AND channel modes is the same. To make it even worse, you can set both public user modes and channel modes in the same message. And to make us wonder "what the heck were they thinking?", the format then is a mixture of both. Example:

<< MODE #bugs +i
>> :[email protected] MODE #bugs +i 

This is a channel mode message. It sets the i flag on the channel.

<< MODE #bugs +v Speed
>> :[email protected] MODE #bugs +v Speed 

This is a public user mode message. You can tell it's public, because the prefix is the hostmask of the user that sent it. Private modes have a server hostmask prefix. It sets the v flag on the user.

<< MODE #bugs +vim Speed #bugs #bugs
>> :[email protected] MODE #bugs +miv Speed

This is a mixed message. it gets converted on the server. The annoying thing is that the first two flags mi apply to the #bugs, while the v applies to Speed. IRC software needs to implement per-flag parsing logic or something to handle a case like this.

This needs to be implemented in Scarlet.

EM::HttpRequest callbacks fall through command rescue

Since EM::HttpRequest are async and their callbacks can happen anytime after the block leaves, we can't catch the errors that are produced.
This is easy to reproduce, just try one of the existing commands that use http_request, when it fails, it crashes the entire bot.
One idea is to wrap the callbacks in a safe callback, which will catch the errors and reply.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.