Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc ::tontime::tontime_proc {min hour day month year} {
- variable tontime
- set day [string map {Monday Понедельник Tuesday Вторник Wednesday Среда Thursday Четверг Friday Пятница Saturday Суббота Sunday Воскресенье} [clock format [unixtime] -format "%A"]]
- if {$min == "00"} {
- foreach chan [split $tontime(channels)] {
- putserv "PRIVMSG $chan :$tontime(color1)$day - $tontime(color2)$hour:$min$tontime(color1)."
- }
- }
- foreach chan [split $tontime(channels)] {
- foreach phrase [split $tontime(phrases) "\n"] {
- if {[llength $phrase]} {
- if {$hour == [lindex [split [lindex $phrase 0] ":"] 0] && $min == [lindex [split [lindex $phrase 0] ":"] 1]} {
- putserv "PRIVMSG $chan :$tontime(color3)[subst -nocommands [join [lrange $phrase 1 end]]]$tontime(color1)."
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement