Ticket #187 (assigned defect)

Opened 8 months ago

Last modified 4 months ago

MatchBot's strictipmidcheck

Reported by: Maverick Assigned to: dugwyler (accepted)
Priority: normal Component: Bots - TWD/TWL
Version: Latest version from repository Severity: minor
Keywords: Cc:

Description

After upgrading RoboQueen today there were lots of problems from TWD players reporting that they got the message "You must play from your registered IP or mID".

Checking these players with :TWDBot:!listipmid would usually result in no IPs or MIDs at all.

I checked the previous Matchbot on Roboqueen and noticed it didn't have the method for checking IPMID in MatchTeam.java at all (which was added to fix Ikrit's fork).

However, it does now. This code checks the strictipmid setting in the MatchBot rules. If it's set to "1", it would return the message "You must play from your registered IP or mID" if the query didn't return any results.
The strictipmid setting was set to "1" in the MatchBot rules.

My theory:
Code was finally added to properly check player's IP or MID, however player's original IP and MID were never added to the proper table on !registering. I believe this code is now added to the !register procedure but this means that all current TWD players must re-register to be able to play again.

Some players were having IPs and MIDs listed on :TWDBot:!listipmid but I believe that these were added when a TWD Operator used the TWDBot:!add command, not when a player !registered.

I fixed this problem by turning the strictipmidcheck in the MatchBot's rules to 0 so that it wouldn't check IP or MID anymore (turning it back into the old situation). However, I believe this isn't the solution we want.

This story might be a bit blurry but I'm really tired right now and I will try to be more clear about this when asked.

Attachments

Change History

02/05/08 09:24:17 changed by dugwyler

  • owner set to dugwyler.
  • status changed from new to assigned.

OK, I've investigated this more seriously after seeing ticket #204. There are 3 tables used for TWD registration/alias data (!):

tblUser This is the normal "user" database, not necessarily associated with TWD. When you do !signup, you are added to tblUser. This does not record any IP/MID.

tblAliasSuppression When a user does !register, they are registered in this table. This records their IP and MID.

tblTWDPlayerMID When a mod adds an IP or MID, the entry is added to this table. Presently this is the only table that is checked by !listipmid — this is why you see no entries for a lot of players when you use the command. Also, far more strangely, this is the only table that is checked by MatchBot in add or sub! So a player would have had to have a mod add their normal IP/MID specifically in order to play.

So far I've modified !listipmid to show the player's registered IP and MID, and then check for additional IPs and MIDs that have been registered by staff. If there are none, TWDBot will tell them this, so as not to confuse mod-added data with the entry made in tblAliasSuppression by doing !register.

Additionally I am modifying MatchBot, but need Rii's input on how that should work. Naturally it should check tblAliasSuppression first, and not just tblTWDPlayerMID. Should it make sure IP and MID BOTH match in tblAliasSuppression? And if they don't, should we check for both MID and IP matching in tblTWDPlayerMID, or just one? What should be the difference between using the strictmidip flag and not using it for both of these cases?

02/05/08 09:35:44 changed by dugwyler

Note, most recent changeset in response to #204 will not work properly. Awaiting input so I can patch that one up the way it needs to be done.

02/06/08 15:07:28 changed by dugwyler

I submitted new code that first checks tblAliasSuppression IP/MID in Match. MID must match perfectly; IP must have the first 2 fields matching. If either fails it then checks data in tblTWDPlayerMID.

02/14/08 11:37:09 changed by Maverick

I've just updated RoboQueen with the most recent changeset, including matchbot. I've also changed the TWD rules to enable strictipmidcheck. I'm currently waiting if there are any problems to it.

02/14/08 23:57:40 changed by Maverick

Unfortunately there were problems; each player got the message "You have not been found in the records." dugwyler fixed most of these problems in changesets [2317], [2318] and [2319]. However, one table (tblTWDPlayerMID) is still on trenchwars.org while it should be moved to RoboQueen where the bots modify it. This table then also needs to be synced from RoboQueen to the trenchwars.org's database again for use in the TWD (staff?) website.

I've decided to turn off the strictipmidcheck again until everything is sorted.

02/14/08 23:59:30 changed by Maverick

I'm making a full report on TWDBot and Matchbot on what tables they use. It will be added to the wiki pages TWDBot and MatchBot respectively.

02/15/08 00:29:27 changed by Maverick

If you check the TWDBot page, you can see the problems (considering everything should be set to local imo).

(follow-up: ↓ 13 ) 02/27/08 02:29:54 changed by Maverick

Note:

Synchronization scripts, synchronize the following tables from Queen to Trenchwars.org: (excluding TWL)

  • tblUser
  • tblRank
  • tblUserRank
  • tblTeam
  • tblTeamUser
  • tblMatch
  • tblMatchRoundUser

This means tblTeam should also be moved to Queen

02/27/08 02:52:20 changed by Maverick

Note that tblTWDPlayerMid and tblAliasSupression aren't synchronized although these tables are used by the bots (on roboqueen's database).

I assume these tables aren't used by the website.

02/27/08 02:57:59 changed by Maverick

RiiStar, can you confirm that tblTWDPlayerMid and tblAliasSupression can be safely removed from trenchwars.org's database?

tblTWDPlayerMID is safely copied to RobQueen's database, tblAliasSupression shouldn't even be in trenchwars.org's database without synchronization.

02/27/08 03:01:52 changed by Maverick

OK, I will update MatchBot right now with the following changes:

  • database location changes ([2366])
  • Scoreboard changes (TWSDX related) ([2335])

Furthermore, I will change the TWD configuration once again to check IP/MID as it should be (strictipmidcheck).

02/27/08 06:16:52 changed by Maverick

Unfortunately the strictipmid setting change didn't work out again:

P    MatchBot2> Welcome to TWJD, Teams: Mortal vs. Disoblige. We are currently in round 1: arranging lineups.
T    MMaverick> what message does the bot give you?
          ziZu> 2new
  Phreddy Krueger in for Disoblige
     Dald <ZH>> lol uh oh
  fruitang in for Disoblige
  Phreddy Krueger in for Disoblige
  Phreddy Krueger in for Disoblige
     Dald <ZH>> lol
          ziZu> LoooL
     Dald <ZH>> LOL
          FluB> MatchBot2> You have not been found in the bot's records.  Please notify a staff member with ?help immediately.
        kicker> MatchBot2> Sorry, you can only play in TWD from the location at which you registered this name.  Please contact a TWD op if you have questions.
          ziZu> score is 40-50 !
  FluB in for Disoblige
      Damaging> Only Mantra can be added?
  FluB in for Disoblige
  FluB in for Disoblige
    BrokenFist> lol
  Mantra-Slide> ez
  Healt in for Mortal
  Mantra-Slide> spamming them out
  Mantra-Slide> MUHAHAH
  Phreddy Krue> MatchBot2> You have not been found in the bot's records.
  Havok in for Mortal
  Havok in for Mortal
  Havok in for Mortal
  Havok in for Mortal
  Mantra-Slide> YHAHAH
         Healt> ez
  Mantra-Slide> :)
      Damaging> Go MMaverick !
  Phreddy Krue> and last time I played was yesterday
        kicker> MatchBot2> You have not been found in the bot's records.  Please notify a staff member with ?help immediately.
  Mantra-Slide> I think I win
          FluB> MatchBot2> You have not been found in the bot's records.  Please notify a staff member with ?help immediately.
         Havok> yeh me too
  Phreddy Krue> muahah free points
  Havok in for Mortal
          FluB> i keep getting that all the time mantra does !add so i dc

I've set strictipmid to 0 again to temporarily fix TWD.

(in reply to: ↑ 8 ) 02/27/08 14:02:51 changed by Maverick

Synchronization wasn't working like it's supposed to so I checked it out.

Found out that the following tables are synchronized from Website to Roboqueen:

  • tblUser (ugh read/write by RoboQueen (TWD) and read(?) by website)
  • tblRank (don't see the need to synchronize this really)
  • tblUserRank (ok, agreed, ranks are modified on website only and read by the bots)
  • tblTeam (Modified by TWDBot for squad creation and used at website, should be synchronized RoboQueen to Website)
  • tblTeamUser (ok, agreed, squad members are modified on website only and need to be used by matchbots)

And these from RoboQueen to Website (like it's supposed to):

  • tblMatch
  • tblMatchRoundUser

What a giant mess.

I favor moving everything over to trenchwars.org and empty the entire RoboQueen database. No more synchronization scripts, no more problems like this. Just one connection on RoboQueen pointing to trenchwars.org's database.

Anyone see a problem with that?

02/27/08 14:16:38 changed by Maverick

To keep TWDBot running while we solve this mess, I decided to undo the changes to TWDBot relating to tblTeam.

So what has been done today:

  • tblTWDPlayerMID has been moved from webdb to localdb
  • TWDBot and MatchBot has been updated accordingly
  • tblTeam is still residing on webdb
  • test done with strictipmid=1 but failed. Dugwyler has made some debug logging messages for the next test for us to find out what the exact problem is.
  • Changed configuration of TWSDX —> TWSD (renamed TWSD to TWSD-old)
  • Changed MatchBot to match the new configuration number of TWSD

webdb = trenchwars.org's db localdb = roboqueen's db

02/27/08 17:46:15 changed by RiiStar

Maybe its time for that DB clean up?
If we put stuff in seperate DB's i think all the sites will need modding is the only thing…

But even if we move it all to tw.org that isnt a big mod for the sites…
And id love the excuse to do a player table reset…
We have tonnes of users with incorrect details and names that shouldnt be there!

02/28/08 05:10:50 changed by Maverick

Yea, the databases definitely need a big cleanup.

Currently TWD is spread out amongst RoboQueen's server and trenchwars.org's, like it has always been. Unfortunately, this is quite hard to work with - hence the many synchronization scripts we use. Moving everything over to one server (trenchwars.org's because the website also runs on that) would simplify the problem a bit as everything is now located in one (messy) database.

Dock> has made a TWD and TWL database on trenchwars.org for me but it would be hard to get TWD into its own seperate database since it uses the common tblUser tables for registering and authentication during logon.

I imagine a player table reset would mean resetting the tblUser table(s), right? Even though this table needs a reset due to all the old and incorrect data in it, it would also mean resetting all the alias data we have gathered so far. It's not something some people on staff would like.

For now, I would like to move all TWD tables from RoboQueen's server to trenchwars.org's mysql server, kill most of the synchronization scripts and get things working again. Then we can work and cleanup more from there.

02/28/08 05:17:12 changed by RiiStar

Actually i knew we couldnt do that…
The Reset i ment was that no one has any TWD Reg info in the tables other than tblUser ?
Ikrit Did this or something similar when he added his code…

So they have to re-signup to reg all names and info ?
I think that all that happens is we make them do !signup to renew their ip/mid data?

02/28/08 05:34:18 changed by RiiStar

Acutally sorry they'd just need to do !register ?

02/28/08 07:06:08 changed by dugwyler

Yeah, we could just wipe tblAliasSuppression and tblTWDPlayerMID to get rid of all the !register data and any additional data that's been added by mods. Not sure if this would also then require tblTeam, tblTeamUser and so on being reset (requiring squad reformation). That would probably lead to a large hassle for players.

Mav, do you have that debug log data from Queen? Interested to see what happened when you ran the test.

04/30/08 16:16:18 changed by milosh

  • component changed from Bots - Other to Bots - TWD/TWL.

Add/Change #187 (MatchBot's strictipmidcheck)




Change Properties
Action