JiRC v0.6 - Java IRC Bot

Published  Apr 22, 2012
Updated  Jun 17, 2012
URL 

Description

--INTRODUCTION--
JiRC is a Java-based bot client that not only mimics mIRC's built in functions to navigate within and between servers, but also out-sources events to "EventsHandler.java" allowing for developers to code in their own snippets for added functionality. I have provided details within the aforementioned file that pertains to methods designed to communicate with the currently executing thread. These methods are designed to make outputting data to the IRC server simple and easy. It does have a built-in JavaScript Engine that allows for utilization of basic JS libraries.

Commands are as followed:
- /msg (#Chan OR NICK) Message
- /notice (#CHAN OR NICK) Message
- /join (#CHAN OR #CHAN,#CHAN,#CHAN)
- /part (#CHAN OR #CHAN,#CHAN,#CHAN)
- /nick NICK
- /quit
- /mode (#CHAN OR NICK) Modes
- /js String -- Evaluates a chunk of supplied JavaScript code
- /server Server port nick password
- /close (Closes currently open PM tab)

--NEWS--
- File version and JDK association are cataloged as followed: "JiRC-VERSION-JDK." Please note that all files are reverse compatible in that they can be compiled under both JDK1.6 or JDK1.7. I simply choose to develop in JDK1.7 because it has a much stricter handle on coding techniques, which translates very well back to JDK1.6.x.

--UPDATES--

--VERSION 0.3--
- Overhauled the entire script *again* -_- Swapped most methods over to static for easier data exchange between classes. Corrected all known bugs and restructured the code for a better representation of data flow.
- Re-worked the channel detection code for a more accurate representation of your current channels.
- Can now directly access the Core.java methods from EventHandler.java providing easier access to output methods such as sendMsg() and sendNot() -- more information inside the EventHandler.java file.
- Added a JDK1.6.x compatible version of the JAR & files alike. It's not been cooperating very well with me on this computer, so let me know if something doesn't work.
- Re-constructed channel detection code again.

--VERSION 0.4--
- Renovated the Login GUI to utilize some organizing and compressing elements such as the combo box.
- Eliminated the need to supply a port, however the option is still there if you need it. (Example: irc.swiftirc.net:6667) Ports default to 6667 unless specified otherwise.
- Added Key Dispatching, therefore "Enter" will execute commands on both Login and the Client.
- All visited servers will have their entries saved and updated according to the last configuration, these will be available for selection when logging in. (Entries are updated if you've visited it before, and written if it's a first time server. This is to ensure that there are no duplicates or multiple configurations of one server.)

--VERSION 0.6--
- The client UI is finally updated and looks exponentially better than before. It sorts all your channels into tabs and directs traffic accordingly with nameless traffic being diverted to the server tab.
- Reconfigured the Javascript Evaluation code, and it now returns the evaluated data rather than disposing of it through the UI.
- While the "/msg" command still exists within the Client commands, it is no longer needed to send messages to channels, while you have a channel tab activated it maintains an active state which means whatever you type that can't be construed as a command is sent straight through to the channel as a message. So, in short, just type like you normally would on another IRC chat. :)
- Private Message data now flows into their own respective user represented tabs, and as such, I've added "/Close" that will close the currently active PM TAB. Note that it cannot close any channel tabs, this is to maintain the current channel state as much as possible.

Screenshots

Download

Filename
Size
Date
Downloads
  JiRC-v0.6-1.6.zip
37.43 KB
Jun 16, 2012
131
  JiRC-v0.6-1.7.zip
37.57 KB
Jun 16, 2012
29
  JiRC-v0.4-1.7.zip
33.38 KB
Apr 27, 2012
48
  JiRC-v0.3-1.7.zip
25.55 KB
Apr 26, 2012
15
  JiRC-v0.3-1.6.zip
21.41 KB
Apr 24, 2012
29

Comments

Sign in to comment.
Hawkee   -  Jun 17, 2012
Some nice updates. Keep up the good work! Now port it over to Android and you'll have something ;)
 Respond  
SunnyD   -  Jun 16, 2012
Updated, finally. New screen shots, and update details are in the description. Also uploaded both JDK1.6 and JDK1.7 compatible JARs and class files alike.
 Respond  
SunnyD   -  Apr 24, 2012
Thanks for the suggestions, Hawkee. I'll see if I can get around to implementing a few today some time.

--Future Updates--
- Looking at re-constructing the GUI's to support Combo Boxes that would remember input for later use.
- Also looking to incorporate Tabs for, as you suggested, both Nicklists, and maintaining a current channel state to eliminate redundant statements like /msg #chan
 Respond  
Hawkee   -  Apr 24, 2012
There we go, I got it to run. Here are some suggestions:

- Pressing enter should send the command, shouldn't have to click
- Would be nice if it maintained a current channel state so I don't need to type /msg #chan
- Window should be resizable
- Needs a nicklist
- Needs a way to save a server
- Needs to connect to multiple servers
 Respond  
SunnyD   -  Apr 24, 2012
Re-compiled the JAR and files alike in accordance with JDK1.6.x and everything checks out with no code changes, thus far anyway. I've been having a hard time getting it to connect on the lab computers, so any feedback would be nice. I can't help but think that it's the firewall here, but it could be using deprecated methods that I don't know about.
 Respond  
FreakServ   -  Apr 24, 2012
Nice work Hakee :D
 Respond  
Hawkee   -  Apr 24, 2012
You'd have to upgrade anyway. It's constantly changing.
 Respond  
SunnyD   -  Apr 24, 2012
@Hawkee I had Android SDK some time ago, but one way or another I lost it. I may look into that though, of course it'd need to be fine tuned before something as public as an Android application.
 Respond  
Hawkee   -  Apr 24, 2012
@SunnyD If you built this with Eclipse you're already halfway there. Just search Google for instructions on setting up the Android SDK within Eclipse. Then create a barebones Android template and paste your code in from this. You'll have to make a layout to contain it, but it should be a fun exercise.
 Respond  
SunnyD   -  Apr 24, 2012
I wanted to address all the bugs out before tackling the conversion over to Jdk1.6.x. However I did attempt to do so yesterday or the day before, and ended up doing more damage to my current jdk setup than good. That being said, I have some down time at school today which I can most likely work out a 1.6 compatible version. Thanks for pointing that out, I had forgotten about that. :)

@Hawkee I looked into Android a couple months back, but I wouldn't know where to start to even get started on such a project.

@thegingon It's compatible with jdk1.7.x as of right now. I'm assuming you're using jdk1.6.x which means you'd have to upgrade.
 Respond  
Hawkee   -  Apr 24, 2012
Still getting the same error, did you compile it in 1.6? Also, have you considered making this into an Android app?
 Respond  
thegingon   -  Apr 24, 2012
u have the error of main
 Respond  
SunnyD   -  Apr 23, 2012
Updated, and worked out all known bugs. May need to add another line of channel detection code to ensure false-positives don't make their way onto the list. Thinking about adding channel tabs and designated nick lists instead of the current setup which feeds all the server data through a single server window.
 Respond  
SunnyD   -  Apr 22, 2012
Yes, it was compiled under Java 1.7. I'll see if I can't get my hands on 1.6 today, and compile it all again. I do agree that 1.6 is more universal, when I jumped over to 1.7 all my previous snippets had stability errors, or deprecated methods. However, I believe it should compile in 1.6.x just fine.
 Respond  
Hawkee   -  Apr 22, 2012
Did you compile this into Java 1.7? I'm getting a ClassLoader error when I try to run the jar file. It's better to compile into 1.6 since it's more universal.
 Respond  
Hawkee   -  Apr 22, 2012
So this is a Java IRC client? Your description wasn't too clear about what this actually is.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.