Code: Select all
set clink_botnicks {"JiN0" "NihARikA"}
set clink_onchan(#cricket@CuteBangla) "NihARikA"
set clink_onchan(#Cricinfo@StarLink) "JiN0"
set clink_onchan(#bangladeshcricket@StarLink) "JiN0"
set clink_relayto(#Cricinfo@StarLink) {"#cricket@CuteBangla"}
set clink_relayto(#bangladeshcricket@StarLink) {"#cricket@CuteBangla"}
set clink_usecolor 1
set clink_relaynet 0
set clink_add {4,1Live Cricket Commentary By CuteBangla }
set clink_charmsgs {"[4" "]12"}
bind pubm - * clink_chanpubm
bind topc - * clink_topc
bind bot - clink clink_botdat
# Colors settings (Default: mIRC style)
if {$clink_usecolor == 1} {
set clink_color(pubm) ""
set clink_color(topc) ""
} else {
set clink_color(pubm) ""
set clink_color(topc) ""
}
# Done
# Check current configuration
if {${botnet-nick} == ""} {
set {botnet-nick} $nick
putlog "Cricket.tcl: Warning: botnet-nick not defined in .conf file, using "$nick"."
}
if {[lsearch $clink_botnicks ${botnet-nick}] == -1} {
die "Cricket.tcl: Fatal: Bot "${botnet-nick}" not defined in clink_botnicks. Please edit Cricket.tcl and check your configuration."
}
if {$network == "unknown-net"} {
putlog "Cricket.tcl: Warning: network not defined in .conf file, using "unknown-net"."
}
# Done
proc clink_botsend {chan param} {
global clink_onchan {botnet-nick} network clink_relayto
foreach clink_relaychan $clink_relayto($chan@$network) {
if {[lsearch -exact [bots] $clink_onchan($clink_relaychan)] == -1} {
putlog "Cricket.tcl: Warning: bot $clink_onchan($clink_relaychan) not linked."
} else {
putbot $clink_onchan($clink_relaychan) "clink $chan $network $param"
}
}
}
proc clink_chanpubm {nick uhost hand chan text} {
global clink_onchan network
if {[info exist clink_onchan($chan@$network)]} {
clink_botsend $chan [concat "pubm" [clink_cleannick $nick] $text]
}
}
proc clink_botdat {bot clink param} {
global clink_relaynet clink_color clink_charmsgs clink_relayto clink_add network
if {$clink_relaynet == 1} {
set clink_network "\[[lindex $param 1]\] "
} else {
set clink_network ""
}
if {[lrange $param 5 end] != ""} {
set reason "\([lrange $param 5 end]\)"
} else {
set reason ""
}
set clink_destchan [lindex [split [lindex $clink_relayto([lindex $param 0]@[lindex $param 1]) [lsearch -glob $clink_relayto([lindex $param 0]@[lindex $param 1]) "*@$network"]] @] 0]
switch [lindex $param 2] {
pubm { putserv "PRIVMSG $clink_destchan :$clink_network$clink_color(pubm)[lindex $clink_charmsgs 0][lindex $param 3][lindex $clink_charmsgs 1] [lrange $param 4 end]" }
topc { putserv "NOTICE $clink_destchan :$clink_network$clink_color(topc)[lindex $clink_charmsgs 0][lindex $clink_add][lindex $clink_charmsgs 1] [lrange $param 4 end]" }
default { die "Cricket.tcl: Warning: unknown action type "[lindex $param 2]" for [lindex $param 0]." }
}
}
proc clink_cleannick {nick} {
if {[string range $nick 0 0] == "\{"} {
set nick "\\$nick"
}
return $nick
}
proc clink_topc {nick uhost hand chan text} {
global clink_onchan network
if {[info exist clink_onchan($chan@$network)]} {
clink_botsend $chan [concat "topc" [clink_cleannick $nick] $text]
}
}
putlog "Loaded Relay Script for Cricket: Sumit Awal"
Alchera wrote: The whole point of forums (this one in particular) is sharing! Using code tags post your code so others that may be interested can also use it.
NiGHtWoLF wrote:hmmm ..
but how can this script get the commentry ?!
there's no WEB add on here :S !
can u brief Cutebangla plz ..
NiGHtWoLF wrote:hmmm ..
but how can this script get the commentry ?!
there's no WEB add on here :S !
can u brief Cutebangla plz ..
iamdeath but how do u use to color nick with diffrent colors afor diffrent matches and "how do you make BOLD in FOUR or SIX or OUT."iamdeath wrote: Well there is a network called Starlink: irc.cricket.org and the channel is #Cricket the official channel for http://www.cricinfo.com/ (World's No: 1 Cricket website). They play Live Ball-by-Ball Cricket Commentary of each match. This is the best source for any guy to show Cricket Live at his Network. So the tcl he pasted will have 2 bots, 1 will be at Starlink and the other will at any xyz network. Both will be connected and when there is a match, it's on .. Bingo!.
Alchera, its not about Colour and formatting codes, i was talking about iamdeath's channel relay script where some Special word use to have different or some words got changed and if 1st Nick shows blue in color then 2nd maybe green when relaying. iamdeath use that script in #cricket channel of dal and Undernet also :pAlchera wrote:Colour and formatting codes
Well I'd love to do that for you, but I will not share my Live Cricket commentary Code with anyone.CuteBangla wrote:iamdeath but how do u use to color nick with diffrent colors afor diffrent matches and "how do you make BOLD in FOUR or SIX or OUT."iamdeath wrote: Well there is a network called Starlink: irc.cricket.org and the channel is #Cricket the official channel for http://www.cricinfo.com/ (World's No: 1 Cricket website). They play Live Ball-by-Ball Cricket Commentary of each match. This is the best source for any guy to show Cricket Live at his Network. So the tcl he pasted will have 2 bots, 1 will be at Starlink and the other will at any xyz network. Both will be connected and when there is a match, it's on .. Bingo!.
iamdeath i know you did it in yours
hope you will share it as an OP status User of this forum and one of the most oldest user of this forum
Do you know the concept of Open Source at all?iamdeath wrote: but I will not share my Live Cricket commentary Code with anyone.