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.

Looking for protection Script

Old posts that have not been replied to for several years.
Locked
A
Airwave
Voice
Posts: 5
Joined: Mon Jul 21, 2003 2:03 pm

Looking for protection Script

Post by Airwave »

I'm Looking for script that provide this things: I need some protection flag for example +P , if permanent owner set this flag for user, then no one +n +m can't change flags/hosts/.-user on this user record. If anyone have such script or know any smilar scripts, please let me know !
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Re: Looking for protection Script

Post by awyeah »

Airwave wrote:I'm Looking for script that provide this things: I need some protection flag for example +P , if permanent owner set this flag for user, then no one +n +m can't change flags/hosts/.-user on this user record. If anyone have such script or know any smilar scripts, please let me know !
As you might know:
+P = +n (permanent owner)

So, +n == +n will always be true and you cannot make it NOT change flags/hosts, as +n is the highest access level in the bot and it has to be like that.

For +m maybe you can do, but I am not currently sure.
The best you can add those users to a lesser number of flags or create your own custom flags if you want specific user level access and link those flags into custom tcl scripts, so they only work on specific flags. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
A
Airwave
Voice
Posts: 5
Joined: Mon Jul 21, 2003 2:03 pm

Post by Airwave »

gh... :-? yes i mean masters only... it's my mistake :) +n is +n :lol:
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Re: Looking for protection Script

Post by YooHoo »

Airwave wrote:I'm Looking for script that provide this things: I need some protection flag for example +P , if permanent owner set this flag for user, then no one +n +m can't change flags/hosts/.-user on this user record. If anyone have such script or know any smilar scripts, please let me know !
This variable is included in the Alltools.tcl, which is distributed with every eggdrop:

ispermowner <handle>
if the given handle is a permanent owner, return 1
else return 0

Code: Select all

proc ispermowner {hand} {
  global owner

  regsub -all -- , [string tolower $owner] "" owners
  if {([matchattr $hand n]) && \
      ([lsearch -exact $owners [string tolower $hand]] != -1)} then {
    return 1
  }
  return 0
}
:mrgreen: This variable kicks ass. 'Nuff said. :mrgreen:
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Actually both are the same:

if {([matchattr $hand n])} #if the given handle is a permanent owner
ispermowner <handle> #if the given handle is a permanent owner
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

owner and permowner is not the same.. in adition to have the +n flag, perm owners are also added in the config file, with the set owner var.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Hmm.. maybe I am not sure.
Well yeah it checks the +n flag in the ispermowner proc and after that which I didn't took into notice it does a list search of a list named owners in which it tries to find the hand if it exists in the list. :roll:

So I guess, maybe yeah permowners need to have their nick added in the .conf file under the variable set owner "blabla". :wink:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

As a side note: non-permanent owners can be removed via DCC Chat by permanent owners (those defined in the "set owner" variable) and/or have their flags manipulated. Those defined cannot be "fiddled" with by any other bot user.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked