Input Parser doesnt handle twitch irc well

181 views
Skip to first unread message

SonarBeserk

unread,
Jan 22, 2015, 9:32:42 PM1/22/15
to pirc...@googlegroups.com
I have a bot connecting to the irc side of twitch but one of the messages sent freaks out the input parser and seems to cause a failure.

[main] INFO org.pircbotx.InputParser - :tmi.twitch.tv 410 :Invalid CAP command
[main] ERROR org.pircbotx.PircBotX - Exception encountered when parsing line :tmi.twitch.tv 410 :Invalid CAP command
org.pircbotx.exception.IrcException: CannotLogin: Received error: :tmi.twitch.tv 410 :Invalid CAP command
        at org.pircbotx.InputParser.processConnect(InputParser.java:401)
        at org.pircbotx.InputParser.handleLine(InputParser.java:338)
        at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:386)
        at org.pircbotx.PircBotX.connect(PircBotX.java:335)

SonarBeserk

unread,
Jan 22, 2015, 9:36:31 PM1/22/15
to pirc...@googlegroups.com
Extra notes, Im using the latest development version of 2.1. The issue is also the in 2.0.1 though i can confirm.

Leon Blakey

unread,
Jan 24, 2015, 1:00:59 AM1/24/15
to pirc...@googlegroups.com
Apparently my Twitch account is still active so I went ahead and tested this.  However I can still connect and join a channel successfully so this isn't a major error. This error happens because twitch runs a custom non-standard IRC server and does not handle IRCv3 CAP. . Disable Cap with

configBuilder.setCapEnabled(false)

and the error will go away.

A more worrying issue is the lack of WHO support which means UserChannelDao is going to be empty. The new UserHostmask's mean you can still access user info but you can't look anything up. I created an issue for this and it will be fixed in the next release: https://code.google.com/p/pircbotx/issues/detail?id=230

Thanks for the report
-Leon

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

SonarBeserk

unread,
Jan 24, 2015, 1:14:23 AM1/24/15
to pirc...@googlegroups.com
Disabling use of cap seems to make none of the methods to join channels and such work anymore. I can make it connect without errors but it just ends up saying "You are in a maze of twisty passages, all alike."

SonarBeserk

unread,
Jan 24, 2015, 1:16:23 AM1/24/15
to pirc...@googlegroups.com
Could configurable cap commands be possible? Either that or a twitch compatibility class?

Leon Blakey

unread,
Feb 8, 2015, 5:02:44 PM2/8/15
to pirc...@googlegroups.com
Fixed in latest build with Revision 81963dbe53ec. Let me know if you have any problems

SonarBeserk

unread,
Feb 18, 2015, 12:51:33 AM2/18/15
to pirc...@googlegroups.com
The error is gone but ultimately I have the issue of twitch giving the me the message "You are in a maze of twisty passages, all alike." Though the bot joins the channel fine, it doesnt get any of the messages sent to the channel.

Leon Blakey

unread,
Feb 18, 2015, 1:01:20 AM2/18/15
to pirc...@googlegroups.com
Strange, it works on my end. Are you sure your joining the channel? From the TSM_TheOddOne channel on the front page right now

00:59:34.295 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :nightbot!nigh...@nightbot.tmi.twitch.tv PRIVMSG #tsm_theoddone :10kk -> That's gonna leave a mark! [stop spamming emotes] [warning]
00:59:35.562 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :brickrotter!brick...@brickrotter.tmi.twitch.tv PRIVMSG #tsm_theoddone :is pikablu4?
00:59:36.423 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :slowteddy!slow...@slowteddy.tmi.twitch.tv PRIVMSG #tsm_theoddone :HACLS
00:59:36.543 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :savemenico!savem...@savemenico.tmi.twitch.tv PRIVMSG #tsm_theoddone :oddoneRAGE
00:59:38.448 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :agentx9!age...@agentx9.tmi.twitch.tv PRIVMSG #tsm_theoddone :If it were named bird Jesus it would be destined to die too. In fact more likely to die so... Yeah
00:59:38.694 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :nightdragon5!nightd...@nightdragon5.tmi.twitch.tv PRIVMSG #tsm_theoddone :F
00:59:39.631 [0-irc.twitch.tv] [main] INFO  org.pircbotx.InputParser - :skillfultree!skillf...@skillfultree.tmi.twitch.tv PRIVMSG #tsm_theoddone :HACKS

SonarBeserk

unread,
Feb 18, 2015, 1:53:59 AM2/18/15
to pirc...@googlegroups.com

It doesnt seem to make it to joining. I connect then i get the maze message and nothing else.

SonarBeserk

unread,
Feb 18, 2015, 2:06:59 AM2/18/15
to pirc...@googlegroups.com
My apologies, ive been confused when i needed to use addAutoJoinChannel(), got so used to everything else being set in configuration I missed that method totally.

SonarBeserk

unread,
Feb 18, 2015, 2:14:37 AM2/18/15
to pirc...@googlegroups.com
However even with that in place and knowing the server is correct, password correct, ect.. and trying to connect to the channel using both # in front of the channel name and without i get the same issues. Twisty passages and no chat parsing. My bot also compalins about WHO being an unknown command.
Reply all
Reply to author
Forward
0 new messages