Skip to content

A simple java library to communicate using the IRC protocol, this is mainly a showcase for a simple OOP design pattern.

Notifications You must be signed in to change notification settings

SwagiWagi/IRC-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

IRC-Java

A simple Java library for IRC, developed by SwagiWagi.

This is mainly a showcase for a simple OOP design pattern.

Usage

Create a new "IRC" object, and initialize it using the "IRCBuilder" class.
The parameters are:

String ip - The IP address to connect to.
int port - The port to connect to.
String user - What username to use when connecting to the IRC server.
String nick - What nickname to use when connecting to the IRC server.

After that, you can use the "setLogger()" method to set the output stream, the "setRealName()" method to set the real name, and the "setChannel()" method to set the channel which you want to connect to (you must put the #).
Finally, use the "build()" method to build it.
E.g: IRC irc = new IRCBuilder("your.server", 6667, "YourUsername", "YourNickName").setChannel("#abc").build();

Now you can connect using the "connect()" method.

To send a message use the "sendMessage()" method.

To send a command use the "sendRawMessage()" method.

To disconnect from the server use the "disconnect()" method.

You can set the logger again by using the "setLogger()" method.

About

A simple java library to communicate using the IRC protocol, this is mainly a showcase for a simple OOP design pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages