Przeglądaj źródła

Update BT.AutoUpdate.tcl

added variable to shut down autoupdate completely
BLaCkShaDoW 5 lat temu
rodzic
commit
4121fd2651
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      BlackTools/Modules/BT.AutoUpdate.tcl

+ 8 - 0
BlackTools/Modules/BT.AutoUpdate.tcl

@@ -43,6 +43,10 @@ if {[catch {package require github} no_github] != 0} {
 ###
 ###
 proc blacktools:update_check {nick hand host chan type} {
 proc blacktools:update_check {nick hand host chan type} {
     global black
     global black
+if {$black(update_on) == 0} {
+    blacktools:tell $nick $host $hand $chan $chan autoupdate.49 ""
+    return
+}
     set check_addons [blacktools:check_addons $hand $chan]
     set check_addons [blacktools:check_addons $hand $chan]
 if {$check_addons == 0} {
 if {$check_addons == 0} {
      blacktools:update_put $hand $chan 1 [list "CHECK UPDATE"]
      blacktools:update_put $hand $chan 1 [list "CHECK UPDATE"]
@@ -158,6 +162,10 @@ if {[string equal -nocase $sender "AUTOUPDATE"] && [string equal -nocase $num $l
 ###
 ###
 proc blacktools:update {hand host chan type} {
 proc blacktools:update {hand host chan type} {
     global black
     global black
+if {$black(update_on) == 0} {
+    blacktools:tell $hand $host $hand $chan $chan autoupdate.49 ""
+    return
+}
 if {[info exists black(backup_update)]} {
 if {[info exists black(backup_update)]} {
     blacktools:update_put $hand $chan 29 ""
     blacktools:update_put $hand $chan 29 ""
     return 0
     return 0