Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. proc ::tontime::tontime_proc {min hour day month year} {
  2. variable tontime
  3.  
  4. set day [string map {Monday Понедельник Tuesday Вторник Wednesday Среда Thursday Четверг Friday Пятница Saturday Суббота Sunday Воскресенье} [clock format [unixtime] -format "%A"]]
  5.  
  6. if {$min == "00"} {
  7. foreach chan [split $tontime(channels)] {
  8. putserv "PRIVMSG $chan :$tontime(color1)$day - $tontime(color2)$hour:$min$tontime(color1)."
  9. }
  10. }
  11. foreach chan [split $tontime(channels)] {
  12. foreach phrase [split $tontime(phrases) "\n"] {
  13. if {[llength $phrase]} {
  14. if {$hour == [lindex [split [lindex $phrase 0] ":"] 0] && $min == [lindex [split [lindex $phrase 0] ":"] 1]} {
  15. putserv "PRIVMSG $chan :$tontime(color3)[subst -nocommands [join [lrange $phrase 1 end]]]$tontime(color1)."
  16. }
  17. }
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement