Giter VIP home page Giter VIP logo

irc-js-bot's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sagax

irc-js-bot's Issues

Factoid forced deletion response with aliases typo

Line 196 of node_modules/irc-js-bot-admin/index.coffee should probably say (changes in bold):

"I successfully deleted the factoid « #{factoid_name} » and all aliases leading to it. The deleted factoid's content was « #{factoid_content} »"

Can delete factoids that don't exist

The code has a check for this, but the generated JavaScript doesn't do what you expect. Also as proof, the currently running rivvles if you do "`del foo" will respond that it deleted the factoid "foo" with the value "undefined".

The code as it stands:

not input_data.args.trim() of @factoids

which is translated to:

!input_data.args.trim() in _this.factoids

is the same as:

(!input_data.args.trim()) in _this.factoids

but what you really want is:

!(input_data.args.trim() in _this.factoids)
not (input_data.args.trim() of @factoids)

Invalid set command regex in factoid update drops the bot off the network

Line 119 in node_modules/irc-js-bot-admin/index.coffee

RegExp throws an error if value fed to it is an invalid regex, this exception is not caught and causes the bot's connection to reset (after which it rejoins shortly).

Ex:

try {
    new RegExp("[");
} catch(e) {
    console.log(e);
}

The bot does recover/rejoin, but it might be nicer to display a response to the user indicating the regex was bad.

Admin only commands can be used by non-admins

It would seem that admin-only commands can be used by non-admins. I'm certainly not an admin, and I can create and delete factoids! This can be verified by doing stuff like "set foo = bar" "del foo" in private message to an instance of the bot.

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.