Advertisement
Guest User

Untitled

a guest
Jul 24th, 2013
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class PircBotXJoergIssues extends ListenerAdapter {
  2. @Override
  3. public void onMessage(MessageEvent event) throws Exception {
  4. if (event.getMessage().equals("?quit"))
  5. event.getBot().sendIRC().quitServer();
  6. }
  7.  
  8. public static void main(String[] args) throws IOException, IrcException {
  9. Configuration config = new Configuration.Builder()
  10. .setName("PircBotX-Reconnect")
  11. .setServer("irc.freenode.net", 6667)
  12. .addAutoJoinChannel("#pircbotx")
  13. .addListener(new PircBotXJoergIssues())
  14. .buildConfiguration();
  15.  
  16. PircBotX bot = new PircBotX(config);
  17. bot.startBot();
  18. }
  19. }
  20.  
  21. 17:38:12.763 [main] INFO org.pircbotx.InputParser - :TheLQ!~LordQuack@74-141-215-186.dhcp.insightbb.com PRIVMSG #pircbotx :?quit
  22. 17:38:12.764 [listenerPool0-thread5] INFO org.pircbotx.output.OutputRaw - QUIT :
  23. 17:38:12.815 [main] INFO org.pircbotx.InputParser - :PircBotX-Reconne!~PircBotX@74-141-215-186.dhcp.insightbb.com QUIT :Client Quit
  24. 17:38:12.938 [main] INFO org.pircbotx.InputParser - ERROR :Closing Link: 74-141-215-186.dhcp.insightbb.com (Client Quit)
  25. 17:38:12.942 [main] INFO org.pircbotx.dcc.DccHandler - Terminating all transfers waiting to be accepted
  26. 17:38:12.943 [main] DEBUG org.pircbotx.PircBotX - Disconnected.
  27. 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)
  28. 17:38:13.772 [main] INFO org.pircbotx.PircBotX - Shutdown has been called, closing InputParser
  29. ------------------------------------------------------------------------
  30. BUILD SUCCESS
  31. ------------------------------------------------------------------------
  32. Total time: 1:01.953s
  33. Finished at: Wed Jul 24 17:38:13 EDT 2013
  34. Final Memory: 26M/300M
  35. ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement