Sock open popup - 19/03/15 10:24 AM
Hello again, I've recently been stumbling more and more to this problem. Whenever I look up a youtube video a notification pops up stating that a certificate needs to be authenticated.
Code:
on *:TEXT:!yt &:#: { if ($sock(YTube)) .sockclose YTube if (*youtube.com* iswm $2) { set %y_l $right($2,11) } else { set %y_l $2 } if ($ini(songrequest.ini,%y_l,0) == 1) { msg # This song is already in my playlist. unset %y_l } else { set %y_d 1 set %y_n $nick set %y_newb $chan sockopen -e YTube gdata.youtube.com 443 } } on *:SOCKOPEN:YTube: { sockwrite -nt $sockname GET /feeds/api/videos/ $+ %y_l HTTP/1.1 sockwrite -nt $sockname Host: gdata.youtube.com $+ $str($crlf,2) } on *:SOCKREAD:YTube: { if (!$sockerr) { sockread &sockreader if ($bfind(&sockreader,1,duration=')) { var %y_len $bvar(&sockreader,$bfind(&sockreader,1,duration='),$calc($bfind(&sockreader,1,' yt) - $bfind(&sockreader,1,duration='))).text set %y_tlen $remove(%y_len,duration=') if (%y_tlen > 360) { msg %y_newb Videos longer than 6 minutes are not allowed. } else { var %dinocoins $readini(Dinocoins.ini,$+(%y_newb,.,%y_n),dinocoins) if ($calc(%dinocoins - %y_d) > 0) { writeini -n Dinocoins.ini $+(%y_newb,.,%y_n) dinocoins $calc(%dinocoins - %y_d) writeini songrequest.ini %y_l %y_tlen %y_n 1 unset %y_* } else { msg %y_newb You do not have enough dinocoins! unset %y_* } } } } else { msg %y_newb Video could not be found. unset y_* } }