BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.5 support => Topic started by: nullerman on February 27, 2008, 01:43:27 am

Title: Changing Char. names
Post by: nullerman on February 27, 2008, 01:43:27 am
aparently a new trend have started within my org, change of charrakter names, now that gives the bot a hard time. and i have been forced to manualy edit in the sql database. can we please get an addition to the bot that enables it to cope with the name changes.

/nuller
Title: Re: Changing Char. names
Post by: Blueeagle on February 27, 2008, 08:35:34 am
This is caused by a design flaw in many many modules.

It is basically caused by the fact that the database tables store character names and not character IDs.

Therefore when a player changes his name the bot doesn't recognize it.

The fix for this is to alter the database scheme for most (all?) modules to store character id instead of storing player names.

However this isn't as straight forward as it might sound as aochat->get_uname() doesn't appear to work very well all the time. That appears to be a limitation caused by FC servers.

An alternative would be to store a charid->name table that would effectively be a aochat->get_uname/id cache. This is fesable but it would still require modifying all the modules.

I'm adding this to taskmanager as something that ought to be fixed in 0.5.x as 0.5 will most likely force a re-write of modules in any case.
Title: Re: Changing Char. names
Post by: Alreadythere on February 27, 2008, 11:03:31 am
However this isn't as straight forward as it might sound as aochat->get_uname() doesn't appear to work very well all the time. That appears to be a limitation caused by FC servers.
I think the current AOChat implementation of FC's handling of get_uname() have a serious problem: the bot will only get the pair of user ID and character name once, at the first time its needed. Afterwards it will always use and return this value. I'm not sure if just adding a timeout to the id/name cache in AOChat would solve the problem, or if it is a design flaw in the FC chat protocol.

Anyways, the only really useful longterm identifier for characters is the user ID, as the nickname can change in some cases. For shorttime use it's not that important, here the character name should work ok. I only see a few modules which should use ID as keys instead of name in the released modules: roster table, raid module. Whois cache is debatable.
Title: Re: Changing Char. names
Post by: Glarawyn on February 27, 2008, 06:18:14 pm
Storing by character ID isn't always going to work either. If someone deletes their character and then has FunCom restore it, the new character will have a new character ID.

My understanding is that character name change is only available to players under L30, unless a GM decides that someone name is offensive on some level and must be changed...

Basically, there's no 100% guarantee that a character name or character ID won't change. Thankfully it's usually an isolated thing and not really a big deal.
Title: Re: Changing Char. names
Post by: nullerman on February 28, 2008, 04:33:09 am
well, the easy solution for me was editing the database manualy, thou for me there is nothing easy about it, and so many places to edit, and since im like a shark out of water when working in the sql server, it is a lengthy process, so i seriusly considered setting up a clean database, when the 2nd member within a month in the org decided that his name was lame, and got that changed.

/nuller
SimplePortal 2.3.7 © 2008-2024, SimplePortal