Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.02 KB | None | 0 0
  1. namespace eval template2 {
  2.  
  3. setudef flag no[namespace tail [namespace current]]
  4.  
  5. variable timer 10
  6. variable pbind 1
  7. variable clock 0
  8.  
  9. foreach bind {тест} {bind pub - $::gprefix(1)$bind [namespace current]::pub
  10.  
  11. proc pub {nick host hand chan text} {
  12. variable timer; variable clock
  13. if {$chan != $nick && [channel get $chan no[namespace tail [namespace current]]]} {return} else {set lastbind $::lastbind}
  14. if {[expr [clock seconds]-$clock] < $timer} {putserv "[expr {$nick == $chan ? "PRIVMSG":"NOTICE"}] $nick :Команда недавно запрашивалась. Повтори попытку через [expr $timer-([clock seconds]-$clock)] сек."; return}; set clock [clock seconds]
  15. set users [chanlist $chan]
  16. foreach "*Митхун_Чакраборт*" [chanlist $chan] {
  17. set test [lreplace $users [lsearch $users "*Митхун_Чакраборт*"] [lsearch $users "*Митхун_Чакраборт*"] "Митхун_Чакраборти"]
  18. set files [open data/myfile.txt w+]
  19. puts $files $test
  20. close $files
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement