Building an IRC bot in Java

*爱你&永不变心* 提交于 2019-12-12 08:40:02

问题


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.


回答1:


  • 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.



回答2:


  • PircBot
  • IRClib



回答3:


A recent IRC API project written in Java and has (a)synchronous programming model. It also supports saving the IRC server state, and SSL. Check it out!

  • IRC-API


  • 来源:https://stackoverflow.com/questions/2750422/building-an-irc-bot-in-java

    标签
    易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!