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

Originally Posted by TMiland*:

 

I fixed the error remember :P, i know where it was lol

I remember, but i cant upgrade to that version remember?

 

You said that you will add it to the next update, that update is the new one lol! :tongue:

 

*edit

You missed this: myrcon.net/...advanced-in-game-admin-and-ban-enforcer-adkats#entry37394 :biggrin:

* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

I remember, but i cant upgrade to that version remember?

 

You said that you will add it to the next update, that update is the new one lol! :tongue:

 

*edit

You missed this: myrcon.net/...advanced-in-game-admin-and-ban-enforcer-adkats#entry37394 :biggrin:

No what i mean is i know where the error was, the error only applied when records were being acted on from webadmin, not from in-game.

 

And for adding admins it's a little more complicated. A user has to be added for them, their in-game soldiers linked to that user, and the user role set to an admin role you create.

Link to comment

Originally Posted by TMiland*:

 

No what i mean is i know where the error was, the error only applied when records were being acted on from webadmin, not from in-game.

 

And for adding admins it's a little more complicated. A user has to be added for them, their in-game soldiers linked to that user, and the user role set to an admin role you create.

But the error is present when using the cmd both from admin panel and !punish in-game, that's why i haven't used it since you debugged my server.

 

I am using this query to add admins in both admin userclass 1 and in the reserved slots class on the forums:

Code:

if(in_array($value,$adminClass_1))
	{
		if(in_array($value,$reservedPlayers))
		{
			if(!in_array($value,$oldAdminPlayers))
			{
				mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 1, 'NoEmail', 0) ON DUPLICATE KEY UPDATE access_level = 1");
				echo "Adding Admin: ".$value."\n";
			}
		}
	}
If not in admin userclass, add as class 5:

Code:

if(!in_array($value,$oldReservedPlayers))
        {
                mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 0, 'NoEmail', 5) ON DUPLICATE KEY UPDATE access_level = 5");
                echo "Adding Player: ".$value."\n";
        }
This is working like a charm! :smile:

 

How would i go about converting this to the new system? :smile:

* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

But the error is present when using the cmd both from admin panel and !punish in-game, that's why i haven't used it since you debugged my server.

 

I am using this query to add admins in both admin userclass 1 and in the reserved slots class on the forums:

Code:

if(in_array($value,$adminClass_1))
    {
        if(in_array($value,$reservedPlayers))
        {
            if(!in_array($value,$oldAdminPlayers))
            {
                mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 1, 'NoEmail', 0) ON DUPLICATE KEY UPDATE access_level = 1");
                echo "Adding Admin: ".$value."\n";
            }
        }
    }
If not in admin userclass, add as class 5:

Code:

if(!in_array($value,$oldReservedPlayers))
        {
                mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 0, 'NoEmail', 5) ON DUPLICATE KEY UPDATE access_level = 5");
                echo "Adding Player: ".$value."\n";
        }
This is working like a charm! :smile:

 

How would i go about converting this to the new system? :smile:

Prophet is working on an API for the webadmin to accept requests for player access changes, since the actual process to manage it is rather involved.
Link to comment
  • Administrators

Originally Posted by Prophet731*:

 

But the error is present when using the cmd both from admin panel and !punish in-game, that's why i haven't used it since you debugged my server.

 

I am using this query to add admins in both admin userclass 1 and in the reserved slots class on the forums:

Code:

if(in_array($value,$adminClass_1))
    {
        if(in_array($value,$reservedPlayers))
        {
            if(!in_array($value,$oldAdminPlayers))
            {
                mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 1, 'NoEmail', 0) ON DUPLICATE KEY UPDATE access_level = 1");
                echo "Adding Admin: ".$value."\n";
            }
        }
    }
If not in admin userclass, add as class 5:

Code:

if(!in_array($value,$oldReservedPlayers))
        {
                mysql_query("INSERT INTO adkats_accesslist (player_name, member_id, player_email, access_level) VALUES ('$value', 0, 'NoEmail', 5) ON DUPLICATE KEY UPDATE access_level = 5");
                echo "Adding Player: ".$value."\n";
        }
This is working like a charm! :smile:

 

How would i go about converting this to the new system? :smile:

Prophet is working on an API for the webadmin to accept requests for player access changes, since the actual process to manage it is rather involved.

It won't be for a couple versions anyway, but, here is how I think I will do it.

 

For the API you will need to send a POST request with the following values. Reason for no player name is that it's not a unique key in the database.

 

  • API Key
  • EAGUID
  • Game (BF3, BF4, Both)
  • Type (Admin, Res(Reserved Slot))
  • Role Name (Only needed if the type is Admin)

To remove a player the request will be slightly different. Instead of a POST request you would send a DELETE request with only these values. This will check both reserved slots and admin slots and if they exist in them it will remove them.

  • API Key
  • EAGUID
  • Game (BF3, BF4, Both)

As for a format I was thinking about parsing a simple text file as one option. It would have to be in a certain format to be valid though.

 

Adding Examples:

 

Adding an Admin

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,both,admin,Veteran Admin</span>
Adding a reserved slot player (Note: Admins have reserved slot access already so you don't need to do one for both)

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,bf4,res</span>
Updating a player to a different type is the same as adding except in the code I check to see if the information is different than what I have in the database.

 

Deleting Examples:

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,both</span>
Code:
<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,bf4</span>
I will provide a PHP script with everything setup you just need to tell it what database to use and what format it's in.

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

Originally Posted by FlippedOut*:

 

Running adkats on our locker server.

 

@kill/!kill command from ingame is killing a user twice, Kills them once straight away then again when they respawn. Admin gets the messge twice also "User has been killed for reason"... anything i should check?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It won't be for a couple versions anyway, but, here is how I think I will do it.

 

For the API you will need to send a POST request with the following values. Reason for no player name is that it's not a unique key in the database.

 

  • API Key
  • EAGUID
  • Game (BF3, BF4, Both)
  • Type (Admin, Res(Reserved Slot))
  • Role Name (Only needed if the type is Admin)

To remove a player the request will be slightly different. Instead of a POST request you would send a DELETE request with only these values. This will check both reserved slots and admin slots and if they exist in them it will remove them.

  • API Key
  • EAGUID
  • Game (BF3, BF4, Both)

As for a format I was thinking about parsing a simple text file as one option. It would have to be in a certain format to be valid though.

 

Adding Examples:

 

Adding an Admin

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,both,admin,Veteran Admin</span>
Adding a reserved slot player (Note: Admins have reserved slot access already so you don't need to do one for both)

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,bf4,res</span>
Updating a player to a different type is the same as adding except in the code I check to see if the information is different than what I have in the database.

 

Deleting Examples:

Code:

<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,both</span>
Code:
<span style="font-family: Arial">EA_4409D49F6F05C0CCC3B71330E535961B,bf4</span>
I will provide a PHP script with everything setup you just need to tell it what database to use and what format it's in.
This is great news guys! What a great job you are doing with the admin tools! :biggrin:

 

Okay, for now i think i'll go back to the original way i did the reserved slots, writing the names to a txt file, then import the names with a plugin, so i can upgrade to the new version. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I get a bunch of these errors on upgrade:

 

Code:

[15:43:51 44] [AdKats] EXCEPTION: Line 0: [UploadRecord][Unexpected error uploading Record.]: MySql.Data.MySqlClient.MySqlException: Cannot add or update a child row: a foreign key constraint fails (`nbfc_bf4log`.`adkats_records_main`, CONSTRAINT `adkats_records_main_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `tbl_server` (`ServerID`) ON DELETE CASCADE ON UPDATE CASCADE)
   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.UploadRecord(AdKatsRecord record)
What gives? :smile:
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

[13:56:20] AdKats > Say > TommyMiland > Your user role Default Guest does not have access to Force Move Player.

:woot:

 

Posted Image

This can happen when you have soldiers for different games with the same name. 1929 is not the ID of your soldier in the game you are trying to have access in. It's fixed in the new version, but that version has instability issues. The threads started hanging after a couple hours of use on our layers so i obviously missed an optimization step. However, if you want to give it a try anyway, 4.0.1.0 is on the "test" github branch.

 

If you want to fix it without updating, find your soldier ID for the game you want (assuming BF4), and add that ID to your user id (1) in the usersoldiers table.

Link to comment

Originally Posted by TMiland*:

 

This can happen when you have soldiers for different games with the same name. 1929 is not the ID of your soldier in the game you are trying to have access in. It's fixed in the new version, but that version has instability issues. The threads started hanging after a couple hours of use on our layers so i obviously missed an optimization step. However, if you want to give it a try anyway, 4.0.1.0 is on the "test" github branch.

 

If you want to fix it without updating, find your soldier ID for the game you want (assuming BF4), and add that ID to your user id (1) in the usersoldiers table.

Okay, i have already updated to that version, and have instability issues on two servers.

 

Any chance you will be patching that issue like just now, or do i have to revert back?

* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Okay, i have already updated to that version, and have instability issues on two servers.

 

Any chance you will be patching that issue like just now, or do i have to revert back?

Dang it man...please, nobody update to a test version unless I say to, that's exactly what they are, tests, and will usually have issues.

 

Reverting back is advisable.

Link to comment

Originally Posted by TMiland*:

 

Dang it man...please, nobody update to a test version unless I say to, that's exactly what they are, tests, and will usually have issues.

 

Reverting back is advisable.

But you said so :P

 

Already reverted. :ohmy:

* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

For clarity purposes only, do you run the adkats.sql SQL script against 'XpKiller's Procon Chat, GUID, Stats and Mapstats Logger' database or against a second database?

 

Thanks in advance.

TM is right, they must run on the same database. Did i forget to say that in the installation instructions? If i did then my apologies.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

I have no idea!

 

I got this error all of a sudden:

myrcon.net/...chat-guid-stats-and-mapstats-logger#entry45292

Did you copy your tables or table contents from somewhere? That error means when you did it carried a user from the old definition to your new database and that user has no powers in the new database (i think that's right, someone please correct me if i'm wrong). You need to remove the user definer. Prophet/blackhawk talked about how to do it earlier in the thread.
Link to comment

Originally Posted by TMiland*:

 

Did you copy your tables or table contents from somewhere? That error means when you did it carried a user from the old definition to your new database and that user has no powers in the new database (i think that's right, someone please correct me if i'm wrong). You need to remove the user definer. Prophet/blackhawk talked about how to do it earlier in the thread.

I have recreated the procedure, still the same error msg:

Code:

[22:08:43 61] [Statslogger]Error: LogChat:
[22:08:43 61] Message: The user specified as a definer ('cpses_nbUhhQ5fkB'@'localhost') does not exist
[22:08:43 61] Native: -2147467259
[22:08:43 61] Source: MySql.Data
[22:08:43 61] 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.CChatGUIDStatsLogger.LogChat(String strSpeaker, String strMessage, String strType)
[22:08:43 61] [Statslogger]Error: LogChat_2: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLogger.LogChat(String strSpeaker, String strMessage, String strType)
Not really sure what he means by "Yea you need to remove the user definer from the trigger or procedure."?

 

*Edit

PROBLEM SOLVED!

Posted Image

 

I edited the TRIGGERS in phpmyadmin, and changed all 3 "cpses_nbUhhQ5fkB" to user@localhost!

 

Hurray! :biggrin:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Piranha16*:

 

Hey ColColonCleaner,

 

 

we have 8 Gameservers(4x64, 1x 48, 2x32, 1x24, 1x20, Webspace (AdKats Webadmin 1.4.1 and Procon Layers by Fragnet.

The Plugin AdKats 4.0.0.0 is crashing my Procon Layer Server.

The CPU and Memory Usage is with AdKats very high.

From 30MB to 120MB. And CPU from 3% to 70-80%. (Logs from Fragnet).

 

 

So i can't connect with my Procon Client to my Procon Layers.

The most Problem comes with my 48/64 Slot Servers.

 

 

All Layers connects to 1 DB from Fragnet.

 

 

Sometimes Procon Layers is shutting down and sometimes we have big laggs to administrate it.

 

 

Best regards,

Piranha16 & Breakmaster

* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Hey ColColonCleaner,

 

 

we have 8 Gameservers(4x64, 1x 48, 2x32, 1x24, 1x20, Webspace (AdKats Webadmin 1.4.1 and Procon Layers by Fragnet.

The Plugin AdKats 4.0.0.0 is crashing my Procon Layer Server.

The CPU and Memory Usage is with AdKats very high.

From 30MB to 120MB. And CPU from 3% to 70-80%. (Logs from Fragnet).

 

 

So i can't connect with my Procon Client to my Procon Layers.

The most Problem comes with my 48/64 Slot Servers.

 

 

All Layers connects to 1 DB from Fragnet.

 

 

Sometimes Procon Layers is shutting down and sometimes we have big laggs to administrate it.

 

 

Best regards,

Piranha16 & Breakmaster

Did you install the beta version (4.0.0.5+) or the stable 4.0.0.0? This issue is known with the beta version, certain threads are hanging. If you did install that beta version please revert to 4.0.0.0 until that issue is resolved.
Link to comment

Originally Posted by jking54*:

 

Did you install the beta version (4.0.0.5+) or the stable 4.0.0.0? This issue is known with the beta version, certain threads are hanging. If you did install that beta version please revert to 4.0.0.0 until that issue is resolved.

Did I miss something, what beta? ty
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Did I miss something, what beta? ty

NOOOO, i mentioned it to ONE person to attempt to fix their user problem, did not say for testers to install it. You will see the giant red "TESTERS ONLY" text above beta release posts. If you install the beta in its current state your layers will lock up, i'm still trying to find out why.
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.