thcserv.disabled (2108B)
1 bind $::sock($::cs(netname)) pub "-" "!lag" publag 2 bind $::sock($::cs(netname)) pub "-" "!weed" pubweed 3 bind $::sock($::cs(netname)) pub "-" "!coffee" pubcoffee 4 bind $::sock($::cs(netname)) notc 77 "ping" lagresp 5 6 proc publag {cname msg} { 7 set from [lindex $msg 0 0] 8 $::maintype privmsg $::sock($::cs(netname)) 77 $from "\001PING [clock clicks -milliseconds] $cname \001" 9 } 10 11 proc pubcoffee {cname msg} { 12 switch [expr {int(rand()*4)}] { 13 0 {$::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION hands [lindex $msg 1 0] a cup of espresso\001"} 14 1 {$::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION hands [lindex $msg 1 0] a cup of Latte\001"} 15 2 {$::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION hands [lindex $msg 1 0] a cup of instant coffee\001"} 16 3 {$::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION hands [lindex $msg 1 0] a cup of cappucino\001"} 17 } 18 } 19 20 proc pubweed {cname msg} { 21 set payload [lindex $msg 1 0] 22 switch [expr {int(rand()*4)}] { 23 0 { 24 $::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION packs a bowl of nugs and hands a bong to $payload\001" 25 } 26 1 { 27 $::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION rolls a joint and hands to $payload\001" 28 } 29 2 { 30 $::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION fills the hookah with dried nugs and hands to $payload\001" 31 } 32 3 { 33 $::maintype privmsg $::sock($::cs(netname)) 77 $cname "\001ACTION passes $payload the vape pen\001" 34 } 35 } 36 } 37 38 proc lagresp {from msg} { 39 set ms [lindex $msg 0 0] 40 set chan [lindex $msg 0 1] 41 set ni [tnda get "nick/$::netname($::sock($::cs(netname)))/$from"] 42 $::maintype privmsg $::sock($::cs(netname)) 77 $chan "$ni, your lag is [expr {[clock clicks -milliseconds] - $ms}] milliseconds according to your client and our measurements." 43 }