Jump to content

Insane Limits (0.9.17.0 - 30-MAR-2015) + BFHL


ImportBot

Recommended Posts

Originally Posted by ColColonCleaner*:

 

I want to use this to setup a whitelist for idle kick.....how do I do this what are the settings specifically? I'm new to insane limits

Which game? There is a mandatory idle kick in BF4 after 5 minutes that cannot be disabled.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by sammad143*:

 

// Limit Player's KDR & Rank

 

double maxKDR = 2; // Maximum KD, anyone with higher is kicked

double maxRank = 140; // Maximum Rank, anyone with higher is kicked

 

String[] msgs = { "Sorry, your ",

" is higher than ",

"KDR",

"Rank" };

 

if (player.Kdr > maxKDR || player.Rank > maxRank)

{

String kMsg = msgs[0];

if (player.Kdr > maxKDR)

{

kMsg = kMsg + msgs[2] + msgs[1] + maxKDR.ToString("F1");

}

else

{

kMsg = kMsg + msgs[3] + msgs[1] + maxRank.ToString();

}

plugin.KickPlayerWithMessage(player.Name, kMsg);

}

return false;

 

How do I add a clan TAG whitelist in the above code, for example I want no K/D , rank restrictions on players with XYZ and ABC clan tags in battlelog.

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

Originally Posted by Grovax*:

 

@sammad143:

 

First activate Whitelists at Insane Limits, for that set use_white_list to true and then add ur clantags or playernames to the whitelists

 

Code:

// Limit Player's KDR & Rank

double maxKDR = 2; // Maximum KD, anyone with higher is kicked
double maxRank = 140; // Maximum Rank, anyone with higher is kicked

//Whitelist
if (plugin.isInWhitelist(player.Name)) return false;

String[] msgs = {"Sorry, your "," is higher than ","KDR","Rank"};

