AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Signal PM System - MySQL/SQLite based in-game Private Messaging (https://forums.alliedmods.net/showthread.php?t=123978)

Scone 04-11-2010 03:20

Signal PM System - MySQL/SQLite based in-game Private Messaging
 
3 Attachment(s)
Signal PM System - In-game Private Messaging

Allows users to send private messages to each other. Messages can be sent between servers, and to players who are currently offline.

A Quick Guide

Type "pm" in chat to open the main menu. From here you can access your inbox, outbox, friends list, block list, group list, and a help menu. Alternatively, use the shortcuts "pminbox", "pmoutbox", "pmfriends", "pmblocks", "pmgroups" and "pmhelp" in chat. You can bind a key to open the main menu using: "bind <key> pm".

To add someone to your friends list, either use the friends menu to add someone who is in game now, or use the "pmaddfriend" command, followed by the player's SteamID, to add someone who has connected previously but is offline at the moment.

To send a message, type "pmsend" in chat, followed by your message. Your friends list will appear and you can choose a recipient. To reply to the last message you read, just type "pmreply" in chat, followed by your message.

It's easy to block a user, and you can delete all the messages you've ever received from someone with a single action.

If you are unable to use chat triggers, just prepend a slash to all your commands (for example, "/pminbox").

How to Install

Make sure your MySQL/SQLite database is set up correctly with SourceMod. By default, Signal will use the "default" configuation. See this link for more info:

http://wiki.alliedmods.net/SQL_Admins_(SourceMod)

When this is done, copy the file 'signal.smx' into your 'sourcemod/plugins/' folder, and the contents of the 'translations.zip' file into your 'sourcemod' folder. You need both the plugin and the translations for Signal to work. When Signal starts, it will automatically set up the required tables. No further configuration is required.

You can change the database and table names Signal uses with the cvars provided.

Note that, as SQLite databases can only be used with one server at a time, MySQL is required if you wish to send messages between multiple servers. If you only have one server, SQLite is fine.

Features

- Inbox and Outbox
- Friends list and block list
- View which friends are online right now
- Notification when a message is received
- Quick reply function
- User created groups, fixed server groups
- API to send PMs from other SM plugins
- MySQL backend - link with your website
- New in v1.3.0 - SQLite support
- Flood protection
- Highly robust, will queue messages in the event of DB failure
- Threaded design, meaning no lag
- Built in help system
- Automatically add a set of SteamIDs (or groups) to all users' friends lists
- Translation support

Screenshots

The friends list:
http://i.imgur.com/ChZCh.png

The user menu:
http://i.imgur.com/EroZi.png

The message view:
http://i.imgur.com/qvglo.png

The help menu:
http://i.imgur.com/K5VMl.png


Potential Uses

- Let players contact admins, and vice versa
- Let server owners communicate with all admins at once, using groups
- Let players communicate with others who are offline
- Help clan members organise a match
- Let players/admins communicate between different servers in a group
- Integrate with a MySQL enabled website (for example, a clan ladder)
- Integrate with other plugins

Cvars

signalpm_table: The MySQL/SQLite table name that Signal will use (default: "signal")
signalpm_database: The SourceMod database configuration to use (default: "default")
signalpm_floodlimit_onemin: The number of messages a user can send every minute (default: 5)
signalpm_pollinterval: The number of seconds to wait between checks for new messages (lower limit: 12)
signalpm_notifytype: Where to display the new message notification. 0 for chat (default), 1 for hint text.

Auto-Add Friends

It is possible to add one or more contacts (for example, the server owners) to the friends list of every user by default. Simply add a record to the friends table, with your chosen name and ID in the "friendName" and "friendId" fields, but fill in the "userId" field with "all". Users cannot block or delete these contacts.

If you don't want to manually update the database, two (console only) commands have been added as of version 1.2.1 - "pmaddserverfriend" and "pmdeleteserverfriend". You need root admin to perform these commands, and the player you are adding must have connected to a server at any point after the 1.2.1 update.

Groups

You can send messages to multiple players at once using groups. For full instructions, see the in-game help ('pmhelp' in chat). To make a group appear to all users (for example, 'Admins'), create it as normal, then set the owner ID in the database (signal_groups) to "all".

Link with Other Plugins

The "signal.inc" file provided in the attachments will allow you to send PMs from your own plugins. Add it to your scripting/includes folder, and use this code as an example:

PHP Code:

#include <sourcemod>
#include <signal>
#pragma semicolon 1

new bool:g_signalEnabled false;

public 
OnAllPluginsLoaded() {
    
g_signalEnabled LibraryExists("signal");
}

public 
OnLibraryAdded(const String:name[]) {
    if(
StrEqual(name"signal")) g_signalEnabled true;
}

public 
OnLibraryRemoved(const String:name[]) {
    if(
StrEqual(name"signal")) g_signalEnabled false;
}

PMSample() {
    if(
g_signalEnabled)
        
// Your name, your ID, recipient's SteamID, message
        
SendPrivateMessage("Sample Plugin""#server.sample""STEAM_0:0:1337""Why hello there!");


Technical Problems

It's likely that any problem you get with Signal will be because your database is misconfigured. Check you've entered the username/password correctly in the databases.cfg file, and make sure Signal has the correct database permissions (Select, Insert, Update, Delete, Create Table and Alter Table).

Also, make sure you have uploaded the contents of the translations zip file to the correct folder.

If you do run into any problems, PM me directly and I'll respond as soon as I can.

Compatibility

Obviously this plugin is only compatible with mods that support radio menus. For example, it works with CS:S, TF2 and L4D[2], but not HL2DM.

Translations
Translations provided by:
- DeaD_EyE82 (German)
- Ph03n1X (Russian)
- Richard Helgeby (Norwegian)
- Prince03 (Italian)
- tejeskifly (Hungarian)
New phrases were added in v1.2.0 and v1.2.1, so some translations may be incomplete. In this case, some phrases will appear in English until each translation is updated.

Finally

The plugin is under active development, and I'd welcome any feature requests that you might have.

siosios 04-11-2010 15:49

Re: Signal PM System - MySQL based in-game Private Messaging
 
i like this and might incorporate it into my vbulletin setup.

exvel 04-11-2010 16:04

Re: Signal PM System - MySQL based in-game Private Messaging
 
This should be really useful. Nice one. :) You may also add translations support.

Scone 04-11-2010 17:07

Re: Signal PM System - MySQL based in-game Private Messaging
 
Quote:

Originally Posted by siosios (Post 1147310)
i like this and might incorporate it into my vbulletin setup.

This could be interesting - if you do, tell me how you get on!

Quote:

Originally Posted by exvel (Post 1147323)
You may also add translations support.

Sounds like a good idea. It's going to take a while to add though - there's a lot of text in this plugin :)

BDeep 04-12-2010 12:35

Re: Signal PM System - MySQL based in-game Private Messaging
 
It would also be cool if it could be incorporated into PHPBB as well.

BDeep 04-12-2010 12:55

Re: Signal PM System - MySQL based in-game Private Messaging
 
Also, is it possible to have more than one automatically added "friend" via the config file?

Scone 04-12-2010 13:12

Re: Signal PM System - MySQL based in-game Private Messaging
 
Quote:

Originally Posted by BDeep (Post 1148184)
Also, is it possible to have more than one automatically added "friend" via the config file?

Not yet, but it's a good idea - I'll put multiple auto-adds in the next release (I have an idea how it can be done more efficiently too).

BDeep 04-12-2010 13:22

Re: Signal PM System - MySQL based in-game Private Messaging
 
I just added it to my two servers that are on different servers (Denver and NYC) attached to one database and it works so far... I dont have another user to test it with yet. But I am sure it will be tested tonight. Looks like good work to me.

+w00t

Scone 04-12-2010 16:22

Re: Signal PM System - MySQL based in-game Private Messaging
 
Version 1.1.0 was just released, with the following new features:
- Translation support
- Improved auto-add system
See the first post for more information and updated downloads.

BDeep 04-12-2010 16:31

Re: Signal PM System - MySQL based in-game Private Messaging
 
NICE!

So another suggestion maybe...

Would it be possible to maybe notify people VIA email or something that they have a PM?

I know this kind of goes along with the forums stuff, but wouldnt like a simple once or twice a day email schedule work? Maybe even a TXT to a cell phone... Of course this should be configurable so that only admins get that feature.

Just thoughts


All times are GMT -4. The time now is 03:34.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.