My first guess is that you forget to add oauth: in front of your OAuth token in like #84
std::string buf1 = ("PASS " + settings.oauthToken + “\r\n”);
If that’s not the problem, try logging all raw lines you get from the server and look for error messages.