#Introduction
JavaBot is a lightweight Oracle Java based IRC bot for managing and manipulating IRC channels, Its goal is to make management of an IRC channel simple, along with being flexible enough to allow users to add new plugins with ease.
It was decided from the start that JavaBot should be written in Java as it is the standard teaching language in most UK universities, and therefore most users of the channels I use can add functionality to JavaBot.
JavaBot uses a plugin based architecture to allow new functionality to be easily added on at any time. It also uses a Singleton approch to core functionality to allow it to be easily interacted with by the rest of the program.
#Setup
To get all depedancies and set up default JSON file, run this command
make prep
To compile the project, run this
make compile
To execute the project, run this
make run
##Run without makefile
Make sure that the dependancies exist first and that the source has been compiled.
Dependancies needed,
Google GSON libary
https://code.google.com/p/google-gson/
javax mail libary
https://java.net/projects/javamail/pages/Home
java -cp .:bin/:gson-2.2.4.jar:javax.mail.jar core.Start
##Make commands
Make prep
- Downloads depedancies and prepares the application to make it executable.
Make clean
- Removes bin/
and cleans other installation files.
Make compile
- Compiles the code.
Make run
- Starts the program.
##Plugin setup
###Issue
The Issue plugin requires an OAuth token to be saved in auth_token.
This can be generated by running
python gen_auth.py
and inputting your GitHub username and password when prompted.
#Notes for developers
All code should conform to Oracle's code conventions and should compile for Java6 and above.
Plugins - All plugins should be placed in src/
and must use the Plugin interface, any additional classes must
be put under package addon.*pluginname*
.
#Special thanks
Thanks to SoftlySplinter, ssherar and bugsduggan for their input into the design and plugins
#Available commands
Command Structure
#<plugin_name>/<function> <args>
e.g #rep/rep XeTK
To acces help for commands you can issue commands like this
?<plugin_name>/<function>
e.g ?admin/loaded
You can also navigate Javabot's commands using contexted menu's
Which are structured like this
<bot_nickname>: <Plugin_name | Plugin_Command | Navigation_Command>
e.g Javabot: Admin
, Javabot: rep XeTK
, Javabot: root
The menu's can be navigated using the following commands.
Function | Command | Short Command |
---|---|---|
Return to previous plugin level | back | b |
Return to root of plugins | root | r |
List the current level of plugins | list | l |
Find out your current location | location | p |
Plugin | Command | Channel | Needs Admin |
---|---|---|---|
Admin | |||
~ | #admin/join | X | X |
~ | #admin/part | X | X |
~ | #admin/quit | X | X |
~ | #admin/nick | X | X |
~ | #admin/exception | X | X |
~ | #admin/reload | X | X |
~ | #admin/gitpull | X | X |
~ | #admin/cmd | X | X |
~ | #admin/loaded | X | |
~ | #admin/notloaded | X | |
Counters | |||
~ | #counters/globstats | X | |
Imgur | |||
~ | <URL> | X | |
Issue | |||
~ | #gitissue/bug | X | X |
Quote | |||
~ | #quote/add | X | |
~ | #quote/quotes | X | |
~ | #quote/quote | X | |
~ | #quote/del | X | |
Reminder | |||
~ | #reminder/remind | X | |
~ | #reminder/reminder | X | |
Rep | |||
~ | <username>[ ]<modifier> [<value>] | X | |
~ | #rep/rep | X | |
~ | #rep/info | X | |
Sed | |||
~ | s/<search>/<replacement>/ | X | |
~ | <username>: s/<search>/<replacement>/ | X | |
~ | #sed/seddropcache | X | X |
~ | #sed/seddumpcache | X | X |
Stats | |||
~ | .msgsent | X | |
~ | .lastonline | X | |
~ | .stats | X | |
StringResponse | |||
~ | .response | X | X |
Users | |||
YouTube | |||
~ | <URL> | X |