I've searched everywhere for the know-how and help, but can't find it, so I am posting here in the hopes that someone can help me.
I am attempting to write my own script, basically taking over channel access from chanserv, allowing eggy to give AOP, SOP and Owner.
I've done everything (including auto-op on join) by myself, but now what I want is the ability to list users (or actually user records) that have specific eggy modes (like m n and o).
I know it involves the match command because I can get what I want in the party line, and if I have to, I can just stick with that, but I would like to have a public command for it.
Here is an example of the command:
!list aop - displays a list of all user records with the o mode
!list sop - displays a list of all user records with the m mode
!list owner - displays a list of all user records with the n mode
The output doesn't have to be fancy, just nick and host.
foreach user [userlist #channel |(n for owner, m for sop, o for aop, nmo for all)] {
#for aop
if {[matchattr $user |o #channel] && ![matchattr $user |n #channel] && [matchattr $user |m #channel]} {
# user has aop access
}
#for sop
if {[matchattr $user |m #channel] && ![matchattr $user |n #channel]} {
# user has sop access
}
#for owner
if {[matchattr $user |n #channel]} {
# user has owner access
}
}
Thanks Tosser^^... After looking over some other posts in the forum as well as this one, I've made a list that works, but I'd like the output to be a bit different.