egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[pub_myaccess]: can't read "out": no such variable

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
mrleaW
Voice


Joined: 14 Feb 2018
Posts: 3

PostPosted: Wed Feb 14, 2018 10:05 am    Post subject: [pub_myaccess]: can't read "out": no such variable Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 530
Location: Tennessee, USA

PostPosted: Wed Feb 28, 2018 2:08 pm    Post subject: [pub_myaccess]: can't read "out": no such variable Reply with quote

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


Last edited by SpiKe^^ on Thu Mar 01, 2018 8:56 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3455
Location: Area 51

PostPosted: Thu Mar 01, 2018 1:54 am    Post subject: Reply with quote

Psst! The pub bind is missing the command. Smile
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 530
Location: Tennessee, USA

PostPosted: Thu Mar 01, 2018 9:04 am    Post subject: Reply with quote

Thanks Caesar. Fixed above.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
mrleaW
Voice


Joined: 14 Feb 2018
Posts: 3

PostPosted: Thu Mar 01, 2018 3:56 pm    Post subject: Reply with quote

it works ! thanks alot by now my users can see where they have access. Very Happy Thanks to all!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber