Jump to content

Advanced In-Game Admin and Ban Enforcer - AdKats


Message added by Prophet731,

If you've been banned from a server then you will need to appeal the ban with the owners/community of that server. We do not control any bans done on servers that utilize AdKats as all bans are local to that server.

Recommended Posts

  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

so if i have only bf4 server the best is an new DB ?

Yes, for now do not run bf4 and bf3 on the same database/schema, just create a new schema for your bf4 servers. This is mainly because 1, records would be mixed between games, confusing matters. 2, ban enforcer would attempt to enforce bans across games which won't manager nicely. And 3, i don't know what xpkiller is going to modify in his plugin/database.
Link to comment

Originally Posted by Hutchew*:

 

Yes, for now do not run bf4 and bf3 on the same database/schema, just create a new schema for your bf4 servers. This is mainly because 1, records would be mixed between games, confusing matters. 2, ban enforcer would attempt to enforce bans across games which won't manager nicely. And 3, i don't know what xpkiller is going to modify in his plugin/database.

Too late, but not seeing any issues as of yet.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mavy*:

 

I had the following error this afternoon and could not connect to my layer anymore. A restart of the layer fixed it.

 

Code:

[12:41:50] [AdKats] EXCEPTION: [fetchPlayer][Error while fetching player.]: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EA_BC8BF0ACE364D0BC9FCE25EE8F33DFF2',
                                    ''
 ' at line 9
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.AdKats.fetchPlayer(Int64 player_id, String player_name, String player_guid, String player_ip)
[12:41:50] [AdKats] EXCEPTION: [playerListingThreadLoop][Error occured in player listing thread.]: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.AdKats.playerListingThreadLoop()
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

I had the following error this afternoon and could not connect to my layer anymore. A restart of the layer fixed it.

 

Code:

[12:41:50] [AdKats] EXCEPTION: [fetchPlayer][Error while fetching player.]: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EA_BC8BF0ACE364D0BC9FCE25EE8F33DFF2',
                                    ''
 ' at line 9
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.AdKats.fetchPlayer(Int64 player_id, String player_name, String player_guid, String player_ip)
[12:41:50] [AdKats] EXCEPTION: [playerListingThreadLoop][Error occured in player listing thread.]: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.AdKats.playerListingThreadLoop()
Strange, your player had an empty string for IP address instead of null, i'll add a catch for it. Thanks.
Link to comment

Originally Posted by Mavy*:

 

And another error, not sure if its a bug with the plugin or just a random issue with the server but posting just in case:

 

Code:

[13:53:19 05] Error: Error in Startstreaming: 
[13:53:19 05] Message: BIGINT UNSIGNED value is out of range in '(`procon`.`tbl_playerstats`.`Deaths` + -(1))'
[13:53:19 05] Native: -2147467259
[13:53:19 05] Source: MySql.Data
[13:53:19 05] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.CChatGUIDStatsLoggerBF3.StartStreaming()
[13:53:20 47] Error: getUpdateServerID1: System.InvalidOperationException: Nested transactions are not supported.
   at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
   at MySql.Data.MySqlClient.MySqlConnection.Throw(Exception ex)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction()
   at PRoConEvents.CChatGUIDStatsLoggerBF3.getUpdateServerID(CServerInfo csiServerInfo)
[13:53:20 66] Error: Error in Startstreaming OuterException: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLoggerBF3.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLoggerBF3.StartStreaming()
PS: I am using xpkillers plugin that came with your latest stable release. So i am unsure where to post this.
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

And another error, not sure if its a bug with the plugin or just a random issue with the server but posting just in case:

 

Code:

[13:53:19 05] Error: Error in Startstreaming: 
[13:53:19 05] Message: BIGINT UNSIGNED value is out of range in '(`procon`.`tbl_playerstats`.`Deaths` + -(1))'
[13:53:19 05] Native: -2147467259
[13:53:19 05] Source: MySql.Data
[13:53:19 05] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.CChatGUIDStatsLoggerBF3.StartStreaming()
[13:53:20 47] Error: getUpdateServerID1: System.InvalidOperationException: Nested transactions are not supported.
   at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
   at MySql.Data.MySqlClient.MySqlConnection.Throw(Exception ex)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction()
   at PRoConEvents.CChatGUIDStatsLoggerBF3.getUpdateServerID(CServerInfo csiServerInfo)
[13:53:20 66] Error: Error in Startstreaming OuterException: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLoggerBF3.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLoggerBF3.StartStreaming()
PS: I am using xpkillers plugin that came with your latest stable release. So i am unsure where to post this.
no no man, you can't use any version of his plugin on bf4 servers yet. You can use it to create the database tables but that's it, that plugin has NOT been moved to bf4 yet. Just disable the stat logger plugin on your bf4 layers and run 3.5.1.5 of AdKats. We need to wait on xpkiller for his bf4 version, until then, this is my workaround.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Ok disabled it and upgraded tot 3.5.1.5. The thing is that it was running fine since Tuesday using that version.

It may have seemed to be running fine, mainly because there are a lot of similarities between the two games, but some specifics are different, specifics I don't know yet since it's not my code. One thing i do know though, is the weapon codes are completely different between games. There are only a few weapon codes that are the same, which i believe is the cause of your error.

 

Writing up a post for AdKats use with BF4 until new stat logger release, hang tight everyone...

Link to comment

Originally Posted by Mavy*:

 

It may have seemed to be running fine, mainly because there are a lot of similarities between the two games, but some specifics are different, specifics I don't know yet since it's not my code. One thing i do know though, is the weapon codes are completely different between games. There are only a few weapon codes that are the same, which i believe is the cause of your error.

 

Writing up a post for AdKats use with BF4 until new stat logger release, hang tight everyone...

Figured it must have been something like that. Forgot that i had turned on stats this morning as a test. Past few days i had it running chat log only. One small request for the workaround tho. Could you filter the ID_CHAT_* messages? They are a bit of a waste of DB space :P
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Figured it must have been something like that. Forgot that i had turned on stats this morning as a test. Past few days i had it running chat log only. One small request for the workaround tho. Could you filter the ID_CHAT_* messages? They are a bit of a waste of DB space :P

Yes, was thinking of doing this as well, they really don't hold particular meaning for us. I'll filter them out. 3.5.1.6 will have this.
Link to comment
  • Administrators

Originally Posted by Prophet731*:

 

Yes, was thinking of doing this as well, they really don't hold particular meaning for us. I'll filter them out. 3.5.1.6 will have this.

Don't worry about filtering it for now. I'm actually thinking of somehow we can use it.

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment
  • Administrators

Originally Posted by Prophet731*:

 

Of course it can be used, I have ideas myself, but i'm filtering it now for database size, at least for the public.

Ok well don't filter it for our use at least. I'm already working it into the live scoreboard chat (see below).

 

Also, have you figured out how to determine who is a commander and spectator from the player list?

 

ab430a4d60c62ce957edca597dfad8bd.png

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Ok well don't filter it for our use at least. I'm already working it into the live scoreboard chat (see below).

 

Also, have you figured out how to determine who is a commander and spectator from the player list?

 

ab430a4d60c62ce957edca597dfad8bd.png

Right now it appears the only way to confirm commander is someone who gets points without spawning in. Spectators are still up in the air.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

AdKats Usage with BF3:

 

Use the latest stable download released on sourceforge: https://sourceforge.net/projects/adkats/

Use stat logger version 1.1.0.2 as released with that version of AdKats.

 

AdKats Usage with BF4:

 

Firstly I would suggest using a separate schema/database for your BF4 layers, especially if you are planning to use the AdKats WebAdmin. The AdKats plugin is able to operate on the same database as your BF3 instances, but when stat logger gets updated for BF4, and WebAdmin gets updated for BF4 you will not be able to use those on the same database.

 

This short guide assumes you are creating a new schema/database for your BF4 instances. This guide is only valid until xpkiller's stat logger is released for BF4. Everything should return to normal operation after that version is released, and a new guide will be pushed out.

 

STEPS:

 

  • Create your new schema/database and get credentials for it with ability to add/remove tables.
  • Install the original or modded stat logger on each of your layers
  • Enter your credentials and start it on each layer (make no other setting changes), this will insert the stat logger tables in the database, and also insert your server IDs in the server table.
  • At this time, all of your server IDs should be in the server tables. Disable stat logger on every layer and do not enable it again until an official update is released by XpKiller.
  • Run this query on your database (just copy/paste in and run it):Code:
    DROP TABLE `tbl_chatlog`; 
    CREATE TABLE `tbl_chatlog` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `logDate` datetime NOT NULL,
    `ServerID` smallint(5) unsigned NOT NULL,
    `logSubset` text COLLATE utf8_unicode_ci,
    `logPlayerID` int(10) unsigned DEFAULT NULL,
    `logSoldierName` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `logMessage` text COLLATE utf8_unicode_ci,
    PRIMARY KEY (`ID`),
    KEY `ServerID` (`ServerID`),
    KEY `PlayerID` (`logPlayerID`),
    CONSTRAINT `tbl_chatlog_ibfk_1` FOREIGN KEY (`ServerID`) REFERENCES `tbl_server` (`ServerID`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `tbl_chatlog_ibfk_2` FOREIGN KEY (`logPlayerID`) REFERENCES `tbl_playerdata` (`PlayerID`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB AUTO_INCREMENT=565 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  • Run the AdKats setup script on your database (Just copy/paste in and run it): https://raw.github.com/ColColonClean...ter/adkats.sql
  • Install the beta version of AdKats (3.5.1.5+) from the test branch: https://raw.github.com/ColColonClean...test/AdKats.cs
  • Enter the same DB credentials into AdKats and start it. All should function normally.

This will be much more automated once the official version of stat logger comes out. But for now, this is what we have to work with. AdKats will log chat (with player IDs now) and player data in the stat logger tables, live.

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Colon have them run this SQL instead. Update your post and once you do i'll edit my post here.

Nope, this is all temporary. I don't insert server ID in the server table, stat logger needs to be run on each server. I will write a script to import any data they acquire into xpkiller's real version once it's released, this is all a temporary patch for things to work until he posts.
Link to comment
  • Administrators

Originally Posted by Prophet731*:

 

I get an error when I run that script on a fresh db in the first post, ideas?

What's the error?

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.