View previous topic :: View next topic |
Author |
Message |
mrleaW Voice
Joined: 14 Feb 2018 Posts: 3
|
Posted: Wed Feb 14, 2018 10:05 am Post subject: [pub_myaccess]: can't read "out": no such variable |
|
|
Code: |
bind pub o|o pub_myaccess
proc pub_myaccess {nick uhost hand chan arg} {
set thehand [lindex $arg 0]
if {$thehand == ""} {set thehand $hand}
foreach c [channels] {
if {[matchattr $thehand -|N $chan] == 1} {lappend out [join "${c}:Owner [getchaninfo $thehand $chan]" " "]}
if {[matchattr $thehand -|C $chan] == 1 && [matchattr $thehand -|N $chan] != 1} {lappend out [join "${c}:Master [getchaninfo $thehand $chan]" " "]}
if {[matchattr $thehand -|M $chan] == 1 && [matchattr $thehand -|C $chan] != 1 && [matchattr $thehand -|n $chan] != 1} {lappend out [join "${c}:Op [getchaninfo $thehand $chan]" " "]}
if {[matchattr $thehand -|O $chan] == 1 && [matchattr $thehand -|M $chan] != 1 && [matchattr $thehand -|m $chan] != 1 && [matchattr $thehand -|N $chan] != 1} {lappend out [join "${c}:Peon [getchaninfo $thehand $chan]" " "]}
if {[matchattr $thehand -|P $chan] == 1 && [matchattr $thehand -|O $chan] != 1 && [matchattr $thehand -|o $chan] != 1 && [matchattr $thehand -|C $chan] != 1 && [matchattr $thehand -|N $chan] != 1} {lappend out [join "${c}:Friend [getchaninfo $hand $chan]" " "]}
}
if {$out == ""} {set $out "None."}
notice $nick "Access list for \002$thehand\002."
foreach line $out {
notice $nick "[split $line " "]"
}
} |
Last edited by mrleaW on Sun Feb 25, 2018 5:39 pm; edited 1 time in total |
|
Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 638 Location: Tennessee, USA
|
Posted: Wed Feb 28, 2018 2:08 pm Post subject: [pub_myaccess]: can't read "out": no such variable |
|
|
Try this slightly modified version of that proc and see what you get...
Code: |
bind pub o|o !access pub_myaccess
proc pub_myaccess {nick uhost hand chan arg} {
set thehand [lindex [split [string trim $arg]] 0]
if {$thehand eq ""} { set thehand $hand }
if {![validuser $thehand]} {
puthelp "notice $nick :Invalid handle: $thehand"
return 0
}
foreach c [channels] {
if {[set cinf [getchaninfo $thehand $c]] ne ""} { set cinf " - $cinf" }
if {[matchattr $thehand -|N $c]} { lappend out "${c}:Owner$cinf"
} elseif {[matchattr $thehand -|C $c]} { lappend out "${c}:Master$cinf"
} elseif {[matchattr $thehand -|M $c]} { lappend out "${c}:Op$cinf"
} elseif {[matchattr $thehand -|O $c]} { lappend out "${c}:Peon$cinf"
} elseif {[matchattr $thehand -|P $c]} { lappend out "${c}:Friend$cinf" }
}
if {[info exists out]} {
puthelp "notice $nick :Access list for \002$thehand\002."
foreach line $out { puthelp "notice $nick :$line }
} else { puthelp "notice $nick :No custom channel flags for \002$thehand\002." }
}
|
_________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Last edited by SpiKe^^ on Thu Mar 01, 2018 8:56 am; edited 1 time in total |
|
Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3693 Location: Mint Factory
|
Posted: Thu Mar 01, 2018 1:54 am Post subject: |
|
|
Psst! The pub bind is missing the command.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 638 Location: Tennessee, USA
|
Posted: Thu Mar 01, 2018 9:04 am Post subject: |
|
|
Thanks Caesar. Fixed above. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
Back to top |
|
 |
mrleaW Voice
Joined: 14 Feb 2018 Posts: 3
|
Posted: Thu Mar 01, 2018 3:56 pm Post subject: |
|
|
it works ! thanks alot by now my users can see where they have access. Thanks to all! |
|
Back to top |
|
 |
|