on *:join:#team7,#t7priv:{ if ($nick == $me) { set %rtorrent. on | .timerNEWTORRENT 1 $calc(%ttorrent. * 60) newtorrent } } alias newtorrent { sockclose torrents set %FicheiroProcura t7.txt sockopen torrents www.btuga.net 80 } on *:sockopen:torrents:{ if ($sockerr > 0) { return } sockwrite -n $sockname GET /t7.php HTTP/1.1 sockwrite -n $sockname Host: www.btuga.net sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:torrents:{ if ($sockerr > 0) { return } var %torrent sockread %torrent if ( $numtok( %torrent, 124) ) && ( *btuga* iswm %torrent ) { if ( $read( %FicheiroProcura, w, * $+ $gettok( %torrent, 3, 124) $+ *) == $null ) { if ( %torrent != %ltorrent.) { set %ltorrent. %torrent msg %ctorrent. 3..:: 12Team7 4Apresenta um Novo Torrent3 ::.. msg %ctorrent. Nome:12 $gettok( %torrent, 1, 124) msg %ctorrent. Categoria:12 $gettok( %torrent, 2, 124) msg %ctorrent. Link:12 $gettok( %torrent, 3, 124) write t7.txt $remove( %torrent, $chr(10), $chr(13)) } } } } menu channel { Team7 New Torrent .Resetar:/unset %*torrent. .- .Canal ( $+ %ctorrent. $+ ):/set %ctorrent. $?="Introduza o Canal para enviar a informação:" .Repetir ..Tempo ( $+ %ttorrent. $+ ):/set %ttorrent. $?="Introduza o Tempo em minutos:" ..- ..$iif(%rtorrent. == on,$style(1)) Activar:{ set %rtorrent. on .timerNEWTORRENT 0 $calc(%ttorrent. * 60) newtorrent echo -a :: Aviso de Novos Torrents activado. } ..$iif(%rtorrent. == off,$style(1)) Desactivar:{ set %rtorrent. off .timerNEWTORRENT off echo -a :: Aviso de Novos Torrents desactivado. } } alias pesquisar-pre { set %LineEncontrou 1 while ( $read( %FicheiroProcura, w, * $+ $3- $+ *, %LineEncontrou) ) { msg $1 Nome:12 $gettok( $read( %FicheiroProcura, $readn), 1, 124) msg $1 Categoria:12 $gettok( $read( %FicheiroProcura, $readn), 2, 124) msg $1 Link:12 $gettok( $read( %FicheiroProcura, $readn), 3, 124) msg $1 ----------------------------------------- set %LineEncontrou $readn inc %LineEncontrou } } on *:TEXT:*:#team7,#t7priv: { if ( $1 == !team7 ) { if ( !$2 ) { msg $chan Escreva !team7 nome_da_release } if ( $2 ) { msg $chan Aguarde a procurar... msg $chan Resultados enviados para o pvt! pesquisar-pre $nick $chan $2- } } }