Booya
collapse collapse

Menu

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Search


* Board Stats

  • stats Total Members: 1061
  • stats Total Posts: 18264
  • stats Total Topics: 2479
  • stats Total Categories: 7
  • stats Total Boards: 31
  • stats Most Online: 175

Author Topic: UserAdmin module for Bebot  (Read 10368 times)

0 Members and 1 Guest are viewing this topic.

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
UserAdmin module for Bebot
« 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:





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.



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.



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 | zip ]
« Last Edit: June 14, 2011, 03:54:56 pm by Kentarii »

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #1 on: January 30, 2011, 12:43:48 am »
*RESERVED*

F.A.Q.

Offline maikee

  • BeBot Rookie
  • *
  • Posts: 17
Re: UserAdmin module for Bebot
« Reply #2 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?

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #3 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.

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #4 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
« Last Edit: February 03, 2011, 01:50:07 pm by Kentarii »

Offline RaZeR

  • BeBot User
  • **
  • Posts: 28
Re: UserAdmin module for Bebot
« Reply #5 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.

Offline maikee

  • BeBot Rookie
  • *
  • Posts: 17
Re: UserAdmin module for Bebot
« Reply #6 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

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #7 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.
« Last Edit: February 03, 2011, 02:01:36 pm by Kentarii »

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
    • Niflheim - Crom
Re: UserAdmin module for Bebot
« Reply #8 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?
-Yite [Crom]

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #9 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.

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #10 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.
« Last Edit: February 03, 2011, 01:54:02 pm by Kentarii »

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
Re: UserAdmin module for Bebot
« Reply #11 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.
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #12 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.

Offline maikee

  • BeBot Rookie
  • *
  • Posts: 17
Re: UserAdmin module for Bebot
« Reply #13 on: February 05, 2011, 10:54:07 am »
Hi

it is possible to optimized for german language?

the german special char:

lowcase: ä, ö, ü, ß
uppercase: Ä, Ö, Ü

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
    • AoC>TV
Re: UserAdmin module for Bebot
« Reply #14 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?
« Last Edit: February 05, 2011, 11:56:58 am by Kentarii »

 

* Recent Posts

CIDB by bitnykk
[July 21, 2017, 10:19:38 am]


Line 99 StartBot.php by Kepha
[October 17, 2016, 10:37:57 am]


New Central itemDB (!item[s|reg]) by aoc_botter
[September 17, 2016, 07:06:44 pm]


Unknown dimension error. by aoc_botter
[September 17, 2016, 06:53:20 pm]


Raid Loot module by bitnykk
[April 05, 2016, 07:11:25 pm]

* Who's Online

  • Dot Guests: 30
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Forum Staff

Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator