Your JOIN is being acknowledged before the CAP REQs are. Delay the JOIN by a little bit.
$ openssl s_client -connect irc.chat.twitch.tv:6697 -quiet
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert SHA2 Secure Server CA
verify return:1
depth=0 C = US, ST = California, L = San Francisco, O = "Twitch Interactive, Inc.", CN = *.chat.twitch.tv
verify return:1
CAP REQ :twitch.tv/commands twitch.tv/tags
:tmi.twitch.tv CAP * ACK :twitch.tv/commands twitch.tv/tags
PASS oauth:something
NICK justinfan1
:tmi.twitch.tv 001 justinfan1 :Welcome, GLHF!
:tmi.twitch.tv 002 justinfan1 :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 justinfan1 :This server is rather new
:tmi.twitch.tv 004 justinfan1 :-
:tmi.twitch.tv 375 justinfan1 :-
:tmi.twitch.tv 372 justinfan1 :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 justinfan1 :>
JOIN #twitch
:justinfan1!justinfan1@justinfan1.tmi.twitch.tv JOIN #twitch
:justinfan1.tmi.twitch.tv 353 justinfan1 = #twitch :justinfan1
:justinfan1.tmi.twitch.tv 366 justinfan1 #twitch :End of /NAMES list
@broadcaster-lang=;emote-only=0;followers-only=-1;r9k=0;room-id=12826;slow=5;subs-only=0 :tmi.twitch.tv ROOMSTATE #twitch
:tmi.twitch.tv HOSTTARGET #twitch :gamesdonequick -
@msg-id=host_on :tmi.twitch.tv NOTICE #twitch :Now hosting GamesDoneQuick.