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*:

 

All, keep in mind with the new in-game server browser that no player will see your kick messages. All it says is 'You were kicked by an admin', mimicking console. And since the ban enforcer, ping enforcer, commander manager, admin commands, etc, etc all use kicks, players do not have any information as to why they were removed from the server.

 

I may need to add a delayed kick so once joining the player can be spammed with messages so they know what happened before they are booted from the server.

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Another nice thing I noticed a couple days ago. Players kicked for VIP joins are given a kick message that procon can see, however it only appears some/most of the time. I'm not sure if this is related to some people coming from the in game UI vs battlelog, but it could be the case that only players joining through the in-game browser have this custom message.

 

Knowing this I might be able to build a monitor that notifies admins of who was kicked for a VIP join and log that information.

Link to comment

Originally Posted by SmackDown*:

 

The issue with that is twofold. Firstly, when they are reported, there is no battlereport generated yet since that happens at the end of the round and the email would have already been sent out. Secondly, i have not set up AdKats to pull battlereports from players profile's yet, but It could be done if they aren't blocked.

Thank you for your response. I forgot about the battle reports delay.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by SmackDown*:

 

Hello,

 

I have two new issues that I was wondering if you can help me on.

 

First issue I have is that Adkats is no longer keeping my Metabans User name and API code after I reboot my layer server. Every time I reboot the server, I have to re-enter my Metabans User name and API code in section A13-2. It does however remember my Metabans filter strings list.

 

The other issue that I have is with the Team Speak Player monitor settings in B27-3. It seems that I messed up my setting last week and I cannot get this to work anymore. I have deleted all of the setting in this section of Adkats and re-entered the settings and obtained an new Server Query Login and query password. Yet when I turn this section on, it no longer works and shuts down. It gives me an error message to make sure my query Username and password are correct. I have even tried to re-enter the old password and it now no longer works.

 

Any idea of what I should try?

 

Thank you in advanced for your help.

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

Originally Posted by WolfBlade*:

 

SmackDown - I had some issues with the TeamSpeak 3 section of AdKats as well, but I was able to resolve them. Perhaps I can help with that.

 

If there are any connection issues with the Query admin, it will shut down since it can't make a connection or your login is telling it to retrieve information from the wrong server. Hence the wrong username and pass.

 

Do you use YatQA? Get it here: http://yat.qa I recommend that you create a new Server Query login with pass - enter the details into the YatQA and connect. If you have no issues connecting through YatQA, then copy the same information into AdKats B27-3. If it won't connect, then it's more than likely a port issue. The Query port is not the same as the connection port to your TS. By default TS uses 9987 and in most cases the query port is 10011. Check those to make sure they are correct. Also make sure that the 'TeamSpeak Server Query Nickname' is NOT the same as the Server Query Username.

 

I recommend as well that you enter the channel that it needs to connect to. You can do that under the 'TeamSpeak Main Channel Name' then also enter all the other channels that you want to pull players from under 'TeamSpeak Secondary Channel Names'.

 

Let us know how you make out.

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

Originally Posted by ColColonCleaner*:

 

Hello,

 

I have two new issues that I was wondering if you can help me on.

 

First issue I have is that Adkats is no longer keeping my Metabans User name and API code after I reboot my layer server. Every time I reboot the server, I have to re-enter my Metabans User name and API code in section A13-2. It does however remember my Metabans filter strings list.

 

The other issue that I have is with the Team Speak Player monitor settings in B27-3. It seems that I messed up my setting last week and I cannot get this to work anymore. I have deleted all of the setting in this section of Adkats and re-entered the settings and obtained an new Server Query Login and query password. Yet when I turn this section on, it no longer works and shuts down. It gives me an error message to make sure my query Username and password are correct. I have even tried to re-enter the old password and it now no longer works.

 

Any idea of what I should try?

 

Thank you in advanced for your help.

I found a potential fix for the metabans username/password saving issue. Please open a ticket on github for this issue so I don't forget and I'll handle it. I am not sure what the TS issue you're having is, please take WolfBlade's advice and if that doesn't work we can look at it further.
Link to comment

Originally Posted by EntraVenuS*:

 

what on earth is happening here? im getting a lot of errors but i haven't changed anything ? Yes i did star out the database name

 

Heres a big error i put into pastebin https://pastebin.com/dbHJPMbw

Plus it took 8 mins to start up today

 

 

 

