I want to create a bot, just for my curiosity. And i want to send message to Twitch chat, but I can connect, join a channel, but when i send message nothing is display on Twitch Chat. And my send
doesn't return an error, so i don't understand.
bool IrcBot::sendData(std::string msg) {//Envoie des donnees
int len = msg.length();
int bytes_sent = send(s, msg.c_str(), len, 0);
cout << "Data sent : " << msg;
if (bytes_sent == -1 || bytes_sent == 0) {
return false;
else
return true;
}
Where msg
= PRIVMSG #channel :Test\r\n