Cacao7w7

Untitled

Jul 12th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. # To subscribe to the RCS mailing list: mail [email protected] and in
  2. # BODY of message, type subscribe rcs-list
  3. #
  4. # Feel free to Email me any suggestions/bug reports/etc.
  5. #
  6. # You are free to use this TCL/script as long as:
  7. # 1) You don't remove or change author credit
  8. # 2) You don't release it in modified form. (Only the original)
  9. #
  10. # If you have a "too cool" modification, send it to me and it'll be
  11. # included in the official release. (With your credit)
  12. #
  13. # Commands Added:
  14. # Where F CMD F CMD F CMD F CMD
  15. # ------- - --------- - ----------- - ---------- - --------- - -------
  16. # Public: - N/A
  17. # MSG: - N/A
  18. # DCC: - N/A
  19. #
  20. # Public Matching: N/A
  21. #
  22.  
  23.  
  24. set autolimit(ver) "v1.02.01"
  25.  
  26. # Ésta es una lista de canales que usted quiere tener un automóvil-límite adelante. soporta canales multiples
  27. # separados por espacios.
  28. set autolimit(chans) "#Chateadores"
  29.  
  30. # Éste es el número bajo para agregar a la cuenta del cauce total para el nuevo límite ejemplo
  31. # si es 90 usuarios en linea le aumentara +7 es igual a +97 que tendra como limite
  32. set autolimit(base) 15
  33.  
  34. # Ésta es la diferencia entre el límite actual y cuenta del usuario antes
  35. # a new limit is set.
  36. set autolimit(diff) 5
  37.  
  38. # Éste es el cronómetro de activacion del autolimite, de su rebision sera en minutos, entre los chequeos. por defecto es 1
  39. set autolimit(timer) 0
  40.  
  41. proc check_autolimit {} {
  42. global autolimit
  43. foreach c [string tolower [channels]] {
  44. autolimit $c
  45. }
  46. timer $autolimit(timer) check_autolimit
  47. }
  48.  
  49. proc autolimit {chan} {
  50. global autolimit
  51.  
  52. set dochan 999
  53. foreach c [string tolower $autolimit(chans)] {
  54. if {$c == $chan} {set dochan 1}
  55. }
  56. if {$dochan != 1} {return 0}
  57. if {![botonchan $chan]} {return 0}
  58. set modes [string tolower [getchanmode $chan]]
  59. set modev [lindex $modes 0]
  60.  
  61. set count 0
  62. set num 0
  63. set limit 0
  64.  
  65. while {$count < [string length $modev]} {
  66. set ch [string index $modev $count]
  67. if {$ch == "k"} {incr num}
  68. if {$ch == "l"} {incr num
  69. set limit [lindex $modes $num]
  70. }
  71. incr count
  72. }
  73. set usercount [llength [chanlist $chan]]
  74. if {$limit > $usercount} {set ldiff [expr $limit - $usercount]
  75. } else {set ldiff [expr $usercount - $limit]}
  76.  
  77. if {$limit == [expr $usercount + $autolimit(base)]} {return 0}
  78.  
  79. if {$ldiff > $autolimit(diff)} {putserv "MODE $chan +l [expr $usercount + $autolimit(base)]"}
  80. }
  81.  
  82. timer $autolimit(timer) check_autolimit
  83. putlog "AutoLimit $autolimit(ver) by David Proper (DrN) -: LoadeD :-"
  84. return "AutoLimit $autolimit(ver) by David Proper (DrN) -: LoadeD :-"
Add Comment
Please, Sign In to add comment