The Script is:
Code: Select all
## DCC KOMANDOS:
# .chanset #kanalas +/-eggtv
# .chanset #kanalas +/-eggtvcolors
# Naudojanciu skripta flagai:
set eggtv(flags) -|-
# Kanalo komanda:
set eggtv(lrt) "!lrt"
set eggtv(lnk) "!lnk"
set eggtv(tv3) "!tv3"
set eggtv(BTV) "!btv"
set eggtv(tv1) "!tv1"
set eggtv(tango) "!tango"
set eggtv(mtvlt) "!mtvlt"
set eggtv(cmd) "!tv"
set eggtv(ltv2) "!ltv2"
set eggtv(tv5) "!tv5"
# -
bind pub $eggtv(flags) $eggtv(tv5) eggtv:tv5
proc eggtv:tv5 {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "k5"
set _last "lnk"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 TV\00315,01 5 \00399,99"
} else {
set _topic "TV5"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(ltv2) eggtv:ltv2
proc eggtv:ltv2 {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "LTV2"
set _last "lnk"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 LTV\00315,01 2 \00399,99"
} else {
set _topic "LTV2"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(tv1) eggtv:tv1
proc eggtv:tv1 {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "TV1"
set _last "lnk"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 TV\00315,01 1 \00399,99"
} else {
set _topic "TV1"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(mtvlt) eggtv:mtvlt
proc eggtv:mtvlt {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "LTVLT"
set _last "lnk"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 MTV\00315,01 TV \00399,99"
} else {
set _topic "LTV2"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(lrt) eggtv:ltv
proc eggtv:ltv {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "ltv"
set _last "lnk"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,02 L\00300,02RT \00399,99"
} else {
set _topic "LTV"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(lnk) eggtv:lnk
proc eggtv:lnk {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "lnk"
set _last "tv3"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,01 L\00303,01N\00304,01K \00399,99"
} else {
set _topic "LNK"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(tv3) eggtv:tv3
proc eggtv:tv3 {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "tv3"
set _last "BTV"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 TV\00308,023 \00399,99"
} else {
set _topic "TV3"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(BTV) eggtv:BTV
proc eggtv:BTV {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "BTV"
set _last "tango"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,15 BTV \00399,99"
} else {
set _topic "BTV"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(tango) eggtv:tango
proc eggtv:tango {nick host hand chan text} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
set _first "tango"
set _last "aa"
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00301,04 Tango\00300,04TV \00399,99"
} else {
set _topic "Tango TV"
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_adv $nick $chan $_first $_last $_topic]]}
}
# -
bind pub $eggtv(flags) $eggtv(cmd) eggtv:tv
proc eggtv:tv {nick host hand chan {text ""}} {
if {[lsearch -glob [channel info $chan] "+eggtv"] > -1} {
if {[strlwr $text]=="lnk"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,01 L\00303,01N\00304,01K \00399,99"
} else {
set _topic "LNK"
}
set _get "lnk"
set _last "lrt"
} elseif {
[strlwr $text]=="lrt"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,02 L\00300,02RT \00399,99"
} else {
set _topic "LRT"}
set _get "lrt"
set _last "tv3"
} elseif {
[strlwr $text]=="tv3"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 TV\00308,023 \00399,99"
} else {
set _topic "TV3"}
set _get "tv3"
set _last "tv4"
} elseif {
[strlwr $text]=="tv4"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,15 TV4 \00399,99"
} else {
set _topic "TV4"}
set _get "tv4"
set _last "11 kanalo tv"
} elseif {
[strlwr $text]=="11k"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,06 11 Kanalo \00311,06TV \00399,99"
} else {
set _topic "11 Kanalo TV"}
set _get "11 kanalo tv"
set _last "ar tv"
} elseif {
[strlwr $text]=="artv"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 ART\00300,07V \00399,99"
} else {
set _topic "AR TV"}
set _get "ar tv"
set _last "balticum tv"
} elseif {
[strlwr $text]=="balticum"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,02 Balticum \00300TV \00399,99"
} else {
set _topic "Balticum TV"}
set _get "balticum tv"
set _last "рiauliш tv"
} elseif {
[strlwr $text]=="siauliu"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 Siauliu \00300,02 TV \00399,99"
} else {
set _topic "Siauliu TV"}
set _get "рiauliш tv"
set _last "init tv"
} elseif {
[strlwr $text]=="init"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,11 Init \00300,04 TV \00399,99"
} else {
set _topic "Init TV"}
set _get "init tv"
set _last "pan tv"
} elseif {
[strlwr $text]=="pantv"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 Pan TV \00399,99"
} else {
set _topic "Pan TV"}
set _get "pan tv"
set _last "tango tv"
} elseif {
[strlwr $text]=="tango"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00301,04 Tango\00300,04TV \00399,99"
} else {
set _topic "Tango TV"}
set _get "tango tv"
set _last "vilniaus tv"
} elseif {
[strlwr $text]=="vilniaus"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,10 Vilniaus\00300,01 TV \00399,99"
} else {
set _topic "Vilniaus TV"}
set _get "vilniaus tv"
set _last "ntv nase kino"
} elseif {
[strlwr $text]=="ntv-nasekino"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,03 NTV\00300,01 Nase Kino \00399,99"
} else {
set _topic "NTV Nase Kino"}
set _get "ntv nase kino"
set _last "ort"
} elseif {
[strlwr $text]=="ort"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,08 ORT \00399,99"
} else {
set _topic "ORT"}
set _get "ort"
set _last "rusijos tv"
} elseif {
[strlwr $text]=="rtr"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 Rusijos TV \00399,99"
} else {
set _topic "Rusijos TV"}
set _get "rusijos tv"
set _last "tnt"
} elseif {
[strlwr $text]=="tnt"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 TNT \00399,99"
} else {
set _topic "TNT"}
set _get "tnt"
set _last "lenkijos tv"
} elseif {
[strlwr $text]=="lenkijos"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00304,08 Lenkijos TV \00399,99"
} else {
set _topic "Lenkijos TV"}
set _get "lenkijos tv"
set _last "lenkijos tv2"
} elseif {
[strlwr $text]=="lenkijos2"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,04 Lenkijos TV2 \00399,99"
} else {
set _topic "Lenkijos TV2"}
set _get "lenkijos tv2"
set _last "polsat"
} elseif {
[strlwr $text]=="polsat"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,01 Polsat \00399,99"
} else {
set _topic "Polsat"}
set _get "polsat"
set _last "tv polonia"
} elseif {
[strlwr $text]=="polonia"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 TVPOL\00304,01ONIA \00399,99"
} else {
set _topic "TV Polonia"}
set _get "tv polonia"
set _last "lnt"
} elseif {
[strlwr $text]=="lnt"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 L N T \00399,99"
} else {
set _topic "LNT"}
set _get "lnt"
set _last "ard"
} elseif {
[strlwr $text]=="ard"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,12 AR\00300,02D \00399,99"
} else {
set _topic "ARD"}
set _get "ard"
set _last "dsf"
} elseif {
[strlwr $text]=="dsf"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00301,08 DSF \00399,99"
} else {
set _topic "DSF"}
set _get "dsf"
set _last "pro 7"
} elseif {
[strlwr $text]=="pro7"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,05 PRO\00304,05 7 \00399,99"
} else {
set _topic "PRO 7"}
set _get "pro 7"
set _last "rtl"
} elseif {
[strlwr $text]=="rtl"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,04 R \00300,08 T \00300,02 L \00399,99"
} else {
set _topic "RTL"}
set _get "rtl"
set _last "rtl 2"
} elseif {
[strlwr $text]=="rtl2"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 RTL II \00399,99"
} else {
set _topic "RTL 2"}
set _get "rtl 2"
set _last "sat 1"
} elseif {
[strlwr $text]=="sat1"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,12 SAT \00300,03 1 \00399,99"
} else {
set _topic "SAT 1"}
set _get "sat 1"
set _last "vox"
} elseif {
[strlwr $text]=="vox"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00301,05 V\00304,05O\00301,05X \00399,99"
} else {
set _topic "VOX"}
set _get "vox"
set _last "zdf"
} elseif {
[strlwr $text]=="zdf"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,01 ZDF \00399,99"
} else {
set _topic "ZDF"}
set _get "zdf"
set _last "bbc tv"
} elseif {
[strlwr $text]=="bbc"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,14 BBC \00399,99"
} else {
set _topic "BBC"}
set _get "bbc tv"
set _last "cnn"
} elseif {
[strlwr $text]=="cnn"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00304,14 CNN \00399,99"
} else {
set _topic "CNN"}
set _get "cnn"
set _last "discovery"
} elseif {
[strlwr $text]=="discovery"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 Disco\00315,02very \00399,99"
} else {
set _topic "Discovery"}
set _get "discovery"
set _last "eurosport"
} elseif {
[strlwr $text]=="eurosport"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 Euro\00300,04sport \00399,99"
} else {
set _topic "Eurosport"}
set _get "eurosport"
set _last "mtv"
} elseif {
[strlwr $text]=="mtv"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 M\00315,01TV \00399,99"
} else {
set _topic "MTV"}
set _get "mtv"
set _last "national geographic"
} elseif {
[strlwr $text]=="ngeographic"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00308,01 National \00315,01Geographic \00399,99"
} else {
set _topic "National Geographic"}
set _get "national geographic"
set _last "rai due"
} elseif {
[strlwr $text]=="raidue"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,05 RAI \00307,05Due \00399,99"
} else {
set _topic "RAI Due"}
set _get "rai due"
set _last "rai uno"
} elseif {
[strlwr $text]=="raiuno"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00312,12 RAI \00307,12Uno \00399,99"
} else {
set _topic "RAI Uno"}
set _get "rai uno"
set _last "travel"
} elseif {
[strlwr $text]=="travel"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00301,09 Travel \00399,99"
} else {
set _topic "Travel"}
set _get "travel"
set _last "tv 1000"
} elseif {
[strlwr $text]=="tv1000"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,02 TV \00301,08 1000 \00399,99"
} else {
set _topic "TV 1000"}
set _get "tv 1000"
set _last "tv 5"
} elseif {
[strlwr $text]=="tv5"} {
if {[lsearch -glob [channel info $chan] "+eggtvcolors"] > -1} {
set _topic "\00300,01 TV5 \00399,99"
} else {
set _topic "TV5"}
set _get "tv5"
set _last ""
} else {
putnotc $nick "\002TV Kanalai\002: LNK, LRT, TV3, TV4, 11K, ARTV, BALTICUM, SIAULIU, INIT, PANTV, TANGO,
VILNIAUS, NTV-NASEKINO, ORT, RTR, TNT, LENKIJOS, LENKIJOS2, POLSAT, POLONIA, LNT, ARD, DSF, PRO7, RTL, RTL2,
SAT1, VOX, ZDF, BBC, CNN, DISCOVERY, EUROSPORT, MTV, NGEOGRAPHIC, RAIDUE, RAIUNO, TRAVEL, TV1000, TV5. \002Rasyk !TV KANALAS\002"
return}
}
set sock [egghttp:geturl www.manotv.lt/cgi-bin/tv_now.cgi [list eggtv:get_tv $nick $chan $_get $_last $_topic]]}
# -
proc eggtv:get_adv {nick chan first last topic sock} {
set buffer [egghttp:data $sock]
egghttp:cleanup $sock
set i 399
set _found 0
while {$i<441&&$_found==0} {
set _tmp [eggtv:format [lindex [split $buffer "\n"] $i]]
if {[strlwr [lindex [split $_tmp "\>"] 1]]==[strlwr $first]} {
set _found 1}
incr i}
if {$_found==1} {
set _retline ""
set _was 0
while {$i<441&&$_was==0} {
set _tmp [eggtv:format [lindex [split $buffer "\n"] $i]]
if {$_tmp!="/dl"&&[strlwr [lindex [split $_tmp "\>"] 1]]!=[strlwr $last]} {
append _retline "$_tmp "
} else {
set _was 1}
incr i}
eggtv:msg $nick $chan $topic [eggtv:adv_format [eggtv:format $_retline]]
} else {
putnotc $nick "\002\[error\]\002 Siuo metu negaliu nustatyti ka rodo \002$topic\002."}
}
proc eggtv:get_tv {nick chan get last topic sock} {
set buffer [egghttp:data $sock]
egghttp:cleanup $sock
set i 88
set yes 0
while {$yes==0&&$i<200} {
set _line [eggtv:format [lindex [split $buffer "\n"] $i]]
set _nextline [eggtv:format [lindex [split $buffer "\n"] [expr $i+1]]]
set _mas [split "$_line" "\;"]
set _len [expr [llength $_mas]-2]
set _len2 [expr [llength $_mas]-1]
if {[strlwr [lindex $_mas $_len]]=="[strlwr $get]"} {
set yes 1
set _retline "[eggtv:first_bold [lindex $_mas $_len2]]"
if {[strlen $_nextline]<6} {
set _nextline [eggtv:format [lindex [split $buffer "\n"] [expr $i+2]]]}
set _mas2 [split "$_nextline" "\;"]
if {[strlwr [lindex $_mas2 $_len]]!="[strlwr $last]"} {append _retline " [eggtv:first_bold [lindex $_mas2 0]]"}
}
incr i}
if {$yes==0} {
putnotc $nick "\002\[error\]\002 Siuo metu negaliu nustatyti ka rodo \002$topic\002."
} else {
eggtv:msg $nick $chan $topic $_retline}
}
proc eggtv:msg {nick chan topic what} {
putquick "NOTICE $nick :--== Generated by \002AciD\002 ==--"
putquick "NOTICE $nick :--== Dabar $topic Programa ==--"
putquick "notice $nick :$what"}
proc eggtv:format {args} {
set _ret ""
for {set i 1} {$i<[expr [strlen $args]-1]} {incr i} {
set _tmp1 "[stridx $args $i]"
set _tmp2 "[stridx $args [expr $i+1]]"
if {$_tmp1!=" "&&$_tmp2!=" "} { append _ret "$_tmp1" }
if {$_tmp1!=" "&&$_tmp2==" "} { append _ret "$_tmp1"
append _ret " " }
}
set _rett ""
set was 0
for {set i 0} {$i<[expr [strlen $_ret]]} {incr i} {
if {[stridx $_ret $i]=="\&"} {set i [expr $i + 5]}
if {[stridx $_ret $i]=="\<"} {set was 1}
if {$was==0&&[stridx $_ret $i]!="\n"} {append _rett [stridx $_ret $i]}
if {[stridx $_ret $i]=="\>"} {set was 0}
}
set _ret ""
set was 0
for {set i 0} {$i<[expr [strlen $_rett]]} {incr i} {
if {[stridx $_rett $i]=="\["} {set was 1}
if {$was==0} {append _ret [stridx $_rett $i]}
if {[stridx $_rett $i]=="\]"} {set was 0}
}
return $_ret }
proc eggtv:adv_format {args} {
set _ret ""
set _tmp "[lindex [split $args "//"] 0]"
for {set i 1} {$i<[expr [strlen $_tmp]-1]} {incr i} {
if {[eggtv:number [stridx $_tmp $i]]} {append _ret "\002[stridx $_tmp $i]\002"
} else {
append _ret "[stridx $_tmp $i]"}
}
return $_ret}
proc eggtv:number {test} {
foreach i [split $test {}] {
if ![string match \[0-9\] $i] { return 0 }
}
return 1 }
proc eggtv:first_bold {args} {set _ret "\002"
set _len [strlen $args]
for {set i 1} {$i<[expr $_len - 1]} {incr i} {if {$i==5} {append _ret "[stridx $args $i]\002"
} else {
append _ret "[stridx $args $i]"}
}
return $_ret}
# -
setudef flag eggtv
setudef flag eggtvcolors
putlog "TV Script loaded"
## END
Code: Select all
-SpawN- --== Dabar TV3 rodo: ==--
-SpawN- 7.25 "Simpsonai" ("The Simpsons"). JAV. Animacinis serialas. VIII dalis. 26 s. (N-7) (k.)
-SpawN- 7.55 "Marina" ("Marina"). JAV, Meksika. 2006. Drama. Reю. David Posada. Vaidina Sandra Echeverria, Manolo Cardona, Aylin Mujica, Humberto Zurita. 12 s. (k.)
Code: Select all
-SpawN- --== Dabar TV3 rodo: ==--
-SpawN- 7.25 "Simpsonai" ("The Simpsons"). JAV. Animacinis serialas. VIII dalis. 26 s. (N-7) (k.) 7.55 "Marina" ("Marina"). JAV, Meksika. 2006. Drama. Reю. David Posada. Vaidina Sandra Echeverria, Manolo Cardona, Aylin Mujica, Humberto Zurita. 12 s. (k.)