Trying to get a !followage request to work (Twitch - 04/02/16 04:35 AM
Hi, I've been trying to get this to work:
I basically know what to do with it, I just can't get it to work, for some reason. I used "Lirik" and "summit1g" just for testing purposes, I just want to see it working and display "THIS COMMAND FINALLY WORKED!" so I can move forward and complete it
Can you help me figure out what's wrong here?
Thanks!
Code:
on *:text:!followage*:#:{ ; if ((%floodage)) { return } set -u60 %floodage On .followage } alias followage { sockclose followage sockopen followage api.twitch.tv 443 } on *:sockopen:followage:{ if ($sockerr) { sockclose $sockname | halt } sockwrite -n $sockname GET /kraken/users/lirik/follows/channels/summit1g HTTP/1.1 sockwrite -n $sockname Host: www.twitch.tv sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:followage:{ if ($sockerr) { sockclose $sockname | halt } var %data sockread %data tokenize 32 %data msg # THIS COMMAND FINALLY WORKED! } on *:sockclose:followage:{ echo Door closed. }
I basically know what to do with it, I just can't get it to work, for some reason. I used "Lirik" and "summit1g" just for testing purposes, I just want to see it working and display "THIS COMMAND FINALLY WORKED!" so I can move forward and complete it
Can you help me figure out what's wrong here?
Thanks!