1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
############## #Reop Script # ############## ############## # settings # ############## set reop(trigger) "\?" set reop(flood) "60" set reop(dellist) "1" setudef str reops setudef flag reop_flood ############## # Binds # ############## bind PUB m|m ${reop(trigger)}saveops reop:save:ops bind PUB m|n ${reop(trigger)}reop reop:do:it ############## # Code # ############## proc reop:save:ops {nick host hand chan arg} { global reop if {![channel get $chan reop_flood]} { if {[isop $::botnick $chan]} { channel set $chan +reop_flood utimer $reop(flood) [list channel set $chan -reop_flood] set reops "" foreach i [chanlist $chan] { if {[isop $i $chan]} { lappend reops $i } } channel set $chan reops $reops putserv "NOTICE $nick :Reop list saved." } else { putserv "NOTICE $nick :I need op to use this command!" putserv "PRIVMSG Q :op $chan" channel set $chan +reop_flood utimer 10 [list channel set $chan -reop_flood] } } else { return 0 } } proc reop:do:it {nick host hand chan arg} { global reop set reops [channel get $chan reops] if {$reops == ""} { putserv "NOTICE $nick :No users in reop list." return 0 } set op "" foreach i [split $reops] { if {[onchan $i $chan]} { lappend op $i if {[llength $op] == "6"} { putserv "MODE $chan +oooooo [join $op " "]" set op "" } } } if {[llength $op] != "0"} { putserv "MODE $chan +oooooo [join $op " "]" } else { return 0 } if {$reop(dellist) == "1"} { channel set $chan reops "" } } |
| Parsed for bracket errors and indented: | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
############## #Reop Script # ############## ############## # settings # ############## set reop(trigger) "\?" set reop(flood) "60" set reop(dellist) "1" setudef str reops setudef flag reop_flood ############## # Binds # ############## bind PUB m|m ${reop(trigger)}saveops reop:save:ops bind PUB m|n ${reop(trigger)}reop reop:do:it ############## # Code # ############## proc reop:save:ops {nick host hand chan arg} { global reop if {![channel get $chan reop_flood]} { if {[isop $::botnick $chan]} { channel set $chan +reop_flood utimer $reop(flood) [list channel set $chan -reop_flood] set reops "" foreach i [chanlist $chan] { if {[isop $i $chan]} { lappend reops $i } } channel set $chan reops $reops putserv "NOTICE $nick :Reop list saved." } else { putserv "NOTICE $nick :I need op to use this command!" putserv "PRIVMSG Q :op $chan" channel set $chan +reop_flood utimer 10 [list channel set $chan -reop_flood] } } else { return 0 } } proc reop:do:it {nick host hand chan arg} { global reop set reops [channel get $chan reops] if {$reops == ""} { putserv "NOTICE $nick :No users in reop list." return 0 } set op "" foreach i [split $reops] { if {[onchan $i $chan]} { lappend op $i if {[llength $op] == "6"} { putserv "MODE $chan +oooooo [join $op " "]" set op "" } } } if {[llength $op] != "0"} { putserv "MODE $chan +oooooo [join $op " "]" } else { return 0 } if {$reop(dellist) == "1"} { channel set $chan reops "" } } |