MOTD Exception, Safetly ignore it?

126 views
Skip to first unread message

Hitakashi

unread,
May 15, 2014, 12:32:55 AM5/15/14
to pirc...@googlegroups.com
I'm creating just a simple bot for TwitchTV and recently they updated their MOTD to:
=======
Looking up irc.twitch.tv
 Connecting to irc.twitch.tv ( 23199.9.250.229:6667 )
Connected. Now logging in.
CAP :Unknown command
Welcome, GLHF!
Your host is tmi.twitch.tv
This server is rather new
-
-
You are in a maze of twisty passages, all alike.
>
====== (Not part of MOTD)

Which causes an exception at the first "-"

====
[main] ERROR org.pircbotx.PircBotX - Exception encountered when parsing line
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.rangeCheck(ArrayList.java:638)
    at java.util.ArrayList.get(ArrayList.java:414)
    at org.pircbotx.ServerInfo.parse004(ServerInfo.java:113)
    at org.pircbotx.ServerInfo.parse(ServerInfo.java:106)
    at org.pircbotx.InputParser.processServerResponse(InputParser.java:709)
    at org.pircbotx.InputParser.handleLine(InputParser.java:323)
    at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:275)
    at org.pircbotx.PircBotX.connect(PircBotX.java:236)
    at org.pircbotx.PircBotX.startBot(PircBotX.java:151)
    at hitabotx.HitaBotX.main(HitaBotX.java:56)
====

Can this be safety ignored? Going back in the exception it seems to bring me to 'serverName' which I assume it tries using "-" for the Server Name. Should I just ignore this as it ... doesn't seem to cause an issue or report this on the issue tracker?

I tried my bot on Freenode and it doesn't cause this exception, so it's not something I put in the bot. (Also expecting Twitch to change the MOTD is like asking a wall to move)

Thanks!

Leon Blakey

unread,
May 15, 2014, 12:23:47 PM5/15/14
to pirc...@googlegroups.com
Twitch has a really weird non-standard IRC server. I had to fix how CAP errors are handled in Revision: f2428b4eac3a just to connect. Sending just "-" for 004 server information is defiantly not standard, fixed in Revision: 467b1ac6a3c3


--
You received this message because you are subscribed to the Google Groups "pircbotx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pircbotx+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Wagner

unread,
Feb 21, 2015, 2:09:22 PM2/21/15
to pirc...@googlegroups.com
Hey:

I'm also creating a Twitch TV bot and I am still getting the aforementioned error. I'm using PircBotX 2.0.1:

2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 002 buxdev :Your host is tmi.twitch.tv
2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 003 buxdev :This server is rather new
2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 004 buxdev :-
2015-02-21 16:11:00 ERROR PircBotX:278 - Exception encountered when parsing line
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at org.pircbotx.ServerInfo.parse004(ServerInfo.java:113)
at org.pircbotx.ServerInfo.parse(ServerInfo.java:106)
at org.pircbotx.InputParser.processServerResponse(InputParser.java:709)
at org.pircbotx.InputParser.handleLine(InputParser.java:323)
at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:275)
at org.pircbotx.PircBotX.connect(PircBotX.java:236)
at org.pircbotx.PircBotX.startBot(PircBotX.java:151)
at BuxBot.main(BuxBot.java:103)
2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 375 buxdev :-
2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 372 buxdev :You are in a maze of twisty passages, all alike.
2015-02-21 16:11:00 INFO  InputParser:96 - :tmi.twitch.tv 376 buxdev :>

Thanks

Leon Blakey

unread,
Feb 22, 2015, 4:19:27 AM2/22/15
to pirc...@googlegroups.com
You have to download the latest snapshot to fix the error. See https://code.google.com/p/pircbotx/wiki/DevVersion
Reply all
Reply to author
Forward
0 new messages