This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Bind console flag to masters only

Old posts that have not been replied to for several years.
Locked
N
Nik
Voice
Posts: 18
Joined: Sun Jan 27, 2002 8:00 pm
Location: Sweden

Bind console flag to masters only

Post by Nik »

Is it possible to bind a console flag so that only people with a certain flag can use it.
Like the console flag +m....can I bind it so that only masters (+m|+m) can set this and not ops (+o|+o), and if so, how do you do it?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You can simply start using flags, that don't exist, without any hastle.

You would have to use eggdrops flag matching system, to test if a user has the required flags, to perform somthing.

One method is to do this int he bind command
bind msg o|oD trigger command
Global ops, channel ops and +D channel uysers can use this command.

The other way is to do in script matching, using the "matchattr" command.

Only users with channel or global +m can change a users flags, with the .chattr command.

channel +m can only set the channel glags, and global can set any.

It all depends how you want to do things.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I have seen an tcl that used the bind filt to reduce the access to some commands of the bot users on the party line. Here is an example of this..

set allowed "You"

bind filt - ".+host" +host:check

# +host
proc +host:check {idx args} {
global allowed
set usernick [idx2hand $idx]
if {[lindex $args 1] == ""} {
set icmd [lindex $args 0]
set args "$icmd "
}
if {[lsearch -exact [string tolower $allowed] [string tolower $usernick]] == -1} {
putdcc $idx "What? You need '.help'"
} else {
return $args
}
}

Hope this helps..
Once the game is over, the king and the pawn go back in the same box.
Locked