Code: Select all
set exemptlist [list]
foreach nickchan $autovoice(dvexempt) {
lappend exemptlist $nickchan
}
if {[llength $exemptlist] > 0} {
foreach nickchan $exemptlist {
if {[string equal -nocase [lindex [split $nickchan :] 0] $user] && [string equal -nocase [lindex [split $nickchan :] 1] $chan]} {
set exempt 1; break
}
}
}
Reading the logic behind this code, it appears $nickchan wants to have a colon delineated setting,
nick:#chan, whereas your merely using nick...This will never fit the evaluated IF statement, meaning exempt can never be set afterwards as a result...
Code: Select all
### UNACTIVE-CHATTER (DEVOICE) EXEMPT NICKS ###
#Set the list of nicks here which you would like to be exempted from being
#devoiced by the script. Place separate each entry by placing it in a new line.
################################################################################
#If you do not have any nick to exempt, then: set autovoice(dvexempt) {}
set autovoice(dvexempt) {
nick1:#channel1
nick2:#channel2
nick3:#channel3
}
Notice how the script was before you made your modifica..correction, before you mangled it and destroyed it?
Below is code to correct this limitation and allow nicknames to be referenced globally instead of as tied to channel names.
Code: Select all
in proc autovoice:users, change:
if {[string equal -nocase [lindex [split $nickchan :] 0] $nick] && [string equal -nocase [lindex [split $nickchan :] 1] $chan]} {
into:
if {[string equal -nocase $nickchan $nick] || ([string equal -nocase [lindex [split $nickchan :] 0] $nick] && [string equal -nocase [lindex [split $nickchan :] 1] $chan])} {
in proc autovoice:devoice:idlers, change:
if {[string equal -nocase [lindex [split $nickchan :] 0] $nick] && [string equal -nocase [lindex [split $nickchan :] 1] $chan]} {
into:
if {[string equal -nocase $nickchan $user] || ([string equal -nocase [lindex [split $nickchan :] 0] $user] && [string equal -nocase [lindex [split $nickchan :] 1] $chan])} {
Code: Select all
set autovoice(avexempt) {
nick5
nick7:#channel2
nick8:#channel3
}
set autovoice(dvexempt) {
nick1
nick2:#channel1
nick3:#channel2
nick4
}
In the above example, with the IF handlers
both changed as mentioned above, the result of this would be:
for autovoice exemption, nick5 is never voiced globally, nick7 does not get voiced in #channel2, nick8 does not get voiced in #channel3.
for devoice exemption, nick1 is never devoiced globally, nick2 is not devoiced on #channel1, nick3 is not devoiced on #channel2, nick4 is never devoiced globally.
...and since
awyeah has left the building so to speak, it's fine if we tamper with his script in his absense.