Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building an IRC bot in Java

Tags:

java

sockets

irc

After some googling an obvious answer or starting point for a Java IRC bot has not presented itself, my question; is there an existing framework to help me do build an IRC bot? Failing that, is this possible using Sockets in Java to do this and has anyone seen an example around the web?

cheers guys.

like image 204
Waltzy Avatar asked May 01 '10 15:05

Waltzy


People also ask

How do you make an IRC bot?

You'll need to get the following information in order to connect successfully to the network. Port: In most cases, this is 6667, but if you're not sure, check your own IRC client or the network's website. Nickname: The nickname your bot should use. Keep in mind some special characters are usually not allowed (@#!~).

What do IRC bots do?

IRC bots are used to maintain the activity of a channel presenting itself as an always connected or available user in a chat room/channel. They are not as interactive as humans but can respond to queries using pre-fed replies defined by the bot developer.

What is PircBot?

PircBot is a Java IRC Bot Framework that allows you to create your own custom IRC bots quickly and easily.


2 Answers

  • PircBot
  • IRClib
like image 125
gammelgul Avatar answered Oct 18 '22 17:10

gammelgul


  • SilverTrout has many, but simple plugins. Similar approach as PircBot, only pluggable.
  • IRClib
  • IRC-API - Mavenized. I haven't tried. Seems to be quite well designed. Documentation and javadocs can be found on the main page.
  • ThimBot by David Lloyd, JBoss.
  • PircBot is the most famous and probably most used, but suffers from hevay design misconceptions and uses several antipatterns. Only use for really simple bots.
  • PircBot' is a PircBot revival by David Lazar, adds some features, mainly SSL.
  • PircBot 1.7 by me. Mavenized. I've partly got rid of the God-object antipattern and changed logging to Slf4j / Log4j, plus some minor additions.
  • PircBotX is a re-implementation of PircBot. I haven't used it in a project (yet), but looks good; I want to migrate JawaBot to it.

  • JawaBot 2.x is a pluggable standalone application with IRC and web UI which aims to put multiple functionalities under one bot, while still keeping the structure of the code sane. Mavenized.
    Currently, there are few plugins:

    • Jira - resolves name, status and assignee from a Jira issue tracker. Configurable. Default config supports opensource repos: JBoss, Codehaus, Apache and others.
    • Logger - logs IRC events to a DB. Has a web UI.
    • Reservation - for reservation of resources over IRC. Has a web UI.
    • WhereIs - looks for nicks in all channels, supports wildcards.
    • Messenger - delivers messages to users which are offline when they connect ("answering machine").
    • PasteBin - let's user paste text through PM, saves it, and posts a link to a web UI to the channel.
    • AutoOp - gives op to users.
    • Social - reacts to "Hi!" etc. Kind of Hello World plugin.
    • JBoss AS Management plugin - allows users to connect to JBoss AS 7 / EAP 6 / WildFly and send CLI commands.
like image 45
Ondra Žižka Avatar answered Oct 18 '22 17:10

Ondra Žižka