user1003967
user1003967

Reputation: 157

c programming Twitch IRC chat bot. Cant connect but unable to joint room to read chat. Code below

I've provided a link to the c code below. I have an additional .h file which only contains the #define username and #define OAuth values. Since there private. The .h File also contain the function prototypes.

https://pastebin.com/xg6axTzn

char *JoinRoom = "JOIN #forsen\r\n";


if(send(TwitchSock,JoinRoom,sizeof(JoinRoom),0) < 0){
printError("Error With Send");
}

I know the code works. I get logged in because i get the returned data here https://dev.twitch.tv/docs/irc/guide

I will also recieve a 5 minute ping from Twitch which i can respond pong too. However, any attempts to join a room just dont work.

Ive tried several different ways. JOIN #Room, JOIN # Room, /JOIN #Room, /JOIN # Room etc.

After i send the join command the screen does not receive anything, until i get a ping request. Anyone know what may be causing the issue?

Upvotes: 0

Views: 231

Answers (1)

Peri
Peri

Reputation: 21

I haven't looked too much into it but from what I get the request should be of this format: :<user>!<user>@<user>.tmi.twitch.tv JOIN #<channel>

https://dev.twitch.tv/docs/irc/membership#join-twitch-membership

Upvotes: 1

Related Questions