Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

Papa, got a request for you and I'm obviously not sure how to do it... It would utilize the Weapon Restriction Script but id like the infractions to be used with Adkats Punishment settings. So if they use a restricted weapon it would use ADKats and send them a message and a reason just as if someone typed "!punish player used a restricted weapon"

You'll have to confirm with ColColonCleaner, but AFAIK that is not currently possible. Maybe someday.
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by Pvtjohntowle*:

 

Code:

	List<String> bad_words = new List<String>();
	
	bad_words.Add("word1");
	bad_words.Add("word2");
	bad_words.Add("word3");
	bad_words.Add("word4");
	
	String[] chat_words = Regex.Split(player.LastChat, @"\s+");
	
	foreach(String chat_word in chat_words)
	    foreach(String bad_word in bad_words)
		    if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
			{
                            plugin.ConsoleWarn(plugin.R("Kicked %p_n% for saying "+bad_word));
                            plugin.SendGlobalMessage(plugin.R("Kicking %p_n% for profanity!"));
			    plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked for saying "+bad_word+"!"));
			}	
			
	return false;
I like this code but I don't want to kick the player immediately. I would like 2 kills first with warning then temp ban for 5 minutes and ability to make this ban permanent. How do you code this for me?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Code:

	List<String> bad_words = new List<String>();
	
	bad_words.Add("word1");
	bad_words.Add("word2");
	bad_words.Add("word3");
	bad_words.Add("word4");
	
	String[] chat_words = Regex.Split(player.LastChat, @"\s+");
	
	foreach(String chat_word in chat_words)
	    foreach(String bad_word in bad_words)
		    if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
			{
                            plugin.ConsoleWarn(plugin.R("Kicked %p_n% for saying "+bad_word));
                            plugin.SendGlobalMessage(plugin.R("Kicking %p_n% for profanity!"));
			    plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked for saying "+bad_word+"!"));
			}	
			
	return false;
I like this code but I don't want to kick the player immediately. I would like 2 kills first with warning then temp ban for 5 minutes and ability to make this ban permanent. How do you code this for me?
What do you mean by "ability to make this ban permanent"? You mean, change the temp ban to permanent in the code, or only for one player? I can do the former, not the latter.

 

Here is the new code:

 

OnAnyChat, first_check Code:

 

Code:

	List<String> bad_words = new List<String>();
	
	bad_words.Add("word1");
	bad_words.Add("word2");
	bad_words.Add("word3");
	bad_words.Add("word4");
	
	String[] chat_words = Regex.Split(player.LastChat, @"\s+");
        String msg = null;
	
	foreach(String chat_word in chat_words)
	    foreach(String bad_word in bad_words)
		    if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
			{
                            plugin.PRoConChat(plugin.R("Punished %p_n% for saying "+bad_word));
                            plugin.SendGlobalMessage(plugin.R("Punished %p_n% for profanity!"));
                            String key = "k_bad_words_pvt_" + player.Name;
                            int warnings = 1;
                            if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
                            if (warnings <= 2) {
                                msg = player.Name + ": warning " + warnings + " of 2, stop of you will be banned!";
                                plugin.SendPlayerMessage(player.Name, msg);
                                plugin.PRoConChat(msg);
                                plugin.KillPlayer(player.Name, 5);
                            } else {
                                msg = "for ignoring warnings about profanity";
                                plugin.PRoConChat("Banned " + player.Name + ": " + msg);
                                plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 5, msg);
                            }
                            plugin.Data.setInt(key, warnings + 1);
			}	
			
	return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Pvtjohntowle*:

 

What do you mean by "ability to make this ban permanent"? You mean, change the temp ban to permanent in the code, or only for one player? I can do the former, not the latter.

So the code the action is kick the player twice then temp ban but for how long? I have seen other plugins have "number of seconds" for the temp ban but I cannot see that in your code. Thanks for making the change for me
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

So the code the action is kick the player twice then temp ban but for how long? I have seen other plugins have "number of seconds" for the temp ban but I cannot see that in your code. Thanks for making the change for me

No, you said 2 kills then a temp ban for 5 minutes. That's what the code does now. You didn't say anything about kicks.

 

Find the number 5 in the EABanPlayerWithMessage line, that's the number of minutes for the temp ban. If you change the code or time, it changes it for everyone, not just one player.

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

Originally Posted by Dudenell*:

 

Yes, you are right, I oversimplified. We need to do some additional checking in first_check for your other cases.

 

In first_check, you need to know if !admin by itself should trigger an activation or not. If the player is an admin, you don't want to restrict by activations, but that's fine, you can adjust for that in second_check. You only need activation counting for the non-admin player, and even then, only if the type !admin correctly.

 

So basically first_check should handle all of the "player is an admin" cases and also the "player is not an admin and only typed !admin" case. You can do that entirely in first_check code.

 

That means second_check just has to handle the "player correctly typed !admin " cases, ignoring the activation count if the player is an admin.

 

Still one limit, just a much more complicated first_check Code.

 

Annotating your list with which check does the work:

 

* Anyone can type !admin or !admin (both first and second)

 

* To call an admin (tweet the message) it must be in the format !admin (both first and second, mostly second)

 

* If an admin types !admin, it will say that "XXX is a current admin!" to the whole server (hence the reason for two limits) (first only, to avoid activation counting and error messaging)

 

* If someone types !admin or !admin and an admin or admins are present on the server, it will list their names and tell the whole server (contradicts the next bullet_)

 

* If the player is not an admin, and they type !admin without they are given an error message and it doesn't count as an activation (first only)

 

* If the player is not an admin, they are only allowed 1 tweet (or admin call per round), currently based on activations (first and second, mostly second)

 

