thereverend403 / foxbot Goto Github PK
View Code? Open in Web Editor NEWA highly configurable IRC bot.
License: GNU General Public License v3.0
A highly configurable IRC bot.
License: GNU General Public License v3.0
[0116] <Literally> .whois endcraft.net
[0116] <Literally> Thought the bot could do that
Please add a bot command to get the Whois info of a host.
Maybe it's my lack of imagination, but my understanding of best practices is that if I want to extend FoxBot with additional commands and functionality but still be able to easily inherit future changes then I shouldn't fork the code, I should utilize FoxBot.jar and create a new class that either creates or is a child of FoxBot and go from there.
My problem with this is that FoxBot.jar is inaccessible. I can't call the start method (why is that private, anyway?) and I can't register my own commands and listeners.
Could you please make sample java code that uses FoxBot.jar, starts it up, adds a listener, and adds a command? Making this (and the code changes required to make it work) would go a long way towards others being able to use this project.
I'd envision the sample code could be
import co.foxdev.foxbot.*;
public static void main(String[] args) {
Foxbot foxbot = new FoxBot;
foxbot.initialize(); // does everything but connect
MyCommand myCommand = new MyCommand();//MyCommand being a child of co.foxdev.foxbot.Command
foxbot.registerCommand(myCommand);
MyListener myListener = new MyListener();
foxbot.registerListener(myListener);
foxbot.start(); //initializes if not already done, then connects.
}
or maybe better yet, change your reflections property to be an array of reflections, create FoxBot.addReflections that would add to this array, and change registerListeners and registerCommands to loop through this array. Then the code simplifies to
import co.foxdev.foxbot.*;
public static void main(String[] args) {
Foxbot foxbot = new FoxBot;
foxbot.addReflections('org.foo.myextendedfoxbot');
foxbot.start();
}
I'm happy to struggle with doing these code changes myself, but first I'd like your assurance that you'd want this functionality. Do the changes I'm proposing even make sense?
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.