BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6.x Custom/Unofficial modules => Topic started by: Kentarii on January 30, 2011, 12:43:18 am

Title: UserAdmin module for Bebot
Post by: Kentarii on January 30, 2011, 12:43:18 am
This module is for bebot owners who have neglected to clean up their memberlist as people have left the guild or quit the game.

It will give you an overview of how many members are in the bot's database and how many buddies the bot has among other things.

An extra feature can be enabled which will lookup which guild a character belongs to on YG, so that you can delete those who have joined another guild.

There are too many features to explain in detail here, so I guess you better check out for yourselves if you need this module.
An easy way to do that is to run this command:
Code: [Select]
!memberIf the number returned by the bot is above 1000, then yes... you probably want this module.
This module will also help you delete members who have left your guild/server/game.
The dreaded "[BUDDY-ADD] -1 error" will most likely also be "fixed" when you delete the members causing this error.

But before you even think about downloading this module, please take a backup of your bot's database. I don't want people coming to this thread crying about how they lost their member data, PERIOD.

If you don't know how to backup your database, don't bother downloading this module.
With that out of the way, here are some screenshots of what you can expect:

(http://aoc.is-better-than.tv/bebot/useradmin_help.jpg)

(http://aoc.is-better-than.tv/bebot/useradmin_command.jpg)

Note: Just shows how many members there are and what guilds they are in. Will open up the two overview pages which will let you do all the work.

(http://aoc.is-better-than.tv/bebot/useradmin_overview.jpg)

Note: All the list commands are safe to run, but some might take some time and you will probably get spammed by the bot depending on how many members there are. If the total members count match the total buddies count, that means that your member base is healthy and everyone will get notified correctly and show up in the !online command.

(http://aoc.is-better-than.tv/bebot/useradmin_guild_overview.jpg)

Note: YG doesn't always pickup which guild a character is a member of, that's why you see a lot of entries in UNKNOWN GUILD and some other guilds. By clicking on list, you can choose to delete members who you know for sure has left the guild or has quit the game.

Configuration and installation:
Please read the installation/configuration instructions in the top of the module (especially if you want to enable the YG functionality).

Download:
UserAdmin module for Bebot v0.0.5 :: 2011-02-07 :: [ phps (http://aoc.is-better-than.tv/bebot/UserAdmin.phps) | zip (http://aoc.is-better-than.tv/bebot/useradmin_module_for_bebot_v0.0.5.zip) ]
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on January 30, 2011, 12:43:48 am
*RESERVED*

F.A.Q.
Title: Re: UserAdmin module for Bebot
Post by: maikee on February 01, 2011, 07:30:56 pm
hi

nice work.
but one question.

how i can delete the anonymous(deleted) under the categorie Users?
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 01, 2011, 07:34:25 pm
Guess I can add it in the next version. It's also possible to just run an sql statement directly towards the database.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 01, 2011, 11:49:13 pm
REMEMBER TO BACKUP YOUR DATABASE!!

Here are the queries by the way:

To clear banned chars:
Code: [Select]
DELETE FROM <botname>_users WHERE user_level = -1
To clear anonymous/deleted chars:
Code: [Select]
DELETE FROM <botname>_users WHERE user_level = 0
To clear guest chars:
Code: [Select]
DELETE FROM <botname>_users WHERE user_level = 1
user_level = 2 are members, so you probably don't want to delete those.

You obviously have to replace <botname> with the appropriate prefix for your database table.

EDIT: This functionality is now added to the module in version 0.0.4
Title: Re: UserAdmin module for Bebot
Post by: RaZeR on February 02, 2011, 07:38:38 am
this is very cool. I've written something almost identical, without YG integration though, to trim down my guilds user list and bots buddies. The limit to how many buddies the bot can have is around 1000, so new members weren't being recognized by the bot because they couldn't because buddy_add was being ignored.

Thanks very much, now I don't have to use my dodgy version of it :) I'll try this tonight, looking forward to seeing the YG integration.
Title: Re: UserAdmin module for Bebot
Post by: maikee on February 03, 2011, 09:54:37 am
i have a problem.
i have cleared for example the anonymous (deleted) whois members but after a rosterupdate all anonymous members are be back in the list
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 03, 2011, 11:38:39 am
i have a problem.
i have cleared for example the anonymous (deleted) whois members but after a rosterupdate all anonymous members are be back in the list
Of course they are, they are still in the user list even if you remove them from whois list. See reply #4 which contains the SQL statements for purging the anonymous users. There are no such things as anonymous members btw. You're either a member, guest, banned or anonymous.

Anyways.. I'll add the command to remove the anonymous/banned/guest user entries soon.
Title: Re: UserAdmin module for Bebot
Post by: Yite on February 03, 2011, 12:29:06 pm
Planning to play around with this soon as it looks great.

If you're planning on future improvements on this wouldn't it be better to store
yg_enabled, yg_password, yg_guild_id, show_yg_links in a settings table kinda thing?
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 03, 2011, 01:05:57 pm
Planning to play around with this soon as it looks great.

If you're planning on future improvements on this wouldn't it be better to store
yg_enabled, yg_password, yg_guild_id, show_yg_links in a settings table kinda thing?
Yeah, good suggestion, I'll put them in the bebot settings next version.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 03, 2011, 01:48:41 pm
Version 0.0.4 is now out with clear functions for user list. Also moved the configuration part to the bebot settings table.
Run
Code: [Select]
!settings UserAdminto configure the variables needed for YG integration.

A note to those who use ConanChat... the description for the various settings contains some links which get messed up.. but I think it should work ok ingame.
Title: Re: UserAdmin module for Bebot
Post by: Getrix on February 03, 2011, 08:07:34 pm
Quote
if ($this -> bot -> core('settings') -> get('UserAdmin', 'yg_enabled')) {
            $this -> help['command']['useradmin guild list'] = "List bot's members with guild affiliation.";
            $this -> help['command']['useradmin guild refresh'] = "Refresh guild affiliation for the bot's members.";
        }

This will make you need to restart bot for it to work.
You need to move it out of __construct(&$bot) and into where its handled if its intented to have it work without restart.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 03, 2011, 08:14:01 pm
Quote
if ($this -> bot -> core('settings') -> get('UserAdmin', 'yg_enabled')) {
            $this -> help['command']['useradmin guild list'] = "List bot's members with guild affiliation.";
            $this -> help['command']['useradmin guild refresh'] = "Refresh guild affiliation for the bot's members.";
        }

This will make you need to restart bot for it to work.
You need to move it out of __construct(&$bot) and into where its handled if its intented to have it work without restart.
Ah, you're right. Thanks for the heads'up. It's just the help message, so I'll leave it for the next update.. those who want can just remove the if condition to always leave the help in.
Title: Re: UserAdmin module for Bebot
Post by: maikee on February 05, 2011, 10:54:07 am
Hi

it is possible to optimized for german language?

the german special char:

lowcase: ä, ö, ü, ß
uppercase: Ä, Ö, Ü
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 05, 2011, 11:49:48 am
Hi

it is possible to optimized for german language?

the german special char:

lowcase: ä, ö, ü, ß
uppercase: Ä, Ö, Ü
It's hard to guess, so in which lists is this a problem? Because the source of the names are from different places.
Could you test the attached file and see if it's still an issue?
Title: Re: UserAdmin module for Bebot
Post by: maikee on February 05, 2011, 12:04:54 pm
Hi

it is possible to optimized for german language?

the german special char:

lowcase: ä, ö, ü, ß
uppercase: Ä, Ö, Ü
It's hard to guess, so in which lists is this a problem? Because the source of the names are from different places.
Could you test the attached file and see if it's still an issue?

doesn't work
see the pic below
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 05, 2011, 01:34:41 pm
I can't really remember why I added htmlentities since I've cleaned up most of the characters belonging to a different guild.
So I guess what you can do is search for "htmlentities" in the code and remove it. Let me know if that works out for you.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 07, 2011, 02:43:36 pm
New version 0.0.5 is now out, check first post.

Added option to list idle members for the past 30/60/90/180/270/360 days.
Should make it a little easier to delete old members. Start by clicking on 360 and delete from there. If you have over 1000 members, you probably don't want to start by clicking on the 30 days link.

Also replaced htmlentities with utf8_decode... not really tested how this affects output of guild name.
Title: Re: UserAdmin module for Bebot
Post by: Getrix on February 07, 2011, 08:02:46 pm
Quote
"useradmin buddylist missing" - Displays a list of members not currently added to the bot's buddylist.
Should this command cross-check YG.xml list with buddy list and then notify owner if there is a player on YG.xml that is not added to bot?
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on February 07, 2011, 09:28:22 pm
Quote
"useradmin buddylist missing" - Displays a list of members not currently added to the bot's buddylist.
Should this command cross-check YG.xml list with buddy list and then notify owner if there is a player on YG.xml that is not added to bot?
That command will usually reveal characters which for some reason or another cannot be added as a buddy.
- Character has been deleted
- Character has been moved to another server
- Bot's buddylist is full, so new members have not been added

So.. no.. it's not connected to YG guild check.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on July 31, 2012, 10:24:18 pm
Since YG.com has been shut down, this module no longer works and should probably be removed.
Title: Re: UserAdmin module for Bebot
Post by: dragonjr on August 04, 2012, 12:27:32 pm
are you referring to the admin mod?
it still works out great for me when you have to keep up with idle players. i used to have a guild that was over thousand players and since i got this mod  ive been keeping it at around 700.
i think this mod is great on keeping the guild list cleaner.
just want to say thanks for making it.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on August 05, 2012, 01:04:29 am
are you referring to the admin mod?
it still works out great for me when you have to keep up with idle players. i used to have a guild that was over thousand players and since i got this mod  ive been keeping it at around 700.
i think this mod is great on keeping the guild list cleaner.
just want to say thanks for making it.
Ah, good to know :)
Guess it's just the guild functionality which wont work then.
Title: Re: UserAdmin module for Bebot
Post by: Panther on September 13, 2012, 01:24:25 pm
It's not working for AoC.
Title: Re: UserAdmin module for Bebot
Post by: Kentarii on September 13, 2012, 11:40:09 pm
It's not working for AoC.
Ok...
I've stopped playing AoC, so all scripts are provided as is whether they work or not.
If someone provides a fix/update/patch, I will gladly host the updated script on my website.
Title: Re: UserAdmin module for Bebot
Post by: dragonjr on September 17, 2012, 02:44:33 am
i still use it in AoC i followed his intructions the only thing that doesnt work is the YG stuff so that would include whos in what guild but its still great to weed out the people that dont play after 90 days
SimplePortal 2.3.7 © 2008-2021, SimplePortal