This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-02-23 16:00:20

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

The Reaper: Java IRC Bot

Overview
The Reaper is a little Java IRC Bot I made last night and some of this morning.  It has several features, and speaks only when addressed (messages starting with @thereaper).

Commands
Commands all follow the same format which is:

Code:

@thereaper #<COMMAND> [args]

Existing commands are:

- EXEC <COMMAND>: causes the bot to do <COMMAND> on the IRC server.
- CALC <NUMBER1> <OPERATION> <NUMBER2>: calculates the expression.  (I may have used this on my math homework.  That's allowed, though, because my homework has to do with 30-60-90 triangles.)
- OP <USER>: tries to make <USER> op in the channel.
- DEOP <USER>: tries to take op status from <USER> in the channel.
- GRANT <USER> <PERMISSION>: grants said permission to said user.
- REVOKE <USER> <PERMISSION>: revokes said permission from said user.
- CHAN <CHANNEL>: moves the bot to said channel.
- TELL <USER> <MESSAGE>: sends a private message to <USER>.
- HELP: displays the help text.

All commands can be used from the console simply by doing

Code:

<COMMAND> [args]

Permissions
No permissions are granted by default.  Console has all permissions no matter what.

* - Permission to do anything.  Overrides all else.
thereaper.exec - Allows you to use the EXEC command.
thereaper.calc - Allows you to use the CALC command.
thereaper.perm - Allows you to change permissions.
thereaper.op.give - Allows you to use the OP command.
thereaper.op.take - Allows you to use the DEOP command.
thereaper.chan - Allows you to use the CHAN command.
thereaper.tell - Allows you to use the TELL command.

Command line arguments
This program should be executed like so:

Code:

java -jar "TheReaper.jar" [args]

If no arguments are provided, it will connect to GeonoCraft IRC with the username TheReaper.  If four arguments are provided they will be treated as server, port, nickname, and channel.  If six arguments are provided they will be treated as server, port, nickname, username, password, and channel.  No authentication will be used in any of the above cases.  If eight arguments are provided, they will be treated as server, port, nickname, username, password, channel, authentication type (NICKSERV/PASS/AUTH), and whether or not to authenticate (true/false).  Auth is not supported yet, so nothing will happen.  It is not supported because I have no idea how it works, so if anyone knows, that would be helpful.

Download
Download: http://www.thegt.org/ircbots/TheReaper.jar


http://i.imgur.com/BAEgGDL.png

Offline

 

Board footer