Profles wrong again or ....?

Bug #595221 reported by Pirre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ADCH++-PtokaX
New
Undecided
Unassigned

Bug Description

Below code only allows to have adch level op's that are equal to access.level_op all ops above that level will become master what is a bit of a problem in some scripts ...

do you think we need more no-op user levels then vip, reg, unreged ?

Current:

1755 if level == 0 then

1756 return -1 -- un-regged

1757 end

1758 if level == 1 then

1759 return 3 -- Regged

1760 end

1761 if level < access.level_op then

1762 return 2 -- VIP

1763 end

1764 if level == access.level_op then

1765 return 1 -- Operator

1766 end

1767 return 0 -- Master

below is what i use to allow adch op levels from 3 to 9 and it seems to work so far lol (posted it already before but seems expired )

 if level == 0 then
  return -1 -- un-regged
 end
 if level == 1 then
  return 3 -- Regged
 end
 if level < access.level_op then
  return 2 -- VIP
 end
 if level == 10 then
  return 0 -- Master
 end
 return 1 -- Op

Revision history for this message
ToniMontana (nformatoni) wrote :

I dont think there is something wrong with the profiles.
i use 10 profiles in adchpp-ptokax.lua and the same profiles
in all px scripts and it works like it should work.

I have there:
 if level == 0 then
  return -1 -- un-regged
 end
 if level == 1 then
  return 9 -- Regged
 end
 if level == 2 then
  return 8 -- PowerUser
 end
 if level == 3 then
  return 7 -- ViP
 end
 if level == 4 then
  return 6 -- Hero
 end
 if level == 5 then
  return 5 -- Legend
 end
 if level == access.level_op then
  return 4 -- Operator
 end
 if level == 7 then
  return 3 -- SuperOP
 end
 if level == 8 then
  return 2 -- Moderator
 end
 if level == 9 then
  return 1 -- Master
 end
 return 0 -- Hubowner

and i changed this:
add_profile(0, 'Hubowner', true)
add_profile(1, 'Master', true)
add_profile(2, 'Moderator', true)
add_profile(3, 'SuperOp', false)
add_profile(4, 'Operator', false)
add_profile(5, 'Legend', false)
add_profile(6, 'Hero', false)
add_profile(7, 'ViP', false)
add_profile(8, 'PowerUser', false)
add_profile(9, 'Reg', false)

Every script that i use works like it should work. No problems with the profiles.
Btw in which scripts do you have problems with the profiles?

Revision history for this message
Pirre (pierreparys) wrote :

ALL px scripts that use the normal px profiles have a problem with this, if you use the standard bridge lua all ADCH op's above the access.level_op become Master and receiving commands and msg's not intended for OP's

The way it works in ADCH is that access.level_op is a minimum level for beeing a OP not a fixed level and that is not respected @ this moment in the bridge and making 10 a Master is a solution and all equal or above access.level_op OP is a way one of the many lol but we need something fixed so that we dont need to edit the bridge lua file every time there is an update .... or just say no there is only 1 OP level in ADCH and thats access.level_op what imho is a bit ....

The solution as posted gives the user the possibility to edit his access.lua and set any level for minimum op level has he likes and all equal or above (-10) will become OP in px and all below he can do with what he wants :)

Revision history for this message
Pirre (pierreparys) wrote :

Just a last try :) and this time a patch file included, hope its the correct format

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.