EDIT: You can think of it this way. first_check and second_check are like two separate limits. first_check can't do any activation counting, so you put all the code that doesn't care about activation counting in first_check. second_check does care about activation counting, but you can conditionally ignore the count if you want to.

 

While separate, they do have a dependency. Whatever bool value first_check returns controls whether or not second_check runs and gets an activation count. You are completely in control of when that matters and when that doesn't, though.

I can't figure out what I'm missing, no messages show at all...

 

It's on any chat

First Check is this code

Code:

//Messages for display
string msg3 = " is an admin";
string msg5 = ", there is an admin on the server! Current admins are ";
string msg6 = ", the correct format for admin call is !admin <reason> Example: !admin bob is hacking";
//Checks for player being an admin
bool canKill = false;
bool canKick = false;
bool canBan = false;
bool canMove = false;
bool canChangeLevel = false;
bool hasAccount = plugin.CheckAccount(player.Name, out canKill, out canKick, out canBan, out canMove, out canChangeLevel);
//Other Checks related to admin
bool first = true;
bool firstMsg3 = true;
bool isAnyAdminOn = false;



//only if this matches
Match m = Regex.Match(player.LastChat, @"^\s*!admin\s+([^\s].*)$", RegexOptions.IgnoreCase);
string reason = String.Empty;

if (m.Success) reason = m.Groups[1].Value; // This is the reason, captured by ([^\s].*)$
if (m.Success) {
	if (reason == String.Empty) {
		//for checking if player is admin
		List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
		all.AddRange(team1.players);
		all.AddRange(team2.players);
		if (team3.players.Count > 0) all.AddRange(team3.players);
		if (team4.players.Count > 0) all.AddRange(team4.players);
		//Setting the message
		foreach (PlayerInfoInterface p in all) {
				if (p.Data.getBool("adminon")) {
					isAnyAdminOn = true;
					if (player.Name == p.Name) {
						msg3 = player.Name + msg3;
					} 
					else {
						if (firstMsg3) { 
							msg3 = msg3 + " and so is " + p.Name;
							firstMsg3 = false;
						} 
						else {
							msg3 = msg3 + ", " + p.Name;
						}
					}
				
				}
			}
		//Displaying the message
		if (hasAccount && canKick){
			plugin.SendGlobalMessage(player.Name + msg3);
			return false;
			}
		else{	
			plugin.ServerCommand("admin.say" , (player.Name + msg6), "player" , player.Name );
			return false;
		}
	}

	else {
		return true;
	}
}

return false;
Second check is this code

Code:

string msg1 = ", you have requested an admin! This action has been logged!";
string msg2 = " requested an admin on server #3 " + DateTime.Now.ToShortDateString() + " Message: ";
string msg4 = ", you have activated request admin too many times";


int count = (int) limit.Activations(player.Name);

if (count == 1) {
		plugin.Tweet(player.Name + msg2 + player.LastChat);
		//plugin.ServerCommand("admin.yell", (player.Name + msg1), "30", "player", player.Name);
		plugin.ServerCommand("admin.say" , (player.Name + msg1), "player" , player.Name );
		plugin.PRoConChat("ADMIN > " + player.Name + ": Has requested an admin " + count + " times with no admin on");
		plugin.ServerCommand("punkBuster.pb_sv_command", "PB_SV_GetSs");
		}
else {
		//plugin.ServerCommand("admin.yell", (player.Name + msg4), "30", "player", player.Name);
		plugin.ServerCommand("admin.say" , (player.Name + msg4), "player" , player.Name );
		plugin.PRoConChat("ADMIN > " + player.Name + ": Has requested an admin " + count + " times with no admin on");
}
return false;
I still have more to add to the second check code, but I should at least get a message?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I was wondering if there were anyway to be able to see if a player on a BF4 server were a Player, Spectator or Commander. As far as I knew there wasn't a way, however I noticed something in the Procon Console tab. Every so often the server lists all players with the command admin.listPlayers all. The result of this is similar to the following:

OK 10 name guid teamId squadId kills deaths score rank ping type 1 PLAYER EA_################################ 0 0 0 0 0 50 17 0

As I watched this while my server was full, a player joined as a Commander. I noticed a simple change in this list for that particular player, so, after the server emptied, I decided to check it by entering the server myself as each type. This is what I found:

Player: OK 10 name guid teamId squadId kills deaths score rank ping type 1 PLAYER EA_################################ 0 0 0 0 0 50 17 0

Spectator:OK 10 name guid teamId squadId kills deaths score rank ping type 1 PLAYER EA_################################ 0 0 0 0 0 50 17 1

Commander:OK 10 name guid teamId squadId kills deaths score rank ping type 1 PLAYER EA_################################ 0 0 0 0 0 50 17 2

As you can clearly see, type is 0 for a Player, 1 for a Spectator and 2 for a Commander.

 

Now I don't know if Insane Limits has access to this output either from Procon or the server itself, but if so, is it possible to add this to the PlayerInfoInterface? e.g.

bool isSpectator { get; } // True - Player is a spectator

bool isCommander { get; } // True - Player is a commander

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

Originally Posted by PapaCharlie9*:

 

I can't figure out what I'm missing, no messages show at all...

What exactly are typing as a command and are you an admin or not and are there other admins? Need all the context.

 

The first_check code isn't quite right. It's not handling the no case. Other than that, the chat message code looks fine. Make sure you don't have anything set to virtual in Insane Limits.

 

Also, perhaps I misunderstood the admin types !admin case? Is that supposed to enable that admin as being visible as an admin? I thought anyone with hasAccount && canKick is visible as an admin when a non-admin types !admin. I'll assume the former, only admins that have voluntarily typed !admin will be visible to non-admins as an admin.

 

Also, I'm still confused about the contradictory cases. What happens if a non-admin types !admin? Does he get a list of admins that are on, or does he get an error message and does not increase the counter? I'm going to assume the former.

 

Here's skeleton first_check code. It does all the decision logic and logs debug messages and sends chat messages, but you have to put the rest in. Just !admin will repeat the command back to the player, while !admin repeats the reason to all players, just as a sanity check that you can get chat message to work. You can remove/change those lines, of course.

 

Code:

//Checks for player being an admin
bool canKill = false;
bool canKick = false;
bool canBan = false;
bool canMove = false;
bool canChangeLevel = false;
bool hasAccount = plugin.CheckAccount(player.Name, out canKill, out canKick, out canBan, out canMove, out canChangeLevel);

String adminFlag = "adminon";

Match noReasonMatch = Regex.Match(player.LastChat, @"^\s*!admin\s*$", RegexOptions.IgnoreCase);
Match withReasonMatch = Regex.Match(player.LastChat, @"^\s*!admin\s+([^\s].*)$", RegexOptions.IgnoreCase);

// Typed !admin
if (noReasonMatch.Success) {
    if (hasAccount && canKick) {
        // admin typed "!admin"
        player.Data.setBool(adminFlag, true); // adminon
        plugin.ConsoleWrite("Admin ^b" + player.Name + "^n has signed-on as an admin");
        plugin.SendPlayerMessage(player.Name, "Admin: " + player.LastChat);
        // ...
        return false;
    } else {
        // non-admin typed "!admin"
        plugin.ConsoleWrite("Player ^b" + player.Name + "^n has requested a list of admins");
        plugin.SendPlayerMessage(player.Name, "Player: " + player.LastChat);
        // ...
        return false;
    }
} 
// Typed !admin <reason>
else if (withReasonMatch.Success) {
    String reason = withReasonMatch.Groups[1].Value;
    if (hasAccount && canKick) {
        // admin typed "!admin <reason>"
        plugin.ConsoleWrite("Admin ^b" + player.Name + "^n has used !admin ^i" + reason);
        plugin.SendGlobalMessage("Admin: " + reason);
        return true; // Let second_check handle this, increment activation, but ignore it for this player in second_check
    } else {
        // non-admin type "!admin <reason>"
        plugin.ConsoleWrite("Player ^b" + player.Name + "^n has used !admin ^i" + reason);
        plugin.SendGlobalMessage("Player: " + reason);
        return true; // Let second_check handle this, increment activation
    }
}
return false; // chat not recognized, ignore it
Since local variables from first_check are not visible to second_check, you will have to do one of the following:

 

1) repeat all the Regex.Match expressions and CheckAccount calls

 

or

 

2) store the values in limit.RoundData as temporaries. For example, if you wanted to store the reason String, you could do something like this:

 

Code:

limit.RoundData.setString("reason", reason);
Then you could access it in second_check like this:

 

Code:

String reason = limit.RoundData.getString("reason");
One final comment: You don't have to use ServerCommand for sending chat to one player. You can user plugin.SendPlayerMessage:

 

Code:

plugin.SendPlayerMessage(player.Name, msg);
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I was wondering if there were anyway to be able to see if a player on a BF4 server were a Player, Spectator or Commander. As far as I knew there wasn't a way, however I noticed something in the Procon Console tab. Every so often the server lists all players with the command admin.listPlayers all. The result of this is similar to the following:

As I watched this while my server was full, a player joined as a Commander. I noticed a simple change in this list for that particular player, so, after the server emptied, I decided to check it by entering the server myself as each type. This is what I found:

As you can clearly see, type is 0 for a Player, 1 for a Spectator and 2 for a Commander.

 

Now I don't know if Insane Limits has access to this output either from Procon or the server itself, but if so, is it possible to add this to the PlayerInfoInterface? e.g.

 

Thanks :smile:

Very detailed oriented detective work. This is why I put a lot of debug info into logging, so people can find patterns!

 

In this case, I already knew about this. It was introduced in patch R17 for BF4. I'm just waiting for Procon to add the plugin code that allows me the access the information, then I will add a property to the PlayerInfoInterface object that you can access. It will probably be int Role.

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

Originally Posted by LCARSx64*:

 

Very detailed oriented detective work. This is why I put a lot of debug info into logging, so people can find patterns!

 

In this case, I already knew about this. It was introduced in patch R17 for BF4. I'm just waiting for Procon to add the plugin code that allows me the access the information, then I will add a property to the PlayerInfoInterface object that you can access. It will probably be int Role.

Thanks for the quick reply Papa and int Role would be just fine. :smile:

 

Hi,

 

is it possible to make a VIP slot only limit? witch kicks players NOT in VIP/Reserved list, with a kick message (of my choice)? :ohmy:

 

Regards,

Tommy.

You could try this:

 

ReservedSlot ONLY server

 

Set limit to evaluate OnJoin, and action to Kick

 

Set first_check to this Code:

Code:

List<String> ReservervedSlots = plugin.GetReservedSlotsList();
if (ReservervedSlots.Contains(player.Name))
    return false;
else
    return true;
Set these action specific parameters

Code:

kick_message = Sorry you must be on the reserved slot list to join this server!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Thanks for the quick reply Papa and int Role would be just fine. :smile:

 

 

You could try this:

 

ReservedSlot ONLY server

 

Set limit to evaluate OnJoin, and action to Kick

 

Set first_check to this Code:

Code:

List<String> ReservervedSlots = plugin.GetReservedSlotsList();
if (ReservervedSlots.Contains(player.Name))
    return false;
else
    return true;
Set these action specific parameters

Code:

kick_message = Sorry you must be on the reserved slot list to join this server!
That works! Ty! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by p19blo*:

 

Are there any knifes & pistols limit for BF4? :smile:

this is what im using feel free to alter, Its allwoing Knife and pistols only NO SHORTY though.

 

first check exprression

 

Code:

! Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success;
second check code

 

Code:

String kCounter = killer.Name + "_TreatAsOne_Count_MaxKills";
TimeSpan time = TimeSpan.FromSeconds(3); // Activations within 3 seconds count as 1
String msg = null;
 
int warnings = 1;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
 
/*
Check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/
 
if (limit.Activations(killer.Name, time) > 1) return false;
 
/*
We get here only if there was exactly one activation in the time span
*/
 
if (warnings == 0) {
        msg = "You have " + (warnings) + " kill this round, the maximum allowed on this server is 0";
        plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
} if (warnings >= 1) {
            msg =" banned not using Knife or Pistol to kill ";
            plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Permanent, player.Name, 0, "%p_n%, banned not using Knife or Pistol to kill, get unbanned at www.rockpapergodmode.com");
            msg = "Banning " + killer.FullName + " for " + msg + victim.FullName;
            plugin.SendGlobalMessage(msg);
            plugin.PRoConChat("ADMIN > " + msg);
            plugin.PRoConEvent(msg, "Insane Limits");
        }
server.Data.setInt(kCounter, warnings+1);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

this is what im using feel free to alter, Its allwoing Knife and pistols only NO SHORTY though.

 

first check exprression

 

Code:

! Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success;
second check code

 

Code:

String kCounter = killer.Name + "_TreatAsOne_Count_MaxKills";
TimeSpan time = TimeSpan.FromSeconds(3); // Activations within 3 seconds count as 1
String msg = null;
 
int warnings = 1;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
 
/*
Check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/
 
if (limit.Activations(killer.Name, time) > 1) return false;
 
/*
We get here only if there was exactly one activation in the time span
*/
 
if (warnings == 0) {
        msg = "You have " + (warnings) + " kill this round, the maximum allowed on this server is 0";
        plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
} if (warnings >= 1) {
            msg =" banned not using Knife or Pistol to kill ";
            plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Permanent, player.Name, 0, "%p_n%, banned not using Knife or Pistol to kill, get unbanned at www.rockpapergodmode.com");
            msg = "Banning " + killer.FullName + " for " + msg + victim.FullName;
            plugin.SendGlobalMessage(msg);
            plugin.PRoConChat("ADMIN > " + msg);
            plugin.PRoConEvent(msg, "Insane Limits");
        }
server.Data.setInt(kCounter, warnings+1);
return false;
I get this error:

[16:48:15 31] [insane Limits] ERROR: 4 errors compiling Expression

[16:48:15 31] [insane Limits] ERROR: (CS1026, line: 27, column: 228): ) expected

[16:48:15 31] [insane Limits] ERROR: (CS1525, line: 27, column: 229): Invalid expression term ')'

[16:48:15 31] [insane Limits] ERROR: (CS1002, line: 27, column: 238): ; expected

[16:48:15 31] [insane Limits] ERROR: (CS1525, line: 27, column: 238): Invalid expression term ')'

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

Originally Posted by p19blo*:

 

seems the code above put a ; in when mine doesnt have it

 

Code:

! Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

seems the code above put a ; in when mine doesnt have it

 

Code:

! Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success
Thanks! That works! Phuh! People where going crazy with guns lol :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Talzac*:

 

Adaptive Aggressive Join for insane limits.

Hi, I would like to have Adaptive Aggressive Join for insane limits.

 

Here is why:

 

* I want to be able to set my own message when kicking random player.

- Now people are rejoining and asking why they were kicked

* I want to be able to select who is kicked or not.

- Now we have many people on the reserved slots and it does not have to kick for other then admins.

* I want to not kick high score players

- I want to it to kick newly joined or bad players on aggressive join.

The plug-in should have this settings:

# Kick message:

Message "Making Room for Members, sorry, welcome back"

 

# Protect resserved slots (true or false)

protect_reserved_slots true

 

# Only kick low score players (true or false)

low_score_kick true

 

# Only kick newly joined players (true or false)

new_players_kick true

 

Then you create a list called.

aggressive_join and add the people there that can join. (should also be protected from kicks by default)

 

The reserved slots list can be used to add players for other features and the insane limits aggressive join should handle the kick when server is full.

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

Originally Posted by ToM666*:

 

Adaptive Aggressive Join for insane limits.

Hi, I would like to have Adaptive Aggressive Join for insane limits.

 

Here is why:

 

* I want to be able to set my own message when kicking random player.

- Now people are rejoining and asking why they were kicked

* I want to be able to select who is kicked or not.

- Now we have many people on the reserved slots and it does not have to kick for other then admins.

* I want to not kick high score players

- I want to it to kick newly joined or bad players on aggressive join.

The plug-in should have this settings:

# Kick message:

Message "Making Room for Members, sorry, welcome back"

 

# Protect resserved slots (true or false)

protect_reserved_slots true

 

# Only kick low score players (true or false)

low_score_kick true

 

# Only kick newly joined players (true or false)

new_players_kick true

 

Then you create a list called.

aggressive_join and add the people there that can join. (should also be protected from kicks by default)

 

The reserved slots list can be used to add players for other features and the insane limits aggressive join should handle the kick when server is full.

I'd also be very interested in something like this.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Adaptive Aggressive Join for insane limits.

Hi, I would like to have Adaptive Aggressive Join for insane limits.

 

Here is why:

 

* I want to be able to set my own message when kicking random player.

- Now people are rejoining and asking why they were kicked

* I want to be able to select who is kicked or not.

- Now we have many people on the reserved slots and it does not have to kick for other then admins.

* I want to not kick high score players

- I want to it to kick newly joined or bad players on aggressive join.

The plug-in should have this settings:

# Kick message:

Message "Making Room for Members, sorry, welcome back"

 

# Protect resserved slots (true or false)

protect_reserved_slots true

 

# Only kick low score players (true or false)

low_score_kick true

 

# Only kick newly joined players (true or false)

new_players_kick true

 

Then you create a list called.

aggressive_join and add the people there that can join. (should also be protected from kicks by default)

 

The reserved slots list can be used to add players for other features and the insane limits aggressive join should handle the kick when server is full.

This is good detail that makes it easy to write a new limit.

 

However, there seems to be a misunderstanding. Limits can't create new settings like low_score_kick or protect_reserved_slots. Limits can have code variables that you can change. I can make all of those settings be variables in the code. If you want to change them, you have to change the code.

 

BTW, I don't understand what protect_reserved_slots is supposed to do.

 

Also, rather than an aggressive_join list, I'm going to use the function that looks up the player's name in the Procon account list. If the player has a Procon account, they will be a VIP. So instead of maintaining a separate list, you just have to give VIPs a Procon account (though you don't have to give them any privileges, if you don't want to).

 

Finally, I should have made something more clear: this can't work exactly the same way that aggressive join works, because Procon doesn't know if there is a Battlelog queue. The way this will work is like the old-school BF2, where you reserve a number of empty slots for VIPs. So let's say you have a 64 slot server (with commanders/spectators above that count) and you want to make sure that there are always 2 slots available for VIPs. When the server has 62 players in it, every player above 62 will be kicked with your message, unless they are a true VIP. The number of reserved slots will be a code variable you can change, defaulted to 2.

 

So, with all of that explanation, do you still want this limit code?

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

Originally Posted by Pvtjohntowle*:

 

Ah, I see. Okay, given that code, here is what you should do.

 

Change the limit name "Shotgun Only" to "Illegal Weapon limit".

 

Remove ALL the Actions. Just delete Kick and Say from the Action list and the rest will go away.

 

Change second_check to this (delete everything that is currently in second_check and replace with copy & paste of this)

 

Code:

double count = limit.Activations(player.Name);

String msg = null;

if (count == 1)
{
    plugin.KillPlayer(player.Name, 5);
    msg = plugin.R("%p_n% used ILLEGAL WEAPON %w_n%! Next time you will be kicked!");
    //plugin.SendPlayerMessage(player.Name, msg); // just the player
    plugin.SendGlobalMessage(msg); // all players
    plugin.PRoConChat(msg);
}
else
{
    msg = plugin.R("%p_n% for ILLEGAL WEAPON %w_n%!");
    plugin.KickPlayerWithMessage(player.Name, msg);
    msg = "Kicked " + msg;
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat(msg);
}
return false;
This version of the code sends a chat message to all players for both the kill and the kick. If you find the kill messages are too spammy, you can change the code by finding these two lines:

 

Code:

//plugin.SendPlayerMessage(player.Name, msg); // just the player
    plugin.SendGlobalMessage(msg); // all players
and changing them to this:

 

Code:

plugin.SendPlayerMessage(player.Name, msg); // just the player
    //plugin.SendGlobalMessage(msg); // all players
The two slashes // turn a line of code into a comment that does nothing, so all I did was uncomment the SendPlayerMessage (send chat only to the player) and comment the SendGlobalMessage (send chat to all) line.

 

Next time, lets do this in the Insane Limits Request thread, rather than the plugin thread. That's the right place for getting limit code straightened out.

Thanks PC9 I am going to test this out now. Do you have Paypal for donations?

 

I also want to use this with my pistols & Knives only so the Illegal Weapon chat message is sent to all so where do I put the code below to make M98B Illegal weapon as per your post here: (#15)

 

myrcon.net/...insane-limits-knife-and-pistols-only#entry46680

 

Code:

kill.Weapon == "U_M98B" ||
in the first check code because the line begins with "if" and the M98B isn't an Illegal Weapon with the pistols only code and I have to put this extra code in the first check code to ensure it is not used

 

 

Code:

if (!Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_M93R|U_Glock18|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_Defib|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success) {
    plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName); 
    return true;
} else {
    plugin.ConsoleWrite("^9ok: " + killer.FullName + " used " + kill.Weapon);
    return false;
}
I have tried to put the M98B kill weapon in front (left)of the "if" but I get errors on compiling.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Talzac*:

 

This is good detail that makes it easy to write a new limit.

 

However, there seems to be a misunderstanding. Limits can't create new settings like low_score_kick or protect_reserved_slots. Limits can have code variables that you can change. I can make all of those settings be variables in the code. If you want to change them, you have to change the code.

 

BTW, I don't understand what protect_reserved_slots is supposed to do.

 

Also, rather than an aggressive_join list, I'm going to use the function that looks up the player's name in the Procon account list. If the player has a Procon account, they will be a VIP. So instead of maintaining a separate list, you just have to give VIPs a Procon account (though you don't have to give them any privileges, if you don't want to).

 

Finally, I should have made something more clear: this can't work exactly the same way that aggressive join works, because Procon doesn't know if there is a Battlelog queue. The way this will work is like the old-school BF2, where you reserve a number of empty slots for VIPs. So let's say you have a 64 slot server (with commanders/spectators above that count) and you want to make sure that there are always 2 slots available for VIPs. When the server has 62 players in it, every player above 62 will be kicked with your message, unless they are a true VIP. The number of reserved slots will be a code variable you can change, defaulted to 2.

 

So, with all of that explanation, do you still want this limit code?

Can we not check if the server is full with a variable comparing the user number online against the maximum slots?

Like

Server_size 32?

 

And then if the server is full and a VIP tries to enter it kicks a player. The VIP should then in theoretically join because reserved slots is prioritized in que? I understand that if two reserved slots are in queue there are no guarantees that the correct person is selected but it could perhaps kick again if still trying to join after a minute ?

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

Originally Posted by Talzac*:

 

Can we not check if the server is full with a variable comparing the user number online against the maximum slots?

Like

Server_size 32?

 

And then if the server is full and a VIP tries to enter it kicks a player. The VIP should then in theoretically join because reserved slots is prioritized in que? I understand that if two reserved slots are in queue there are no guarantees that the correct person is selected but it could perhaps kick again if still trying to join after a minute ?

If there is a VIP trying to enter perhaps we can kick multiple people?

If the server is full 32 of 32 playing set in variable,

then we kick all in que with a message like: making room for VIP

(Kick all neutrals except for the VIP)

 

Then we kick one in the game

 

Then the VIP should enter automatically because he is prioritized and next in line? Also the only one in the que.

 

It seems like the people in que are naturals in procon until joined ? But I am not 100 % sure about this ?

 

-----------------

the protect_reserved_slot should be a variable to select if reserved slots is protected from VIP kicks on join or not

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

Originally Posted by Dudenell*:

 

Also, perhaps I misunderstood the admin types !admin case? Is that supposed to enable that admin as being visible as an admin? I thought anyone with hasAccount && canKick is visible as an admin when a non-admin types !admin. I'll assume the former, only admins that have voluntarily typed !admin will be visible to non-admins as an admin.

 

Also, I'm still confused about the contradictory cases. What happens if a non-admin types !admin? Does he get a list of admins that are on, or does he get an error message and does not increase the counter? I'm going to assume the former.

Player – Non Admin

 

Case 1 – non admin types !admin hacker, no admins on: message is tweeted and activation for round is counted

Case 2 –non admin types !admin hacker, no admins on, second time or more (per round): this is the second time so no message is tweeted and an error is displayed saying an admin was already called. This is on a per round basis.

Case 3 – non admin types !admin with no reason, no admins on: Error message saying that the message wasn't typed right and needs to be in the correct format.

Case 4 – non admin types !admin with no reason, with admin on: Error message saying that the message wasn't types right and needs to be in the correct format.

Case 5 – non admin types !admin hacker, with an admin on: Message being output saying that there are currently admins on the server and list the admin names(will continue the message if there are multiple admins).

 

Player – Admin

Case 6 – Admin types !admin or !admin message: Message is displayed to the whole server saying he is an admin, and it will also list who else is an admin if there are additional admins on. More or less if someone calls the admin a liar or similar, just a way to display that the player is in fact an admin.

 

Alright I know this is going to be a huge mess of code, but it works and I was hoping for your blessings for posting a topic in the plugin enhancements section as a way to call admins via text message

 

I had to change limit.RoundData.setString("reason", reason); to server.RoundData.setString, limit kept throwing me an error?

 

I do hate that I have double the code in both if / else statements, but everytime someone would chat anything it would throw a bool error in the procon console.

 

I have this set as two separate limits. The first limit is more or less a welcome message, but it sets if there is an admin on because it's checking players everytime they spawn

so First limit is onSpawn

set to expression

Code:

(true)
second check is this code

Code:

/*
Evaulation: OnSpawn
First Check: Expression
(true)
Second Check:

*/
bool canKill = false;
bool canKick = false;
bool canBan = false;
bool canMove = false;
bool canChangeLevel = false;
bool hasAccount = plugin.CheckAccount(player.Name, out canKill, out canKick, out canBan, out canMove, out canChangeLevel);


String kCounter = "playerSpawnCounter";
List<String> reserved = plugin.GetReservedSlotsList();

if (!player.Data.issetBool("adminon")) player.Data.setBool("adminon", (hasAccount && canKick));

/* Workaround for problems with limit.ActivationsTotal */
if (!player.Data.issetInt(kCounter)) {
	player.Data.setInt(kCounter, 0);
}
int spawnCount = player.Data.getInt(kCounter);
spawnCount = spawnCount + 1;
player.Data.setInt(kCounter, spawnCount);

if (spawnCount == 1 ){
	if (hasAccount && canKick){
		plugin.PRoConChat("ADMIN > " + player.Name + " is a Admin and has joined the server");
		plugin.SendGlobalMessage("ATTENTION: " + player.FullName + " is an admin and has joined the server!");
	}
	
	else if(reserved.Contains(player.Name)){
		plugin.SendGlobalMessage("ATTENTION: VIP " + player.FullName + " has joined the game!");
		}
	else {
		plugin.SendPlayerMessage(player.Name, "Welcome " + player.FullName + " to another [RUF] server! Clan applications are open @ rufclan.com, Join us on teamspeak @ ts.rufclan.com");
	}	
}
return false;
second limit is the admin call

first check is this code

Code:

//Checks for player being an admin
bool canKill = false;
bool canKick = false;
bool canBan = false;
bool canMove = false;
bool canChangeLevel = false;
bool hasAccount = plugin.CheckAccount(player.Name, out canKill, out canKick, out canBan, out canMove, out canChangeLevel);
//messages
string msg1 = " is an admin";
string msg2 = ", there is an admin on the server! Current admins are ";
string msg3 = ", the correct format for admin call is !admin <reason> Example: !admin bob is hacking";

Match noReasonMatch = Regex.Match(player.LastChat, @"^\s*!admin\s*$", RegexOptions.IgnoreCase);
Match withReasonMatch = Regex.Match(player.LastChat, @"^\s*!admin\s+([^\s].*)$", RegexOptions.IgnoreCase);

