API Info
API
IRC Bot Nick: TokyoTosho
Channel: #tokyotosho-api
Network: Rizon / irc.rizon.net
For every torrent submission, it will send the following message separated by ASCII character 30 to the channel.
For example in mIRC, to get the torrent name, you can use $gettok($1-,5,30)
[string "Torrent"][int ID][string Type][int Type][string Name][string URL][string Size][string Comment]
Example mIRC script
on *:TEXT:*:#tokyotosho-api:{
if ($nick == TokyoTosho) {
if ($gettok($1-,1,30) == Torrent) {
var -s %id = $gettok($1-,2,30)
var -s %type_name = $gettok($1-,3,30)
var -s %type = $gettok($1-,4,30)
var -s %name = $gettok($1-,5,30)
var -s %url = $gettok($1-,6,30)
var -s %size = $gettok($1-,7,30)
var -s %comment = $gettok($1-,8,30)
echo -s msg #tokyotosho 10Release: $+(,$cat_to_color(%type),[,%type_name,]) $+(3,%name)
echo -s msg #tokyotosho 12Torrent: $+(,%url)
if ($len(%comment) == 0) {
echo -s msg #tokyotosho 10Size: %size
}
else {
echo -s msg #tokyotosho 10Size: %size $chr(124) Comment: %comment
}
}
}
}
alias -l cat_to_color {
if ($1- == 1) { return 6 }
if ($1- == 2) { return 7 }
if ($1- == 3) { return 8 }
if ($1- == 4) { return 4 }
if ($1- == 5) { return 15 }
if ($1- == 6) { return 10 }
if ($1- == 7) { return 11 }
if ($1- == 8) { return 14 }
if ($1- == 9) { return 13 }
if ($1- == 10) { return 9 }
if ($1- == 11) { return 5 }
}