Jump to content

Insane Limits V0.8/R2: Chat Message Spambot


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

Version V0.8/R2 (compiled and tested)

 

This example rotates through a list of chat messages intended to be spammed to a server chat box. Every fixed interval of time, e.g., every 15 minutes, the next message in the list is sent. At the end of the list the spammer starts over from the start of the list.

 

DUE TO A BUG IN INSANE LIMITS, THE INTERVAL MUST BE LESS THAN 120 SECONDS.

 

Set limit to evaluate OnIntervalServer. Set the interval to the delay time between each message in seconds, e.g., 900 (15 minutes). Set action to None.

 

Set first_check to this Code:

 

Code:

/* Version V0.8/R1 
Send one message from the list every interval seconds.
The interval is defined with the OnIntervalServer setting.
The list of messages is defined below. To add more messages,
just add more spam.Add("...") lines.
*/
List<String> spam = new List<String>();
spam.Add("*** Protected by PRoCon plugin: Insane Limits!");
spam.Add("Second message to send <- CHANGE ME!");
spam.Add("Third message to send <- CHANGE ME!");
spam.Add("Fourth message to send <- CHANGE ME!");
// add more messages here ...

String kSpamIndex = "SPAM_index";

int message = 0;
if (server.Data.issetInt(kSpamIndex)) message = server.Data.getInt(kSpamIndex);

// Start over at the beginning of the list if at the end
message = (message % spam.Count);

// Bookkeeping
DateTime sanityCheck = DateTime.Now;
String kSanityCheck = "SPAM_check";
// Check to make sure minutes weren't confused with seconds in interval setting
if (server.Data.issetObject(kSanityCheck)) {
	sanityCheck = (DateTime)server.Data.getObject(kSanityCheck);
	TimeSpan sane = DateTime.Now.Subtract(sanityCheck);
	if (sane.TotalMinutes < 5) {
		//plugin.ConsoleWarn("^b[Spambot]^n: Interval between messages must be at least 300 (5 minutes)!");
		//return false; // Until 0.8p3 bug fixed
	}
}
server.Data.setObject(kSanityCheck, DateTime.Now);
server.Data.setInt(kSpamIndex, message+1);

// Send message
plugin.SendGlobalMessage(spam[message]);
plugin.PRoConChat("ADMIN > " + spam[message]);

return false;
Leave second_check Disabled.

 

If you want to send multiple lines of messages instead of just one line, use the \n newline escape in the quoted string to separate lines, for example:

 

spam.Add("This one message has three lines.\nThis is the second line, indented.\nThis is the third line. Use sparingly!!");

 

UPDATES

 

R2 - commented out sanity check due to issue with 0.8p3 - Interval must be less than 120 seconds, as a work around

R1 - original version

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

Originally Posted by micovery*:

 

Nice, thanks for making this :-) . One thing I don't like is that you are forcing user to have a minimum 5 minutes internal. It's not a big deal ... the user can just change the value. However, for people who simply copy+paste the code, they might be a bit confused.

 

Since you are doing this kind of sanity check, for next version, I think I will expose in the limit object all the properties that can be set through the UI.

 

So in this case you would just do:

 

Code:

int interval =  Int.Parse(limit.getField("evaluation_interval")) 
if (interval < 300)
{
  // warning about interval too small
  return false;
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Since you are doing this kind of sanity check, for next version, I think I will expose in the limit object all the properties that can be set through the UI.

That would be totally awesome. Please add a limit.Id property too.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by PapaCharlie9*:

 

For pharbehind:

 

The easiest way to have one set of messages for 1-15 players and another for 16+ is to:

 

* Follow the steps in the OP, but instead of making one limit, make two.

 

* Instead of putting the code in first_check, put the code in second_check

 

* In first_check for the first limit (1-15), add this Expression:

 

Code:

( server.PlayerCount < 16 )
* In first_check of the second limit (16+), add this Expression:

 

Code:

( server.PlayerCount >= 16)
* Then customize the messages in the second_check of both limits as needed.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

not really looking for specific messages based on the amount of players but i can see a great use for it. sometimes when we are playing with a low number of players agree to play like X gun only till more players load in.

 

 

as for the messages, does it have a limit on how many characters it can handle per spam.Add? as i said in the main thread i would like the messages posted 3-5 times with the same message (not too long so i dont take up more then 1 line or else it goes to the 2nd line) but noticed if the sentence is too long the message doesnt get sent out.

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

Originally Posted by PapaCharlie9*:

 

not really looking for specific messages based on the amount of players but i can see a great use for it. sometimes when we are playing with a low number of players agree to play like X gun only till more players load in.

 

 

as for the messages, does it have a limit on how many characters it can handle per spam.Add? as i said in the main thread i would like the messages posted 3-5 times with the same message (not too long so i dont take up more then 1 line or else it goes to the 2nd line) but noticed if the sentence is too long the message doesnt get sent out.

Messages have to be less than 128 characters. I don't enforce that in the Limit, you have to count them up yourself.

 

If you know what message number you want the repeat message to be, you can make a simple change. Suppose you have this set of messages:

 

Code:

List<String> spam = new List<String>();
spam.Add("*** Protected by PRoCon plugin: Insane Limits!"); // message 1
spam.Add("Second message to send <- CHANGE ME!"); // message 2
spam.Add("Third message to send <- CHANGE ME!"); // message 3
spam.Add("Fourth message to send <- CHANGE ME!"); // message 4, etc.
Let's say you want message 2 to be repeated 3 times. Find this line of code in the first_check

 

Code:

plugin.SendGlobalMessage(spam[message]);
Change it to this:

 

Code:

if ((message+1) == 2) { // We want to repeat message 2 three times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else { // Just one time
    plugin.SendGlobalMessage(spam[message]);
}
If you also want to do message 4 six times, do this:

 

Code:

if ((message+1) == 2) { // We want to repeat message 2 three times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else if ((message+1) == 4) { // We want to repeat message 4 six times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else { // Just one time
    plugin.SendGlobalMessage(spam[message]);
}
And so on. Just add "if" or "else if" clauses for the message number and repeate the SendGlobalMessage line as many times as you want the message repeat.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I'll do a test and see if I can reproduce.

You are right. Using 0.0.0.8 patch 3, if the interval is greater than 120 seconds, it never sends anything. I'll send micovery a PM to let him know there is a problem.

 

In the mean time, I've updated the code to R2 to remove the requirement for 300 seconds. You can set the interval to 110 seconds and it should be okay as a work around.

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

Originally Posted by droopie*:

 

Messages have to be less than 128 characters. I don't enforce that in the Limit, you have to count them up yourself.

 

If you know what message number you want the repeat message to be, you can make a simple change. Suppose you have this set of messages:

 

Code:

List<String> spam = new List<String>();
spam.Add("*** Protected by PRoCon plugin: Insane Limits!"); // message 1
spam.Add("Second message to send <- CHANGE ME!"); // message 2
spam.Add("Third message to send <- CHANGE ME!"); // message 3
spam.Add("Fourth message to send <- CHANGE ME!"); // message 4, etc.
Let's say you want message 2 to be repeated 3 times. Find this line of code in the first_check

 

Code:

plugin.SendGlobalMessage(spam[message]);
Change it to this:

 

Code:

if ((message+1) == 2) { // We want to repeat message 2 three times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else { // Just one time
    plugin.SendGlobalMessage(spam[message]);
}
If you also want to do message 4 six times, do this:

 

Code:

if ((message+1) == 2) { // We want to repeat message 2 three times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else if ((message+1) == 4) { // We want to repeat message 4 six times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else { // Just one time
    plugin.SendGlobalMessage(spam[message]);
}
And so on. Just add "if" or "else if" clauses for the message number and repeate the SendGlobalMessage line as many times as you want the message repeat.
i think this should help fix the limit of 128 per message when using \n to go to the next line so a message is sent more then 1 time. that was 1 of my problems. if in 1 message the first line is a max of 40 letters to fit in the first line and doesnt go to the 2nd line, and if i wanted the message to show 3 times, 40x3 120 in a single spam.add message. now its just the 40 per spam.add message. hope it helps.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

If you also want to do message 4 six times, do this:

 

Code:

if ((message+1) == 2) { // We want to repeat message 2 three times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else if ((message+1) == 4) { // We want to repeat message 4 six times
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
    plugin.SendGlobalMessage(spam[message]);
} else { // Just one time
    plugin.SendGlobalMessage(spam[message]);
}
And so on. Just add "if" or "else if" clauses for the message number and repeate the SendGlobalMessage line as many times as you want the message repeat.
this isnt working for me either. it still sends 1 at a time for all
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by Singh400*:

 

For pharbehind:

 

The easiest way to have one set of messages for 1-15 players and another for 16+ is to:

 

* Follow the steps in the OP, but instead of making one limit, make two.

 

* Instead of putting the code in first_check, put the code in second_check

 

* In first_check for the first limit (1-15), add this Expression:

 

Code:

( server.PlayerCount < 16 )
* In first_check of the second limit (16+), add this Expression:

 

Code:

( server.PlayerCount >= 16)
* Then customize the messages in the second_check of both limits as needed.
Could I make the messages player count and map specific?

 

So:

Code:

( server.PlayerCount < 16 ) && ( server.MapFileName == "MP_001||MP_012" )
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Could I make the messages player count and map specific?

 

So:

Code:

( server.PlayerCount < 16 ) && ( server.MapFileName == "MP_001||MP_012" )
Yes, but your syntax isn't quite right. You want this:

 

Code:

( server.PlayerCount < 16 && Regex.Match(server.MapFileName, @"(_:MP_001|MP_012)", RegexOptions.IgnoreCase).Success )
See my discussion of Regex.Match here: http://www.phogue.net/forumvb/showth...ll=1#post44100*
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

and if i wanted the message to show 3 times, 40x3 120 in a single spam.add message. now its just the 40 per spam.add message. hope it helps.

Oh, sorry, I don't think that is possible. Your only choices are:

 

1) Create a message string that is less than 128 characters.

 

2) Send separate messages.

 

You can't make one message get added to the end of a previous message.

 

However, you can just build a single message string. For example, suppose you want to say three times:

 

"Stop using M320 or grenades, noobs!"

 

I think that is 36 charaters. The way you want it to look is like this in chat:

 

[ADMIN] Stop using M320 or grenades,

noobs! Stop using M320 or grenades,

noobs! Stop using M320 or grenades,

noobs!

 

All you have to do is this:

 

Code:

String phrase = "Stop using M320 or grenades, noobs! "; // Notice I added a space at the end
spam.Add(phrase + phrase + phrase);
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by PapaCharlie9*:

 

any update on increasing the timing between messages yet?

No, sorry. I'd have to completely rewrite the example to work around the bug in Insane Limits. It's on my list, but I've got a lot of other things to do first. Like play R20!
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by PapaCharlie9*:

 

Tried using this on R20, but it just spams the messages like crazy, even though I have interval set to 200.

You can't set the interval above 120, there's a bug.

 

I noticed that the Spambot plugin comes with the latest PRoCon update. Maybe just use that instead? It's going to be a long time, if ever, that I fix this.

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

Originally Posted by aduh*:

 

PapaCharlie9 since there is a problem with interval time in this is there any other way

to spam 1 YELL message every 10 minutes ?

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

Originally Posted by PapaCharlie9*:

 

PapaCharlie9 since there is a problem with interval time in this is there any other way

to spam 1 YELL message every 10 minutes ?

Yes, use the Spambot plugin that comes with the latest update to PRoCon.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 months later...

Originally Posted by HexaCanon*:

 

would this work with "OnIntervalPlayer" and using

 

Code:

plugin.ServerCommand("admin.yell", spam[message], "10", "player", player.Name);
was wondering if it will work, we could use different languages for spambot say for example we have german or france player we can add

Code:

if (player.CountryCode, "(DE)", RegexOptions.IgnoreCase).Success) {
    plugin.ServerCommand("admin.yell", spamGER[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]);
} else if (player.CountryCode, "(FR)", RegexOptions.IgnoreCase).Success) {
    plugin.ServerCommand("admin.yell", spamFR[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]);
} else if ( !player.CountryCode, "(FR|DE)", RegexOptions.IgnoreCase).Success) (
    plugin.ServerCommand("admin.yell", spam[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]); }
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

would this work with "OnIntervalPlayer" and using

 

Code:

plugin.ServerCommand("admin.yell", spam[message], "10", "player", player.Name);
was wondering if it will work, we could use different languages for spambot say for example we have german or france player we can add

Code:

if (player.CountryCode, "(DE)", RegexOptions.IgnoreCase).Success) {
    plugin.ServerCommand("admin.yell", spamGER[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]);
} else if (player.CountryCode, "(FR)", RegexOptions.IgnoreCase).Success) {
    plugin.ServerCommand("admin.yell", spamFR[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]);
} else if ( !player.CountryCode, "(FR|DE)", RegexOptions.IgnoreCase).Success) (
    plugin.ServerCommand("admin.yell", spam[message], "10", "player", player.Name);
    plugin.PRoConChat("ADMIN > " + spam[message]); }
That should work, if you don't set the interval higher than 60 seconds. Otherwise, you hit the interval reset bug in Insane Limits and you'll never see anything.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 years later...

Originally Posted by Tobsen03*:

 

I need a spambot that gives the meesage out under 10 players : Only B under 5 vs 5 as Yell message and as soon there are 12 players on the server it should yell: All flags are Open now.

this should be in an interval of 60 seconds.

 

As soon there are 13 players on the server this message should stop.

 

But if there are 10 players again it should start from the beginning.

 

Thank u very much

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

Originally Posted by the-despo*:

 

Hey Guys, I 'm a friend of tobsen03 , we have found a suitable code , but insane limits always bring me an error :

 

 

Code:

[ 21:42:45 78 ] [ Insane Limits ] thread ( thread pool worker ) : Language check failed ! Error : System.Net.WebException : The remote server returned an Error : ( 403 ) Forbidden .
  at System.Net.HttpWebRequest.CheckFinalStatus ( System.Net.WebAsyncResult result) [ 0x00000 ] in <filename unknown> : 0
  at System.Net.HttpWebRequest.SetResponseData ( System.Net.WebConnectionData data) [ 0x00000 ] in <filename unknown> : 0
Can one help me?

 

System Debian 7.8 with Mono 2.10.8.1 + Procon 1.5.1.1

 

Greetz despo

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...
  • 2 years later...

Originally Posted by Smellblood95*:

 

So I know that not many people are looking here anymore, however I do still have a BF3 server and I would like to know how to send a message to specific generic list of people?

 

Asking this in regards of that I want a message only shown to a list of players that are admins.

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

Originally Posted by ColColonCleaner*:

 

So I know that not many people are looking here anymore, however I do still have a BF3 server and I would like to know how to send a message to specific generic list of people?

 

Asking this in regards of that I want a message only shown to a list of players that are admins.

Been a long time since I coded insane limits, but i know AdKats has a command for this if you're running that.

 

/adminmsg

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