Jump to content

Admin Alert Plugin


Recommended Posts

Originally Posted by Lorax74*:

 

Allows you to create custom alerts for that can alert you with a sound, system tray alert or both. Set the Alert count number to the number of alerts you want. To test the alerts, change the Test alert from "No" to "Yes".

 

Requirements:

 

Installation:

- Extract AdminAlerts.cs into your plugins directory.

- Extract the Media folder into your Procon directory

 

Plugin Description:

AdminAlerts allows you to create amd customize as many alerts as you need.

 

Code:

~Config
=======================================
[Number of Alerts]    The number of alerts you would like to configure.
                
            Increasing this number adds alerts to the bottom of the list, decreasing it removes alerts from the bottom of the list.  Removed alerts do not retain their configs.

+Alert #
=======================================
 [1.1 Name]    A friendly name for you to quickly and easily tell which alert has fired.
 [1.2 Enabled]    Allows you to turn on and off individual alerts without having to remove the alert or disable the plugin.
 [1.3 Keywords]    An array of words, one per line, to watch and alert for.
 [1.4 Enable Audio alerts]    Enables a sound to be played when this alert fires.
 [1.4a     Audio File]    The name of the audio file in WAV format. Place audio files in the Media directory. Default is chimes.wav.
 [1.4b     Repeat Count]    The number of times the audio file will repeat before stopping. Default is 1.
 [1.5 Enable system tray alerts]    Enables system tray notification for this alert.
 [1.6 Test alert]    Setting this to Yes will play the audio file if enabled and show the system tray test meassage if enabled.

Notes:
=======================================
-- This plugin will examine each line of chat against each alert configured.  
-- Only plays .wav files in PCM format.
-- Only one sound will play at a time.  If a new alert comes in as an alert is playing, the new alert will play and the old will stop
Changelog

2.3

  • Updated for BF4
2.1

  • Fixed bug with systray alerts not reading config file[/*:m:3bv1hhgr]
  • Added the ability to have alerts displayed in the chat console. This does not go out to players, only displays in the local chat console.[/*:m:3bv1hhgr]
2.0 Initial public release

 

Attachment Link added -> Attachment 2560

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Originally Posted by Lorax74*:

 

it does a little more than just popping up a system tray notification :smile:

 

This version also allows you to set a virtually unlimited amount of alerts per server (only tested up to 5, but too many will probably impact performance, needs to be tested). An alert consists of the name of it, for the system tray notification, if it's enabled (so you can toggle it on and off if you decided you don't need or want it at any given time), a series of keywords or buzz words, the abilty to turn on and off the audio alert and define the sound used and how many times it plays, the ability to turn on and off the system tray alert and the ability to test how the alert sounds and looks without having to jump in the game and trigger it or wait for a player to trigger it.

 

Say you want to page an admin, set an alert for that and look for things like "admin" "report" "page", etc. This plugin doesn't match words, it looks for the series of characters in each word found in the line of chat, so typing !admin, @admin and admin are all the same thing. I went this way since often someone might just type "is there an admin on_" or something along those lines and it could be missed.

 

You can also define a custom sound for each alert. Some alerts might not be as high a priority to you, say a player is cursing (some servers aren't fond of that), if you're deep in the game and you hear the curse alert go off, you'll know what it is and decide to act on it or ignore it without having to alt-tab out or look to a different monitor to see which alert fired. Along that same line you may want to instantly know when someone is accusing someone else of an aimbot and you can configure a sound for that.

 

The next version of this will display the caught words not only in the plugin console, but also in the chat console if you so desire (configurable). I'm also toying with having alerts send a say or yell in-game to the admin running the plugin on their procon.

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

Originally Posted by Sage-BRIG*:

 

One issue, seems to reset itself when I log off procon. I start it back up and its installed but no selections are made. I have to reenter everything again. Other than that AWESOME plugin, I have three alerts, one for suspected cheat/hacks-one for admin and one for racial slurs.

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

Originally Posted by Sage-BRIG*:

 

Well, after entering it into the older procon folder, it carried over fine. weird bug, but not a big deal--thanks for the plugin and don't waste energy trying to track such a simple fix. I appreciate your efforts and then some, they have made our server one of the top servers and the admin pager has made my life easier.

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

Originally Posted by cameronswendt*:

 

Fantastic plugin! It saves us an incredible amount of time :smile:

 

Just a note, it also catches the spam bot messages. I had one of my code guys make a quick change to ignore rotating messages with keywords though.

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

Originally Posted by LAB-HeliMagnet*:

 

Just a note, it also catches the spam bot messages. I had one of my code guys make a quick change to ignore rotating messages with keywords though.

I won't speak for the author of the plugin, but I would appreciate it if you at least PM'ed the author the new code or posted it here. It helps a lot when the best (most functional) version is out there. We're all in this together!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ghost-hsdragon*:

 

I am also getting the problem where it resets the system tray alert to "off" when i shutdown procon. Everything else seems to be fine only the "enable system tray alert" resets.

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

Originally Posted by Phogue*:

 

The bfbc2 server loops back any messages with strSpeaker set to "Server" if they were sent with admin.say (to the normal chat area, not yelling)

 

The below code will ignore any loopbacked messages.

Code:

public void OnGlobalChat(string strSpeaker, string strMessage) {
	if (String.Compare(strSpeaker, "Server", true) != 0) {
		// Message was not sent back by the BFBC2 server.
	}
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Ferret*:

 

I sent a PM to Lorax about this if I'm not mistaken but I reckoned I should post it here in case one of the other coders wanted to do it.

 

My worry is that you might miss the sound or popup when you're away from the computer e.g. the toilet. Can someone code in another alert where it highlights/focuses procon in the taskbar? Just like when you recieve a new message in an IM client. Thanks

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

Originally Posted by Zaeed*:

 

I had a play with message boxes, the issue was that the C# MessageBox is Modal.. You can get around that by firing off a new thread.

Code:

public void dispBox()
        {
            string message = "Message";
            string caption = "Caption";
            DialogResult result;

            result = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
        }

new Thread(dispBox).Start();
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Lorax74*:

 

I am also getting the problem where it resets the system tray alert to "off" when i shutdown procon. Everything else seems to be fine only the "enable system tray alert" resets.

I haven't noticed this happening, but I'll see if I can track it down.

 

As far as the spam bot alerts go, good call and I had actually thought to ignore any messages sent by the server but it slipped my mind. Feel free to post up either the code block change/addition and I'll incorporate it into the plugin.

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

Originally Posted by cllckcllck*:

 

The bfbc2 server loops back any messages with strSpeaker set to "Server" if they were sent with admin.say (to the normal chat area, not yelling)

 

The below code will ignore any loopbacked messages.

Code:

public void OnGlobalChat(string strSpeaker, string strMessage) {
	if (String.Compare(strSpeaker, "Server", true) != 0) {
		// Message was not sent back by the BFBC2 server.
	}
}

I had a play with message boxes, the issue was that the C# MessageBox is Modal.. You can get around that by firing off a new thread.

Code:

public void dispBox()
        {
            string message = "Message";
            string caption = "Caption";
            DialogResult result;

            result = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
        }

new Thread(dispBox).Start();
where would i put those in the file to make them work? i tried a bit lastnight but then it wouldn't even notify me when someone said one of the keywords at all
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Zaeed*:

 

You might want to put a filter on server messages. The kill streak plugin often sets the plugin off...

 

i've modified the first line of global chat to be

Code:

if ((String.Compare(m_strPreviousMessage, strMessage) != 0) && (String.Compare(strSpeaker, "Server") !=0))
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Zaeed*:

 

The bfbc2 server loops back any messages with strSpeaker set to "Server" if they were sent with admin.say (to the normal chat area, not yelling)

 

The below code will ignore any loopbacked messages.

Code:

public void OnGlobalChat(string strSpeaker, string strMessage) {
	if (String.Compare(strSpeaker, "Server", true) != 0) {
		// Message was not sent back by the BFBC2 server.
	}
}

I had a play with message boxes, the issue was that the C# MessageBox is Modal.. You can get around that by firing off a new thread.

Code:

public void dispBox()
        {
            string message = "Message";
            string caption = "Caption";
            DialogResult result;

            result = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
        }

new Thread(dispBox).Start();
where would i put those in the file to make them work? i tried a bit lastnight but then it wouldn't even notify me when someone said one of the keywords at all
cllckcllck, my code there is only a rough doodle.. It doesn't work, just a concept..

 

You'll have to look to Lorax to see if he want's to add this functionality to the plugin.

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

Originally Posted by Quasae*:

 

Is this plug-in supposed to work over the PLC? If so, I can't for the life of me get it to work... Even added the sound files to the client machine. Works on the box running the layer server fine.

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

Originally Posted by Zaeed*:

 

Is this plug-in supposed to work over the PLC? If so, I can't for the life of me get it to work... Even added the sound files to the client machine. Works on the box running the layer server fine.

No it has to run locally
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Zaeed*:

 

Is there an updated version of this that ignores the server messages, or someone have one they wouldn't mind sharing?

Code:
(String.Compare(strSpeaker, "Server") !=0)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Zaeed*:

 

Where do I need to put that, I know inside the plugin file, but any place particular? :smile:

Code:
public void OnGlobalChat(string strSpeaker, string strMessage)
        {
            // Bug from server sends messages multiple times.
            if ((String.Compare(m_strPreviousMessage, strMessage) != 0) && (String.Compare(strSpeaker, "Server") !=0))
            {   foreach (Alert alert in this.m_dicAlerts.Values)
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by Headshot177*:

 

Auf dem eigenen Server wo procon fest 24 Stunden läuft, spielt er den Alert Sound ab, aber bei den Accounts von unseren Admins spielt er nichts ab, obwohl alle mit dem eigenen Server verbunden sind. Wie kann ich das Problem beheben.

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

Originally Posted by Phil_K*:

 

Hi.

 

Question was how to have the sound played on the clients connected to a PRoCon layer server, as actually

it only gets played on the server which runs the layer server.

 

Well, i would say it is not possible, as Zaeed wrote on 2. July that plugin is not designed to have a working

sound info over the PLC. You have to run it locally.

 

Zaeed schrieb am 2. Juli was dazu.

Das Plugin ist eher dazu gedacht local zu laufen als über den PRoCon Layer Server.

Grundsätzlich mag das zwar gehen, aber die Sound Benachrichtigung wird nicht übertragen.

 

Greets

Phil.

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

Originally Posted by Headshot177*:

 

Auf dem Layer Server funktioniert der Alart mit dem Sound, aber die Admins wo einen Account auf dem Layer Server haben da funktionierts nicht. Warum spielt der Alert da keine sounds ab?

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

Originally Posted by Sibul*:

 

Headshot177: Dir wurde bereits deine Frage beantwortet, das Plugin kann nur wie von dir gewünscht funktionieren, wenn es auf dem PC ausgeführt wird auf dem ProCon direkt mit dem Server verbunden ist. Ein weiterreichen an die Layer Server Clients funktioniert in dieser Form nicht. Das heisst nicht das es das nie tun wird. Aktuell kann ProCon dies jedoch nicht.

 

Dies hier ist ein Englisches Forum, es wäre sehr nett wenn du deine Beiträge wenigstens versuchst in Englisch zu schreiben oder dir dabei helfen lässt es zu tun. Das bringt dir viel schneller hilfe. ;-)

 

For the rest of the world:

 

I told him that his question is already answered and it is not possible for the Plugin to work over LayerServer. It might in the future, but currently it's not. Also that this is a english speaking forum and it would be nice if he could at least try to write in english or get help to do so.

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