Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PircBotXJoergIssues extends ListenerAdapter {
- @Override
- public void onMessage(MessageEvent event) throws Exception {
- if (event.getMessage().equals("?quit"))
- event.getBot().sendIRC().quitServer();
- }
- public static void main(String[] args) throws IOException, IrcException {
- Configuration config = new Configuration.Builder()
- .setName("PircBotX-Reconnect")
- .setServer("irc.freenode.net", 6667)
- .addAutoJoinChannel("#pircbotx")
- .addListener(new PircBotXJoergIssues())
- .buildConfiguration();
- PircBotX bot = new PircBotX(config);
- bot.startBot();
- }
- }
- 17:38:12.763 [main] INFO org.pircbotx.InputParser - :TheLQ!~LordQuack@74-141-215-186.dhcp.insightbb.com PRIVMSG #pircbotx :?quit
- 17:38:12.764 [listenerPool0-thread5] INFO org.pircbotx.output.OutputRaw - QUIT :
- 17:38:12.815 [main] INFO org.pircbotx.InputParser - :PircBotX-Reconne!~PircBotX@74-141-215-186.dhcp.insightbb.com QUIT :Client Quit
- 17:38:12.938 [main] INFO org.pircbotx.InputParser - ERROR :Closing Link: 74-141-215-186.dhcp.insightbb.com (Client Quit)
- 17:38:12.942 [main] INFO org.pircbotx.dcc.DccHandler - Terminating all transfers waiting to be accepted
- 17:38:12.943 [main] DEBUG org.pircbotx.PircBotX - Disconnected.
- 17:38:12.944 [main] DEBUG o.p.h.m.ThreadedListenerManager - Waiting for listener org.pircbotx.impl.PircBotXJoergIssues@443f6b14 to execute event MessageEvent(channel=Channel(name=#pircbotx, channelId=fa005ce3-a4ea-43ba-928a-c03618ec7644, dao=org.pircbotx.UserChannelDao@29b7458a, bot=Version{PircBotX 2.0-SNAPSHOT, a fork of PircBot, the Java IRC bot - pircbotx.googlecode.com} Connected{false} Server{irc.freenode.net} Port{6667} Password{null}, output=org.pircbotx.Channel$1@12227539, mode=, topic=Official PircBotX Test Channel | http://pircbotx.googlecode.com/ | ?help to use TheLQ-PircBotX example bot, topicTimestamp=1365448714000, createTimestamp=0, topicSetter=TheLQ, moderated=false, noExternalMessages=false, inviteOnly=false, secret=false, channelPrivate=false, topicProtection=false, channelLimit=-1, channelKey=null, modeStale=false, modeLatch=null), user=User(bot=Version{PircBotX 2.0-SNAPSHOT, a fork of PircBot, the Java IRC bot - pircbotx.googlecode.com} Connected{false} Server{irc.freenode.net} Port{6667} Password{null}, dao=org.pircbotx.UserChannelDao@29b7458a, userId=ebcc44da-1c25-4dfb-a786-024ef1e1e6d4, output=org.pircbotx.User$1@66042959, nick=TheLQ, realName=, login=, hostmask=, away=false, ircop=false, server=, hops=0), message=?quit)
- 17:38:13.772 [main] INFO org.pircbotx.PircBotX - Shutdown has been called, closing InputParser
- ------------------------------------------------------------------------
- BUILD SUCCESS
- ------------------------------------------------------------------------
- Total time: 1:01.953s
- Finished at: Wed Jul 24 17:38:13 EDT 2013
- Final Memory: 26M/300M
- ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement