colin-aarts / irc-js-bot Goto Github PK
View Code? Open in Web Editor NEWA simple IRC bot implemented on top of IRC-js, with support for plug-ins.
License: The Unlicense
A simple IRC bot implemented on top of IRC-js, with support for plug-ins.
License: The Unlicense
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} »"
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)
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.