[07:01:35 42] [AdKats] INFO: Average Read: 0.31s 1380 | Average Write: 0.314s 980

[07:01:35 42] [AdKats] INSERT INTO `adkats_records_main`

(

`server_id`,

`command_type`,

`command_action`,

`command_numeric`,

`target_name`,

`target_id`,

`source_name`,

`source_id`,

`record_message`,

`record_time`,

`adkats_read`

)

VALUES

(

4,

16,

16,

0,

EntraVenu5,

198,

EntraVenu5,

198,

TeamSwap,

UTC_TIMESTAMP(),

Y

)

[07:01:35 42] [AdKats] INSERT INTO `adkats_records_main`

(

`server_id`,

`command_type`,

`command_action`,

`command_numeric`,

`target_name`,

`target_id`,

`source_name`,

`source_id`,

`record_message`,

`record_time`,

`adkats_read`

)

VALUES

(

4,

16,

16,

0,

EntraVenu5,

198,

EntraVenu5,

198,

TeamSwap,

UTC_TIMESTAMP(),

Y

)

[07:01:35 44] [AdKats] self_teamswap last used 22m53s ago.

[07:01:35 44] [AdKats] Record has errors, not re-queueing after action.

 

`adkats_read`

)

VALUES

(

4,

49,

49,

0,

Alexfedoseev,

224972,

AdKats,

NULL,

178.93.149.39,

UTC_TIMESTAMP(),

Y

 

Then a bit later i get this

)

[08:22:03 18] [AdKats] INSERT INTO `adkats_records_main`

(

`server_id`,

`command_type`,

`command_action`,

`command_numeric`,

`target_name`,

`target_id`,

`source_name`,

`source_id`,

`record_message`,

`record_time`,

`adkats_read`

)

VALUES

(

4,

49,

49,

0,

Alexfedoseev,

224972,

AdKats,

NULL,

178.93.149.39,

UTC_TIMESTAMP(),

Y

)

[08:22:03 19] [AdKats] player_changeip last used 14m2s ago.

[08:22:03 19] [AdKats] Record has errors, not re-queueing after action.

[08:22:53 70] [AdKats] INFO: Average Read: 0.334s 2441 | Average Write: 0.353s 5369

[08:22:53 70] [AdKats] INSERT INTO `anarchyg_db2`.`adkats_settings`

(

`server_id`,

`setting_name`,

`setting_type`,

`setting_value`

)

VALUES

(

4,

Feed MULTIBalancer Whitelist,

bool,

True

)

ON DUPLICATE KEY

UPDATE

`setting_value` = True

[08:22:53 70] [AdKats] INSERT INTO `**********`.`adkats_settings`

(

`server_id`,

`setting_name`,

`setting_type`,

`setting_value`

)

VALUES

(

4,

Feed MULTIBalancer Whitelist,

bool,

True

)

ON DUPLICATE KEY

UPDATE

`setting_value` = True

[08:23:53 35] [AdKats] INFO: Average Read: 0.334s 2451 | Average Write: 0.351s 5447

[08:23:53 35] [AdKats] INSERT INTO `*******`.`adkats_settings`

(

`server_id`,

`setting_name`,

`setting_type`,

`setting_value`

)

VALUES

(

4,

Enforce New Bans by IP,

bool,

False

)

ON DUPLICATE KEY

UPDATE

`setting_value` = False

[08:23:53 35] [AdKats] INSERT INTO `********`.`adkats_settings`

(

`server_id`,

`setting_name`,

`setting_type`,

`setting_value`

)

VALUES

(

4,

Enforce New Bans by IP,

bool,

False

)

ON DUPLICATE KEY

UPDATE

`setting_value` = False

 

Plus it did take ages to actually start up today

 

Any ideas please thanks in advance

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

Originally Posted by ColColonCleaner*:

 

Your layer is having issues writing/reading to your database sometimes.

 

AdKats traps any of the following errors and pushes the query to the log file:

 

TimeoutException

Unable to connect to any of the specified MySQL hosts

Reading from the stream has failed.

Too many connections

Timeout expired

An existing connection was forcibly closed by the remote host

Unable to read data

Lock wait timeout exceeded

 

Something is wrong on your database side.

 

Are there any errors coming from stat logger?

Link to comment

Originally Posted by Chelrid*:

 

I get this error, but i don't use MetaBans. And the BanEnForcer Setting "Use Metabans" is set on false.

 

[13:25:11 10] [AdKats] ERROR-690101: [No API key for Metabans was given! Cancelling Operation.]

[13:25:11 10] [AdKats] ERROR-690101: [No username for Metabans was given! Cancelling Operation.]

[13:30:11 77] [AdKats] ERROR-690101: [No API key for Metabans was given! Cancelling Operation.]

[13:30:11 77] [AdKats] ERROR-690101: [No username for Metabans was given! Cancelling Operation.]

[13:35:12 47] [AdKats] ERROR-690101: [No API key for Metabans was given! Cancelling Operation.]

[13:35:12 47] [AdKats] ERROR-690101: [No username for Metabans was given! Cancelling Operation.]

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

Originally Posted by keb2*:

 

Interesting. Firstly, there are known problems with AdKats running on Linux, i've done some things to mitigate what people have found but i don't have a Linux testing environment so it's difficult. Please keep any further testing on windows. Secondly, each of the 4 procon layers are running separately now which is great, and i'm inferring that each of those separate layers runs normally without AdKats enabled. Please update each layer to the latest test version of AdKats if you aren't already, there is a /pupdate command for this, then reboot the layers to enable the updates. Then only enable AdKats on one of your full servers and see how long it stays online.

 

Also confirm that your other layers are not affected by the shut down if it happens.

 

EDIT: It might prove useful to monitor how much memory is being used by the procon layer running AdKats, before it crashes please note how much memory is being used.

Ok.I will do everything as you said.The results will be immediately reported
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Discord integration is finally coming to AdKats. You'll be able to use it in nearly the same way as the teamspeak integration, but it will be simpler to set up (won't require a username/password) since every discord server's user information is publicly available via the widget.json URL.

 

However, there is one MASSIVE caveat to this. There is no way to reliably match players in game to discord users automatically since IP information is (obviously) not part of the public widget.json URL info. So each player will need to be assigned manually to a discord ID via an in-game command. However, this will only need to be done once. You will be able to enter a player name and discord user name, then the system will link the discord ID to that player's ID, which will stick around through all name changes.

 

I have not done any rate limit checking on the widget.json URL, so i'm not sure how often you'll be able to poll that URL without being IP banned.

Link to comment

Originally Posted by Chilace*:

 

I have not done any rate limit checking on the widget.json URL, so i'm not sure how often you'll be able to poll that URL without being IP banned.

Response from 'https://discordapp.com/api/guilds/ID/widget.json' does not contain headers 'X-RateLimit' so this endpoint is not rate limited, but what you can see in response headers, that this json cached for 5 minutes (CF-Cache-Status ?EXPIRED/HIT; Cache-Control ?public, max-age=300) and therefore does not always correspond to reality.

 

By the way, I'm surprised how the thoughts of people coincide - a couple of days ago I visited adkats github to ask about integration with the discord, but I saw that such requests on a fee basis and therefore I did not create an issue. I'm glad to see that you decided to do this. Discord is awesome.

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

Originally Posted by Checka_Wiemi*:

 

Is there anywhere a changelog or something that explains the X99.Experimental especially the No Explosives Limiter and the Grenade Cook Catcher for AdKats 6.9.0.109?

Both sound great for my no explosives server and I want to test them but don't know how they work or how I have to set them etc. :-)

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

Originally Posted by XaosBr*:

 

Hello, sorry to be asking this question here. I already use plugin adkats, I bought before being free, which by the way is great.

I'm looking for plugin that shows the best of the match at the end, exemple: When the player types in chat !desfig our !knife, And shows how many deaths he has with a requested weapon. I would be grateful if you could give me that answer.

thanks

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

Originally Posted by ColColonCleaner*:

 

Response from 'https://discordapp.com/api/guilds/ID/widget.json' does not contain headers 'X-RateLimit' so this endpoint is not rate limited, but what you can see in response headers, that this json cached for 5 minutes (CF-Cache-Status ?EXPIRED/HIT; Cache-Control ?public, max-age=300) and therefore does not always correspond to reality.

 

By the way, I'm surprised how the thoughts of people coincide - a couple of days ago I visited adkats github to ask about integration with the discord, but I saw that such requests on a fee basis and therefore I did not create an issue. I'm glad to see that you decided to do this. Discord is awesome.

Excellent, good to know that. I wonder how often that cache is updated though, just because the expiration is 5 minutes may not mean it's always updated at 5 minute intervals. I'll need to run some tests.

 

As for paid features, that's mainly because I stopped actively supporting the plugin quite a while ago, and usually things people want are major features like this.

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Is there anywhere a changelog or something that explains the X99.Experimental especially the No Explosives Limiter and the Grenade Cook Catcher for AdKats 6.9.0.109?

Both sound great for my no explosives server and I want to test them but don't know how they work or how I have to set them etc. :-)

The experimental section is only visible so people have a tiny idea what's in there and what's going to be pushed into settings eventually. Even viewing the experimental section itself activates A LOT of code on the plugin that you probably wouldn't want active on your servers without knowing what it does.

 

I would suggest disabling everything including the experimental setting section itself until these are moved to settings.

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Hello, sorry to be asking this question here. I already use plugin adkats, I bought before being free, which by the way is great.

I'm looking for plugin that shows the best of the match at the end, exemple: When the player types in chat !desfig our !knife, And shows how many deaths he has with a requested weapon. I would be grateful if you could give me that answer.

thanks

Probably the stat logger plugin or a custom script for proconrulz or insane limits.
Link to comment

Originally Posted by Chilace*:

 

Can I suggest to implement reporting system with webhooks? Example:

2017-05-11 23-40-48 #playground - Discord (2).png

JSON Body:

Code:

{
  "username":"AdKats",
  "avatar_url":"https://avatars2.githubusercontent.com/u/9680130",
  "content":"**```diff\n- New report\n```**",
  "embeds":[
    {
      "color":16711680,
      "author":{
        "name":"Chilace",
        "url":"http://battlelog.battlefield.com/bf4/soldier/Chilace/stats/227280600/pc/",
        "icon_url":"http://www.gravatar.com/avatar/b399d0376f9c49910534390b9a120f42"
      },
      "title":"24/7 METRO 2014 :: Meat Grinder :: NO EXPLOSIVES! :: *Fast XP*",
      "url":"http://battlelog.battlefield.com/bf4/ru/serverbrowserwarsaw/show/pc/9edaf665-617f-4b4e-b466-75cbda0f6525/",
      "thumbnail":{
        "url":"http://eaassets-a.akamaihd.net/bl-cdn/cdnprefix/production-283-20170323/public/base/bf4/map_images/195x79/xp0_metro.jpg"
      },
      "description":"Suspicious man",
      "fields":[
        {"name":"BATTLELOG","value":"http://battlelog.battlefield.com/bf4/ru/soldier/lachmut/stats/1024957778/pc/"},
        {"name":"ACI","value":"http://history.anticheatinc.com/bf4/index.php_searchvalue=lachmut"},
        {"name":"BF4DB","value":"https://bf4db.com/player/1024957778"},
        {"name":"247FAIRPLAY","value":"https://www.247fairplay.com/CheatDetector/lachmut"},
        {"name":"METABANS","value":"http://metabans.com/search/_phrase=lachmut"},
        {"name":"PBSCREENS","value":"https://pbscreens.com/_search&input=lachmut"},
        {"name":"I-STATS","value":"http://i-stats.net/index.php_action=pcheck&player=lachmut&game=BF4"},
        {"name":"BF4STATS","value":"http://bf4stats.com/search_q=lachmut"},
        {"name":"GOOGLE","value":"https://www.google.com/#q=%22lachmut%22"}
      ],
      "image":{
        "url":"http://www.gravatar.com/avatar/39a1fdf6d0337ba32f9b3d18a5015090"
      },
      "footer":{
        "text":"Reported at",
        "icon_url":"https://avatars2.githubusercontent.com/u/9680130"
      },
      "timestamp":"2017-05-11T20:39:22.278Z"
    }
  ]
}
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Can I suggest to implement reporting system with webhooks? Example:

2017-05-11 23-40-48 #playground - Discord (2).png

JSON Body:

Code:

{
  "username":"AdKats",
  "avatar_url":"https://avatars2.githubusercontent.com/u/9680130",
  "content":"**```diff\n- New report\n```**",
  "embeds":[
    {
      "color":16711680,
      "author":{
        "name":"Chilace",
        "url":"http://battlelog.battlefield.com/bf4/soldier/Chilace/stats/227280600/pc/",
        "icon_url":"http://www.gravatar.com/avatar/b399d0376f9c49910534390b9a120f42"
      },
      "title":"24/7 METRO 2014 :: Meat Grinder :: NO EXPLOSIVES! :: *Fast XP*",
      "url":"http://battlelog.battlefield.com/bf4/ru/serverbrowserwarsaw/show/pc/9edaf665-617f-4b4e-b466-75cbda0f6525/",
      "thumbnail":{
        "url":"http://eaassets-a.akamaihd.net/bl-cdn/cdnprefix/production-283-20170323/public/base/bf4/map_images/195x79/xp0_metro.jpg"
      },
      "description":"Suspicious man",
      "fields":[
        {"name":"BATTLELOG","value":"http://battlelog.battlefield.com/bf4/ru/soldier/lachmut/stats/1024957778/pc/"},
        {"name":"ACI","value":"http://history.anticheatinc.com/bf4/index.php_searchvalue=lachmut"},
        {"name":"BF4DB","value":"https://bf4db.com/player/1024957778"},
        {"name":"247FAIRPLAY","value":"https://www.247fairplay.com/CheatDetector/lachmut"},
        {"name":"METABANS","value":"http://metabans.com/search/_phrase=lachmut"},
        {"name":"PBSCREENS","value":"https://pbscreens.com/_search&input=lachmut"},
        {"name":"I-STATS","value":"http://i-stats.net/index.php_action=pcheck&player=lachmut&game=BF4"},
        {"name":"BF4STATS","value":"http://bf4stats.com/search_q=lachmut"},
        {"name":"GOOGLE","value":"https://www.google.com/#q=%22lachmut%22"}
      ],
      "image":{
        "url":"http://www.gravatar.com/avatar/39a1fdf6d0337ba32f9b3d18a5015090"
      },
      "footer":{
        "text":"Reported at",
        "icon_url":"https://avatars2.githubusercontent.com/u/9680130"
      },
      "timestamp":"2017-05-11T20:39:22.278Z"
    }
  ]
}
If you have the code to create that i'll gladly review it and look into adding it to the plugin as an alternative to email. However, i've had noted troubles getting OAuth to work, so hopefully there is another way to do it.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

NOTE TO EVERYONE RUNNING THE TEST VERSION.

 

The discord settings you currently see in the plugin are completely non-functional. Just pushed because I needed to modify some other sections. Anything you put into those settings will do nothing at this time. In fact the current discord player display shows the current teamspeak players. However, you can look over the settings and see what will be available.

Link to comment

Originally Posted by Chilace*:

 

If you have the code to create that i'll gladly review it and look into adding it to the plugin as an alternative to email. However, i've had noted troubles getting OAuth to work, so hopefully there is another way to do it.

I do not know how to do this with C# (however for a discord there are 2 libraries for C#: https://discordapi.com/unofficial/comparison.html).

For my own purposes I use https://ifttt.com/maker_webhooks for newsfeed and Node.js for transforming webhooks into discord format from our group on https://vk.com (social network like facebook).

Webhook is just a simple http web request with method 'POST', Content-Type 'application/json' and json data in request body.

 

Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.

And as well as in the case of a widget.json (you must first enable it) you must first create an endpoint on the any channel for incoming webhooks (you must have permission to manage webhooks):

2017-05-13 01-59-22 #playground - Discord.png

In fact, the webhooks endpoint can be created through api, but this requires a bot or authentication, so it's easier to do it manually.

After creating webhooks endpoint just send requests to it (https://discordapp.com/api/webhooks/.webhook.token) with the required data (rate limit 5 req/sec).

 

Docs: https://discordapp.com/developers/docs/intro

Unofficial community-driven Discord Server for devs: https://discord.gg/discord-api

 

P.S. There is a limit for IL that can be redesigned for this purpose: myrcon.net/.../insane-limits-report-script-via-pushbullet

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

Originally Posted by ColColonCleaner*:

 

I do not know how to do this with C# (however for a discord there are 2 libraries for C#: https://discordapi.com/unofficial/comparison.html).

For my own purposes I use https://ifttt.com/maker_webhooks for newsfeed and Node.js for transforming webhooks into discord format from our group on https://vk.com (social network like facebook).

Webhook is just a simple http web request with method 'POST', Content-Type 'application/json' and json data in request body.

 

Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.

And as well as in the case of a widget.json (you must first enable it) you must first create an endpoint on the any channel for incoming webhooks (you must have permission to manage webhooks):

2017-05-13 01-59-22 #playground - Discord.png

In fact, the webhooks endpoint can be created through api, but this requires a bot or authentication, so it's easier to do it manually.

After creating webhooks endpoint just send requests to it (https://discordapp.com/api/webhooks/.webhook.token) with the required data (rate limit 5 req/sec).

 

Docs: https://discordapp.com/developers/docs/intro

Unofficial community-driven Discord Server for devs: https://discord.gg/discord-api

 

P.S. There is a limit for IL that can be redesigned for this purpose: myrcon.net/.../insane-limits-report-script-via-pushbullet

If it's the same as using pushbullet that's nice since I already communicate with pushbullet for reports in AdKats. Please send me that limit code.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Last night I found an issue with certain characters allowed in Discord member names. After 10 hours of trying to figure it out. Specifically this character \ud83d\udc94 and others like it cause procon's JSON parser to just throw up and crash. That is fixed now, along with some other changes to update frequency. Also added a display of the current people in the entire discord server with their current channels, and a matching one for people in the list of approved channels.

Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

Everyone running AdKats should run this on their database.

 

It's an update to the blank data fix for stat logger, and stops player's clan tags from being deleted by stat logger. You should also update to the latest test version of AdKats after running this query.

 

If you are using PHPMyAdmin, remove the DELIMITER statements and use the delimiter field underneath your query window. Use delimiter $$

 

Code:

DELIMITER $$
DROP TRIGGER IF EXISTS `Player_Update_BlankDataFix`$$
DROP TRIGGER IF EXISTS `Player_Update_BlankDataFix2`$$
CREATE TRIGGER `Player_Update_BlankDataFix2` BEFORE UPDATE ON `tbl_playerdata`
 FOR EACH ROW BEGIN
    IF (NEW.SoldierName IS NULL OR CHAR_LENGTH(NEW.SoldierName) = 0) 
       AND OLD.SoldierName IS NOT NULL
       AND CHAR_LENGTH(OLD.SoldierName) > 0
        THEN SET NEW.SoldierName = OLD.SoldierName;
    END IF;
    IF (NEW.EAGUID IS NULL OR CHAR_LENGTH(NEW.EAGUID) = 0)
        AND OLD.EAGUID IS NOT NULL 
        AND CHAR_LENGTH(OLD.EAGUID) > 0
        THEN SET NEW.EAGUID = OLD.EAGUID;
    END IF;
    IF (NEW.PBGUID IS NULL OR CHAR_LENGTH(NEW.PBGUID) = 0)
        AND OLD.PBGUID IS NOT NULL 
        AND CHAR_LENGTH(OLD.PBGUID) > 0
        THEN SET NEW.PBGUID = OLD.PBGUID;
    END IF;
    IF (NEW.IP_Address IS NULL OR CHAR_LENGTH(NEW.IP_Address) = 0)
        AND OLD.IP_Address IS NOT NULL 
        AND CHAR_LENGTH(OLD.IP_Address) > 0
        AND OLD.IP_Address <> '127.0.0.1'
        THEN SET NEW.IP_Address = OLD.IP_Address;
    END IF;
    IF NEW.ClanTag IS NULL
        THEN SET NEW.ClanTag = OLD.ClanTag;
    END IF;
END$$
DELIMITER ;
Link to comment

Originally Posted by Sp0rAdiC*:

 

Everyone running AdKats should run this on their database.

 

It's an update to the blank data fix for stat logger, and stops player's clan tags from being deleted by stat logger. You should also update to the latest test version of AdKats after running this query.

 

Code:

DELIMITER $$
DROP TRIGGER IF EXISTS `Player_Update_BlankDataFix`$$
DROP TRIGGER IF EXISTS `Player_Update_BlankDataFix2`$$
CREATE TRIGGER `Player_Update_BlankDataFix2` BEFORE UPDATE ON `tbl_playerdata`
 FOR EACH ROW BEGIN
    IF (NEW.SoldierName IS NULL OR CHAR_LENGTH(NEW.SoldierName) = 0) 
       AND OLD.SoldierName IS NOT NULL
       AND CHAR_LENGTH(OLD.SoldierName) > 0
        THEN SET NEW.SoldierName = OLD.SoldierName;
    END IF;
    IF (NEW.EAGUID IS NULL OR CHAR_LENGTH(NEW.EAGUID) = 0)
        AND OLD.EAGUID IS NOT NULL 
        AND CHAR_LENGTH(OLD.EAGUID) > 0
        THEN SET NEW.EAGUID = OLD.EAGUID;
    END IF;
    IF (NEW.PBGUID IS NULL OR CHAR_LENGTH(NEW.PBGUID) = 0)
        AND OLD.PBGUID IS NOT NULL 
        AND CHAR_LENGTH(OLD.PBGUID) > 0
        THEN SET NEW.PBGUID = OLD.PBGUID;
    END IF;
    IF (NEW.IP_Address IS NULL OR CHAR_LENGTH(NEW.IP_Address) = 0)
        AND OLD.IP_Address IS NOT NULL 
        AND CHAR_LENGTH(OLD.IP_Address) > 0
        AND OLD.IP_Address <> '127.0.0.1'
        THEN SET NEW.IP_Address = OLD.IP_Address;
    END IF;
    IF NEW.ClanTag IS NULL
        THEN SET NEW.ClanTag = OLD.ClanTag;
    END IF;
END$$
DELIMITER ;
The query doesn't seem to want to run on my database. sorry if I'm being an idiot.

Code:

SQL query:

DELIMITER ;

MySQL said: Documentation
#1064 - 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 'DELIMITER' at line 1
* Restored post. It could be that the author is no longer active.
Link to comment
  • Plugin Developer

Originally Posted by ColColonCleaner*:

 

The query doesn't seem to want to run on my database. sorry if I'm being an idiot.

Code:

SQL query:

DELIMITER ;

MySQL said: Documentation
#1064 - 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 'DELIMITER' at line 1
It looks like perhaps you have the incorrect line selected when you ran it. Make sure the entire query is ran, not just a part of it.

 

Your error shows 'delimiter ;' but that is the last line in the script.

Link to comment

Originally Posted by WolfBlade*:

 

XaosBr,

 

This is a small little script that you can add to your ProconRulz that might help with what you're looking for. It doesn't display what you need for each individual player, but it will show them what the current stats are on the server when someone types - !desfig, !knife or !kills - You can change that to what you need under the "On Say" at the bottom.

 

# STATS TO TRACK

On Kill;

Incr %m_kills%

Headshot;Incr %m_head%

Weapon Weapons/Knife/Knife,Melee;Incr %m_knife%

On Spawn;Not PlayerFirst;Incr %m_death%

 

# COUNTING KILLS ECT

On Kill;

If %m_kills% > %server_kills%;Set %server_kills% %m_kills%;Set %server_m_kills_player% %p%;Log Most kills %server_m_kills_player% %m_kills%

If %m_head% > %server_head%;Set %server_head% %m_head%;Set %server_m_head_player% %p%;Log Most Headshots %server_m_head_player% %m_head%

If %m_knife% > %server_knife%;Set %server_knife% %m_knife%;Set %server_m_knife_player% %p%;Log Most knife %server_m_knife_player% %m_knife%

If %m_death% > %server_death%;Set %server_death% %m_death%;Set %server_m_death_player% %p%;Log Most Death %server_m_death_player% %m_death%

 

# SET THE AMOUNT STATS MESSAGE

On Kill;Incr %server_stats_counter%;If %server_stats_counter% > 30;Set %server_stats_counter% 0;Set %server_msg_now% 1

 

# OUTPUT MESSAGE

On Kill;If %server_msg_now% == 1;

If %server_m_kills_player% != 0;Say - Most KILLS %server_m_kills_player% -- %server_m_kills[%server_m_kills_player%]% kills

If %server_m_head_player% != 0;Say - Most HEADSHOTS %server_m_head_player% -- %server_m_head[%server_m_head_player%]% kills

If %server_m_knife_player% != 0;Say - Most KNIFES %server_m_knife_player% -- %server_m_knife[%server_m_knife_player%]% knives

If %server_m_death_player% != 0;Say - Most DEATHS %server_m_death_player% -- %server_m_death[%server_m_death_player%]% deaths

Set %server_msg_now% 0

 

On Say;Text !desfig,!knife, !kills

PlayerSay Most KILLS %server_m_kills_player% -- %server_m_kills[%server_m_kills_player%]% kills

PlayerSay Most HEADSHOTS %server_m_head_player% -- %server_m_head[%server_m_head_player%]% kills

PlayerSay Most KNIFES %server_m_knife_player% -- %server_m_knife[%server_m_knife_player%]% knives

PlayerSay Most DEATHS %server_m_death_player% -- %server_m_death[%server_m_death_player%]% deaths

Hope this helps~!
* Restored post. It could be that the author is no longer active.
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.