if (player.Kdr > maxKDR || player.Rank > maxRank) {
	String kMsg = msgs[0];
	if (player.Kdr > maxKDR) {
		kMsg = kMsg + msgs[2] + msgs[1] + maxKDR.ToString("F1");
	} else {
		kMsg = kMsg + msgs[3] + msgs[1] + maxRank.ToString();
	}
	plugin.KickPlayerWithMessage(player.Name, kMsg);
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by virusdead*:

 

a result of "player.CountryName" I would have wanted to visit the player added numbers that it connects to the server

 

plugin.SendGlobalMessage("Welcome to " + player.Name + " from " + player.CountryName + ".");

return false;

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

Originally Posted by BuRockK*:

 

Hello, im trying to test OnTeamChange event in IL but i want action to be taken only on first teamchange and if requirements are not met.

 

Example:

I have set some ClanTags to a custom list which will be the allowed clans list.

 

When a player joins server and finishes loading map, players team state changes from Neutral to lets say US Army. Which mean the player finished loading map and entered the game.

 

Now im not familiar with IL. What would be the code in something like this:

 

Code:

if (!plugin.isInList(player.Name, JRWhitelist) | !plugin.isInList(player.Tag, JRAllowedClans)) {

}
EDIT: i added some coding accourding to what ive read in details of the plugin

 

Code:

String JRWhitelist = "JRWhitelist";
String JRAllowedClans = "JRAllowedClans";
String JRState = "strValue";

if (!plugin.isInList(player.Name, JRWhitelist) | !plugin.isInList(player.Tag, JRAllowedClans)) {
    return true;
}
So now it doesnt give those 2 errors shown in attachment. Also im not sure if String JRState = "strValue"; is correct in order for me to use it with an in-game command to change its state from "on" to "off" or vice versa.

 

Attached Files:

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

Originally Posted by ColColonCleaner*:

 

Hello, im trying to test OnTeamChange event in IL but i want action to be taken only on first teamchange and if requirements are not met.

 

Example:

I have set some ClanTags to a custom list which will be the allowed clans list.

 

When a player joins server and finishes loading map, players team state changes from Neutral to lets say US Army. Which mean the player finished loading map and entered the game.

 

Now im not familiar with IL. What would be the code in something like this:

 

Code:

if (!plugin.isInList(player.Name, JRWhitelist) | !plugin.isInList(player.Tag, JRAllowedClans)) {

}
Heres the setup i have in IL:
If you continue to have issues with this in PR or IL, there is a banned clan tag feature in AdKats.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

If you continue to have issues with this in PR or IL, there is a banned clan tag feature in AdKats.

Oh im just trying to test if OnTeamChange would work on a just joined player, as i explained above. If the Neutral team state of a player can be used in an OnTeamChange it would be very nice.

 

But i dont know IL so i was trying to figure out the coding part.

 

BTW i updated my post above.

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

Originally Posted by s1ngular1ty*:

 

Oh im just trying to test if OnTeamChange would work on a just joined player, as i explained above. If the Neutral team state of a player can be used in an OnTeamChange it would be very nice.

 

But i dont know IL so i was trying to figure out the coding part.

 

BTW i updated my post above.

Read entire post before trying this code...

 

 

Set evaluation to OnTeamChange

 

Set first_check to Expression

 

Set first_check expression to:

 

Code:

(plugin.isInList(player.Tag, "clan_list") && !plugin.isInList(player.Name, "white_list"))
Set action to Kick

 

Set kick_message to:

 

Code:

kick_message = %p_n%, your clan [%p_ct%] is not welcomed here!
Create two custom lists.

  • clan_list
  • white_list

Set clan_list comparison to CaseSensitive

Add clan tags to it's data variable like this: TEST, TEST2, ETC

 

Set white_list comparison to CaseSensitive

Add names of players you want white listed to it's data variable like this: Player1, Player2, Player3

 

 

This code will run on any team change event and should catch the team change event of a player that just joined the server. It shouldn't matter it if runs every time someone changes teams. So don't focus on trying to prevent it running all the time. Keep it simple.

 

Insane Limits is almost like writing a custom plugin. You can do a lot with it. It takes normal C# code as arguments to limit checks.

 

 

Edit:

 

Instead of creating your own custom white_list you can use the built in InsaneLimits white lists by changing the first_check expression to this:

 

Code:

(plugin.isInList(player.Tag, "clan_list") && !player.isInWhitelist)
Also you need to enable white lists in Insane Limits up at the top part of the variables section. Then you can enter clans tags or players you want to white list in the Whitelist section of the plugin variables.

 

The first_check expression will check a boolean flag for the player that is set by InsaneLimits if they are in either white list. The expression reads like, if the player's tag is in "clan_list" and the player is NOT in an InsaneLimits white list then do something to them.

 

 

Edit:

 

Bad news... Looks like InsaneLimits suppresses the 1st move that occurs when a player joins. So this isn't going to work.

 

Also looks like InsaneLimits doesn't process the OnTeamChange event at all for BF4.

 

Sorry.....

 

 

Final Edit:

 

I tried using the OnJoin event and it seems like it would work but I remember this failing in the past. From the debug logs it appears it fires after the player is updated from BattleLog but I didn't have many joining. If more players joined it could delay a player's updates and cause the check to fail because the Battlelog info was not there yet.

 

You can try the above code using OnJoin instead of OnTeamChange and see if it works. I'm doubting it will be reliable.

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

Originally Posted by BuRockK*:

 

Well, if its not working for OnTeamChange, there goes another theory down. I wanted to test if we could somehow use Neutral team state for a player if that player has just joined server and currently loading map.

 

But i will still try anyway just for the sake of learning

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

Originally Posted by ColColonCleaner*:

 

Well, if its not working for OnTeamChange, there goes another theory down. I wanted to test if we could somehow use Neutral team state for a player if that player has just joined server and currently loading map.

 

But i will still try anyway just for the sake of learning

What about it doesn't work?

 

Can't you just check for when they go from neutral to a real team and ignore the other cases?

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

Originally Posted by s1ngular1ty*:

 

What about it doesn't work?

 

Can't you just check for when they go from neutral to a real team and ignore the other cases?

The OnTeamChange event never fires in BF4 as far as I can tell. I setup a simple limit to test it that would log every time it fires. It never did.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

The OnTeamChange event never fires as far as I can tell. I setup a simple limit to test it that would log every time it fires. It never did.

Huh, maybe it itself intentionally ignores that particular move so people writing team change limits don't get confused by their limit firing on joining players.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

What about it doesn't work?

 

Can't you just check for when they go from neutral to a real team and ignore the other cases?

Umm, yea... thats what i actually was trying to do but since you know i suck at C sharp i cant set a Limit in IL on that to begin with..

 

Heres how i would do in ProconRulz if on teamchange was supported..

 

On TeamChange;PlayerFirst;if %ini_whitelist_%p%% 1;kick %p% "joins restricted"

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

Originally Posted by s1ngular1ty*:

 

Huh, maybe it itself intentionally ignores that particular move so people writing team change limits don't get confused by their limit firing on joining players.

The event never fired even when I manually changed my team. Seems like it is broken for BF4 or something.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Huh, maybe it itself intentionally ignores that particular move so people writing team change limits don't get confused by their limit firing on joining players.

I have a feeling you didn't read my entire post. The code I posted will probably work some of the time using OnJoin instead of OnTeamChange.

 

You can test its reliability, but it will work at least some of the time. Try it and see what happens. The code for the limit is exactly the same.

 

You could use the same code with OnSpawn if you wanted as well. Using OnSpawn will definitely work.

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

Originally Posted by BuRockK*:

 

Okay i dont know how you guys couldnt manage to kick on join for whatever reason but i was able to make it work every time i tested it

 

Heres the setup i have.. i just used "(!player.isInWhitelist)" expression for the first_check

 

 

Now all i need is how to make a bool var in that limit and use it in a OnAnyChat limit so admins can turn it on or off.

 

Also would like to know if theres a way to list or add/delete entries to the built-in whitelist of IL with an ingame command

 

Attached Files:

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

Originally Posted by s1ngular1ty*:

 

Okay i dont know how you guys couldnt manage to kick on join for whatever reason but i was able to make it work every time i tested it

 

Heres the setup i have.. i just used "(!player.isInWhitelist)" expression for the first_check

 

 

Now all i need is how to make a bool var in that limit and use it in a OnAnyChat limit so admins can turn it on or off.

 

Also would like to know if theres a way to list or add/delete entries to the built-in whitelist of IL with an ingame command

Don't claim success if you haven't had many joining yet. If you are whitelisting based on clan Tag you could have problems if lots join your server and it takes longer to update their clan tag from BattleLog.

 

If you are just testing on 1 player joining your server it will probably always works. However, adding more players joining can cause delays which can cause the check to fail. PapaCharlie even says there are situations where limits don't evaluate during player stat updates because that is just how InsaneLimits works and to fix would be a major rewrite.

 

 

I hope it works out for you though. Way easier than writing your own plugin.

 

 

Also I noticed a couple things in your screenshot. You have the limit state set to virtual, it should be set to enabled. Secondly, why do you have a Kick and EABAN action? You can just use the EABAN action by itself. It will kick the player and ban them temporarily. Having both doesn't buy you anything.

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

Originally Posted by BuRockK*:

 

Don't claim success if you haven't had many joining yet. If you are whitelisting based on clan Tag you could have problems if lots join your server and it takes longer to update their clan tag from BattleLog.

 

If you are just testing on 1 player joining your server it will probably always works. However, adding more players joining can cause delays which can cause the check to fail. PapaCharlie even says there are situations where limits don't evaluate during player stat updates because that is just how InsaneLimits works and to fix would be a major rewrite.

 

 

I hope it works out for you though. Way easier than writing your own plugin.

 

 

Also I noticed a couple things in your screenshot. You have the limit state set to virtual, it should be set to enabled. Secondly, why do you have a Kick and EABAN action? You can just use the EABAN action by itself. It will kick the player and ban them temporarily. Having both doesn't buy you anything.

I suspect problems when having multiple joins at around same time. For now it works. Maybe keeping players in queue for a bit longer would work? i dont know.

 

Yea i had it virtual when i was testing. Also it was a mistake using EABan with having kick. it was disconnecting procon from layer for some reason so i took EABan off.

 

So having this same limit as an onSpawn would be much better in a server where lots of players joining more frequently? what is the difference between an onJoin and onSpawn if in both events players are being queued for actions?

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

Originally Posted by s1ngular1ty*:

 

I suspect problems when having multiple joins at around same time. For now it works. Maybe keeping players in queue for a bit longer would work? i dont know.

 

Yea i had it virtual when i was testing. Also it was a mistake using EABan with having kick. it was disconnecting procon from layer for some reason so i took EABan off.

 

So having this same limit as an onSpawn would be much better in a server where lots of players joining more frequently? what is the difference between an onJoin and onSpawn if in both events players are being queued for actions?

Yes, using OnSpawn ALWAYS works. I've been trying to tell you this for several days. Just use OnSpawn.

 

The OnSpawn event fires at a different time than OnJoin.

 

If you want a temp ban you can use EABAN (by itself) which will kick + temp ban the player for some period of time so they don't come right back.

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

Originally Posted by BuRockK*:

 

Yes, using OnSpawn ALWAYS works. I've been trying to tell you this for several days. Just use OnSpawn.

 

The OnSpawn event fires at a different time than OnJoin.

 

If you want a temp ban you can use EABAN (by itself) which will kick + temp ban the player for some period of time so they don't come right back.

Yea i know man, i was just being eager to get onjoin to work with different logics. So wouldnt it be the same thing if alotta people spawn more frequently just like it would be in an onJoin? im just trying to understand why it wouldnt work for onjoin because it seems IL dont act until the player finishes loading map and actually joins game. After THAT limit queues the player for the action (fetches battlelog info, checks if player triggers limit or not etc.). Maybe its a DICE thing to be fixed?

 

Also IL could make a stats list for players like it could save battlelog stats of every player joined the server at least once and have it there until server restarts or shutdown. So it wouldnt take too long to get fetch stats for joining player and limit can act more quicker. Just an idea. not sure if it would work with IL's structure or anything

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

Originally Posted by s1ngular1ty*:

 

Yea i know man, i was just being eager to get onjoin to work with different logics. So wouldnt it be the same thing if alotta people spawn more frequently just like it would be in an onJoin? im just trying to understand why it wouldnt work for onjoin because it seems IL dont act until the player finishes loading map and actually joins game. After THAT limit queues the player for the action (fetches battlelog info, checks if player triggers limit or not etc.). Maybe its a DICE thing to be fixed?

I told you why. The OnSpawn event fires at a later time which is usually after the player's stats have been updated. OnJoin can fire before they even show up in the Player List. You can watch this happen if you raise the debug level to 6. You will see when events are triggered. There will be messages in the plugin log window.

 

From my experience trying this same thing, OnSpawn always works and OnJoin doesn't always work. Feel free to prove me wrong if you want. I'm just trying to help you.

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

Originally Posted by BuRockK*:

 

I told you why. The OnSpawn event fires at a later time which is usually after the player's stats have been updated. OnJoin can fire before they even show up in the Player List. You can watch this happen if you raise the debug level to 6. You will see when events are triggered.

 

From my experience trying this same thing, OnSpawn always works and OnJoin doesn't always work. Feel free to prove me wrong if you want. I'm just trying to help you.

Yea i know, i edited my post about this while you were typing.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Yea i know, i edited my post about this while you were typing.

BattleLog info is not fectched for every limit. That would not be wise and would make way too many requests and would be too slow. The info is updated once when a player joins and kept in memory and refreshed at the start of new rounds if the player stays.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

BattleLog info is not fectched for every limit. That would not be wise and would make way too many requests and would be too slow. The info is updated once when a player joins and kept in memory and refreshed at the start of new rounds if the player stays.

Yea thats what i meant kindda. Info is kept in memory or in a log for that matter and stay there but no info of any player is deleted until a server restart so those infos can be used whenever a player joins the server again some other time. Would be a big ass list maybe but would work?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Yea thats what i meant kindda. Info is kept in memory or in a log for that matter and stay there but no info of any player is deleted until a server restart so those infos can be used whenever a player joins the server again some other time. Would be a big ass list maybe but would work?

No that is a very bad idea and would use way too much memory. InsaneLimits works fine the way it is. You just have to stop fighting it and accept using OnSpawn like I have been telling you to do. IT WORKS.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

No that is a very bad idea and would use way too much memory. InsaneLimits works fine the way it is. You just have to stop fighting it and accept using OnSpawn like I have been telling you to do. IT WORKS.

Yea, but ill be using both. If onJoin fails (which will eventually) it will do the job in OnSpawn
* 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.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • 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.