// Typed !admin
if (noReasonMatch.Success) {
	//checks regarding messages
	bool first = true;
	bool firstMsg1 = true;
	bool isAnyAdminOn = false;
	//players
	List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
	all.AddRange(team1.players);
	all.AddRange(team2.players);
	if (team3.players.Count > 0) all.AddRange(team3.players);
	if (team4.players.Count > 0) all.AddRange(team4.players);

	foreach (PlayerInfoInterface p in all) {

		if (p.Data.getBool("adminon")) {
			isAnyAdminOn = true;

			if (player.Name == p.Name) {
				msg1 = player.Name + msg1;
			} else {
				if (firstMsg1) { 
					msg1 = msg1 + " and so is " + p.Name;
					firstMsg1 = false;
				} else {
					msg1 = msg1 + ", " + p.Name;
				}
			}
			if (!first) {
				msg2 = msg2 + ", ";
			}
			msg2 = msg2 + p.Name;
			first = false;
		}
	}
	if (hasAccount && canKick) {
        // admin typed "!admin"
        plugin.ConsoleWrite("Admin ^b" + player.Name + "^n has shown he is an admin");
		plugin.SendGlobalMessage(msg1);
        return false;
    } else {
        // non-admin typed "!admin"
        plugin.ConsoleWrite("Player ^b" + player.Name + "^n has requested an admin the wrong way");
        plugin.SendGlobalMessage(player.Name + msg3);
        // ...
        return false;
    }
} 
// Typed !admin <reason>
else if (withReasonMatch.Success) {
	
    String reason = withReasonMatch.Groups[1].Value;
	server.RoundData.setString("reason", reason);
	//checks regarding messages
	bool first = true;
	bool firstMsg1 = true;
	bool isAnyAdminOn = false;
	//players
	List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
	all.AddRange(team1.players);
	all.AddRange(team2.players);
	if (team3.players.Count > 0) all.AddRange(team3.players);
	if (team4.players.Count > 0) all.AddRange(team4.players);

	foreach (PlayerInfoInterface p in all) {

		if (p.Data.getBool("adminon")) {
			isAnyAdminOn = true;

			if (player.Name == p.Name) {
				msg1 = player.Name + msg1;
			} else {
				if (firstMsg1) { 
					msg1 = msg1 + " and so is " + p.Name;
					firstMsg1 = false;
				} else {
					msg1 = msg1 + ", " + p.Name;
				}
			}
			if (!first) {
				msg2 = msg2 + ", ";
			}
			msg2 = msg2 + p.Name;
			first = false;
		}
	}
	
    if (hasAccount && canKick) {
        // admin typed "!admin"
        plugin.ConsoleWrite("Admin ^b" + player.Name + "^n has shown he is an admin");
		plugin.SendGlobalMessage(player.Name + msg1);
        return false;
		}
	else if (isAnyAdminOn){
		plugin.ConsoleWrite("Player ^b" + player.Name + "^n has requested an admin with an admin on");
		plugin.SendGlobalMessage(player.Name + msg2);
	}	
    else {
        // non-admin type "!admin <reason>"
        plugin.ConsoleWrite("Player ^b" + player.Name + "^n has used !admin ^i" + reason);
        return true; // Let second_check handle this, increment activation
    }
}
return false; // chat not recognized, ignore it
Second check is this code

Code:

String reason = server.RoundData.getString("reason");
int count = (int) limit.Activations(player.Name);
string msg1 = " has called an admin for ";
string msg2 = ", you have requested an admin! This action has been logged!";
string msg3 = ", you have requested an admin too many times!";
string serverNumber = " #7 ";
if (count == 1) {
		plugin.Tweet(player.Name + msg1 + reason + " on " + serverNumber + DateTime.Now.ToShortDateString());
		//plugin.ServerCommand("admin.yell", (player.Name + msg1), "30", "player", player.Name);
		plugin.SendPlayerMessage(player.Name, player.Name + msg2);
		plugin.PRoConChat("ADMIN > " + player.Name + ": Has requested an admin " + count + " times with no admin on");
		plugin.ServerCommand("punkBuster.pb_sv_command", "PB_SV_GetSs");
}

else {
	//plugin.ServerCommand("admin.yell", (player.Name + msg3), "30", "player", player.Name);
	plugin.ServerCommand("admin.say" , (player.Name + msg3), "player" , player.Name );
	plugin.PRoConChat("ADMIN > " + player.Name + ": Has requested an admin " + count + " times with no admin on");
}
return false;
The welcome message is used to check if the player is an admin or not, and set it.

 

The second limit (the admin call) will tweet a message if successful and then using that tweet, a secondary service called http://cel.ly will pick up that tweet and send a text to all of our admins.

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

Originally Posted by naurel*:

 

Hello happy new year !

 

I'm looking for a new limits on my server. Lately there is very very good players on it all from the same team. I don't want to kick them because they unbalance the serv. So i would like to balance the server by switching some of them in the other team.

 

Like :

1 player of this team in US. -> Ok

2 players of this team in US. -> switch 1 un R.U. (or CN)

2 players of this team in US and 1 in CN -> ok

etc ...

 

Is it possible ? Particulary forbid them to switching team.

 

edit : it would be based on the name of the player and not his tag (they are using similar name like AAAplayer1 AAAplayer2 ...)

Thank you

 

Naurel

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

Originally Posted by PapaCharlie9*:

 

Thanks PC9 I am going to test this out now. Do you have Paypal for donations?

 

I also want to use this with my pistols & Knives only so the Illegal Weapon chat message is sent to all so where do I put the code below to make M98B Illegal weapon as per your post here: (#15)

 

myrcon.net/...insane-limits-knife-and-pistols-only#entry46680

 

Code:

kill.Weapon == "U_M98B" ||
in the first check code because the line begins with "if" and the M98B isn't an Illegal Weapon with the pistols only code and I have to put this extra code in the first check code to ensure it is not used

 

 

Code:

if (!Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_M93R|U_Glock18|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_Defib|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success) {
    plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName); 
    return true;
} else {
    plugin.ConsoleWrite("^9ok: " + killer.FullName + " used " + kill.Weapon);
    return false;
}
I have tried to put the M98B kill weapon in front (left)of the "if" but I get errors on compiling.
Change the code to this:

 

Code:

if (kill.Weapon == "U_M98B" || !Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_M93R|U_Glock18|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_Defib|Melee|Suicide|SoldierCollision|DamageArea)", RegexOptions.IgnoreCase).Success) {
    plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName); 
    return true;
} else {
    plugin.ConsoleWrite("^9ok: " + killer.FullName + " used " + kill.Weapon);
    return false;
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Can we not check if the server is full with a variable comparing the user number online against the maximum slots?

Like

Server_size 32?

 

And then if the server is full and a VIP tries to enter it kicks a player. The VIP should then in theoretically join because reserved slots is prioritized in que? I understand that if two reserved slots are in queue there are no guarantees that the correct person is selected but it could perhaps kick again if still trying to join after a minute ?

Procon doesn't know anything about players who haven't joined yet. The server could be full with no one waiting or there could be 4 people waiting, it looks the same to Procon.

 

Battlelog is in control of who joins the server, not the game server. Battlelog asks the game server, "Are you full_" If the game server says no, Battlelog lets the next person join. If it says yes, Battlelog puts that person in a join queue. Then if aggressive join and reserved slots is enabled, it does all that. The upshot being the game server doesn't know someone is trying to join a server. All it knows is that someone actually is joining the server, because there is room or because room was made via aggressive join.

 

If there is a VIP trying to enter perhaps we can kick multiple people?

If the server is full 32 of 32 playing set in variable,

then we kick all in que with a message like: making room for VIP

(Kick all neutrals except for the VIP)

 

Then we kick one in the game

 

Then the VIP should enter automatically because he is prioritized and next in line? Also the only one in the que.

 

It seems like the people in que are naturals in procon until joined ? But I am not 100 % sure about this ?

 

-----------------

the protect_reserved_slot should be a variable to select if reserved slots is protected from VIP kicks on join or not

Procon doesn't know that there is a VIP waiting to join. It doesn't know that there is anyone waiting to join. It only knows about the ones that were allowed to join, which only happens if the server is NOT full (or Battlelog controlled aggressive join is active).

 

There simply is not enough information in Procon to do what you want to do. It's old-school BF2 reserved slots or BF4 aggressive join with no choice about message or etc.

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

Originally Posted by PapaCharlie9*:

 

Alright I know this is going to be a huge mess of code, but it works and I was hoping for your blessings for posting a topic in the plugin enhancements section as a way to call admins via text message

Of course you can, you don't need my blessing.

 

I now understand all the cases, thanks for the detailed rundown.

 

The code itself looks good, except for one mistake in the second limit (OnAnyChat), first_check code. The case for an admin typing !admin isn't right.

 

Code:

// Typed !admin <reason>
else if (withReasonMatch.Success) {
	
    String reason = withReasonMatch.Groups[1].Value;
	server.RoundData.setString("reason", reason);
	//checks regarding messages
	bool first = true;
	bool firstMsg1 = true;
	bool isAnyAdminOn = false;
	//players
	List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
	all.AddRange(team1.players);
	all.AddRange(team2.players);
	if (team3.players.Count > 0) all.AddRange(team3.players);
	if (team4.players.Count > 0) all.AddRange(team4.players);

	foreach (PlayerInfoInterface p in all) {

		if (p.Data.getBool("adminon")) {
			isAnyAdminOn = true;

			if (player.Name == p.Name) {
				msg1 = player.Name + msg1;
			} else {
				if (firstMsg1) { 
					msg1 = msg1 + " and so is " + p.Name;
					firstMsg1 = false;
				} else {
					msg1 = msg1 + ", " + p.Name;
				}
			}
			if (!first) {
				msg2 = msg2 + ", ";
			}
			msg2 = msg2 + p.Name;
			first = false;
		}
	}
	
    if (hasAccount && canKick) {
        // admin typed "!admin"
        plugin.ConsoleWrite("Admin ^b" + player.Name + "^n has shown he is an admin");
		plugin.SendGlobalMessage(player.Name + msg1);
        return false;
		}
	else if (isAnyAdminOn){
		plugin.ConsoleWrite("Player ^b" + player.Name + "^n has requested an admin with an admin on");
		plugin.SendGlobalMessage(player.Name + msg2);
	}	
    else {
        // non-admin type "!admin <reason>"
        plugin.ConsoleWrite("Player ^b" + player.Name + "^n has used !admin ^i" + reason);
        return true; // Let second_check handle this, increment activation
    }
}
return false; // chat not recognized, ignore it
Remeber that this is the !admin case, so the part in red isn't correct. That code should be using reason as the message sent instead of msg1.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hello happy new year !

 

I'm looking for a new limits on my server. Lately there is very very good players on it all from the same team. I don't want to kick them because they unbalance the serv. So i would like to balance the server by switching some of them in the other team.

 

Like :

1 player of this team in US. -> Ok

2 players of this team in US. -> switch 1 un R.U. (or CN)

2 players of this team in US and 1 in CN -> ok

etc ...

 

Is it possible ? Particulary forbid them to switching team.

 

edit : it would be based on the name of the player and not his tag (they are using similar name like AAAplayer1 AAAplayer2 ...)

Thank you

 

Naurel

It's possible, but why not just use the MULTIbalancer plugin, which does exactly what you want already? Study the Disperse Evenly By Rank >= setting in MULTIbalancer, as well as Unswitch settings.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by naurel*:

 

It's possible, but why not just use the MULTIbalancer plugin, which does exactly what you want already? Study the Disperse Evenly By Rank >= setting in MULTIbalancer, as well as Unswitch settings.

Can I use a char meaning "any chars" instead of exact players name in MULTIbalancer ?

 

If not nvm I'll try to find all theirs names.

 

Thank you

 

Naurel

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

Archived

This topic is now archived and is closed to further replies.




  • 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.