collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: !security Levels  (Read 19854 times)

0 Members and 1 Guest are viewing this topic.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
!security Levels
« on: October 07, 2008, 05:35:55 pm »
Seems like we are still having security level problems.  The bot is not retaining what the security levels were and resetting them.

Code: [Select]
Security: Access Levels

[Security: Main Menu] [Security: Security Groups]

Org Ranks and Security Groups with Access Level SUPERADMIN

Org Ranks and Security Groups with Access Level ADMIN

Org Ranks and Security Groups with Access Level LEADER

Org Ranks and Security Groups with Access Level MEMBER
+ Org Rank President:
   Change President Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Advisor:
   Change Advisor Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Veteran:
   Change Veteran Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Member:
   Change Member Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Applicant:
   Change Applicant Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]

Org Ranks and Security Groups with Access Level GUEST

Org Ranks and Security Groups with Access Level ANONYMOUS


[Security: Main Menu] [Security: Security Groups]

There are times when no one is on in org and if the bot restarts for some reason durinng that time it will not retain what the security levels are.

Nyt
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: !security Levels
« Reply #1 on: October 07, 2008, 11:33:56 pm »
Bot version?
How many members in your org?
Are you using flexible security groups?
Are you using custom security groups?
Are you using the external script for updating your whois cache on a regular basis?
Do you have alts security on or off?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !security Levels
« Reply #2 on: October 08, 2008, 03:03:05 am »
Reply for Nyt ----------
he got SVN
he got alot of members like 500+
duno
duno
duno
on

-----------

i also have same problem and im pretty sure i know what does it i just dont know why

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: !security Levels
« Reply #3 on: October 08, 2008, 05:19:49 pm »
For org rank detection to work...

Bot must be a member of the org.
Org roster must be loaded and be in whois cache.
Whois cache must be enabled (is this even an option?)

Line 1716 of Security.php
Code: [Select]
guild = $this -> bot -> db -> select("SELECT org_name FROM #___whois WHERE nickname = '".$this -> bot -> botname."'");
This should probably be redone with a whois call.

The only way I can see the bot forgetting is if the org gov in settings is not the same as the detected org gov. This could happen when the settings module refreshes the settings cache from the database. Try disabling this refresh in the settings module maybe? If a change is detected, Security does reset all the access levels to member automatically. This is expected behavior when you change org governing forms!.

That's my best guess for now. Try commenting line 118 of Settings.php:
Code: [Select]
$this -> register_event("cron", "1hour");

If that solves the problem I'm a good guesser. :D

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: !security Levels
« Reply #4 on: October 08, 2008, 06:04:33 pm »
Whois cache must be enabled (is this even an option?)
Nope, whois cache is too integrated in the bot.

Line 1716 of Security.php
Code: [Select]
guild = $this -> bot -> db -> select("SELECT org_name FROM #___whois WHERE nickname = '".$this -> bot -> botname."'");
This should probably be redone with a whois call.
Yes, unless doing a join with some other table you never should access the whois table directly. Too much side-line intelligence in the whois core.

The only way I can see the bot forgetting is if the org gov in settings is not the same as the detected org gov. This could happen when the settings module refreshes the settings cache from the database. Try disabling this refresh in the settings module maybe? If a change is detected, Security does reset all the access levels to member automatically. This is expected behavior when you change org governing forms!.
You should have implemented some kind of hooking for settings changes!

Well, maybe I should add it now, adding a flag and a register function for callbacks isn't that much work.

Would allow me to remove some ugly checks in flexible security...

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: !security Levels
« Reply #5 on: October 08, 2008, 09:14:00 pm »
You should have implemented some kind of hooking for settings changes!

Yeah I know.  ;D

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !security Levels
« Reply #6 on: October 08, 2008, 09:56:41 pm »
after a long chat about this issue on IRC me Glara and Alreadythere came up with a solution that should fix this problem
and is Fixed in SVN :D

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: !security Levels
« Reply #7 on: October 08, 2008, 10:42:16 pm »
You should have implemented some kind of hooking for settings changes!

Yeah I know.  ;D
Never too late :P

Implemented, but not yet tested.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !security Levels
« Reply #8 on: October 09, 2008, 06:47:06 am »
I will update to svn tomarrow.  as I am pretty weak today after a procedure I went through.  it should not take all to long if this has fixed it or not since I run many org bots. 

Just a side note.  No org I ran a bot for has changed their org government. 

Nyt
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !security Levels
« Reply #9 on: October 12, 2008, 09:00:16 pm »
Ok I updated the latest svn today.  To many things were going on last week to even think about do anything with the bots I run.  I will keep an eye on it and see how things work out.  So far it seems to be working.. the orgs that have no one in it at this time of day is finding the org name correctly.

I had to go through and set all the security levels today.. so everything is set and hopefully stays now.
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !security Levels
« Reply #10 on: October 13, 2008, 06:36:45 am »
I think you all hit it on the head there.  all the little irritating problems I was having has gone away.  Thank you.
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 103
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal