Jump to content
Sign in to follow this  
ImportBot

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.

Share this post


Link to post

Originally Posted by ScHrAnZ-DiNgEnS*:

 

What is the different between this and Basic Admin Alert?


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

Share this post


Link to post

Originally Posted by Zaeed*:

 

This version displays a info like popup above the system tray as well as making sound. You can also turn on/off different alert words


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

Share this post


Link to post

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.

Share this post


Link to post

Originally Posted by Athanasios2104*:

 

installing :smile:

 

btw, what is the PCM format of a wav file? :?

 

Is there an option to play the default Window's beep sound?


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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Originally Posted by Lorax74*:

 

I tracked down the problem with the systray alerts not saving and updated the first post with the new version.


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

Share this post


Link to post

Originally Posted by ghost-hsdragon*:

 

Works perfect now. Great job! keep up the good work!!!


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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Originally Posted by pssparkman*:

 

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


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

Share this post


Link to post

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.

Share this post


Link to post

Originally Posted by pssparkman*:

 

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


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

Share this post


Link to post

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.

Share this post


Link to post

Originally Posted by pssparkman*:

 

Thanks, never would have figured that out. :biggrin:


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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Our picks

    • 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

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

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