Advertisement
Guest User

Untitled

a guest
Apr 5th, 2017
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.43 KB | None | 0 0
  1. proc ::topicrdm::topictime {minute hour day month year} {
  2.   set fi [open $::topicrdm::fichier(topics) r]
  3.   for { set cpt 0 } { ($cpt <= $::topicrdm::current_line) && ![eof $fi] } { incr cpt } {
  4.     set line [gets $fi]
  5.     if { $line != "" } {
  6.         putserv "TOPIC #test :$line"
  7.         break
  8.     }
  9.   }
  10.  
  11.   if { [eof $fi]} {
  12.   set ::topicrdm::current_line 0
  13.   } else {
  14.   incr ::topicrdm::current_line
  15.   }
  16.   close $fi
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement