MisterPixie
Allows players to send private messages to other players

Supported Games

Private Messages allows players to send private messages to other players.

Permissions

  • privatemessages.allow -- Allows player to send/receive private messages (if enabled in config)

Chat Commands

  • /pm <name> <message> -- Send a private message to player
  • /r <message> -- Reply to your most recent private message
  • /pmhistory <name> -- Show the previous 5 messages of PM with that player

Configuration

{
  "EnableLogging": true,
  "EnableHistory": false,
  "UseCooldown": false,
  "CooldownTime": 3,
  "UseIgnore": false,
  "UseUFilter": false,
  "UsePermission": false,
  "UseBetterChatMute": false,
  "PmCommand": "pm"
}

Localization

{
  "PMTo": "[#00FFFF]PM to {0}[/#]: {1}",
  "PMFrom": "[#00FFFF]PM from {0}[/#]: {1}",
  "PlayerNotOnline": "{0} is not online.",
  "NotOnlineAnymore": "The last person you was talking to is not online anymore.",
  "NotMessaged": "You haven't messaged anyone or they haven't messaged you.",
  "IgnoreYou": "[#FF0000]{0} is ignoring you and cant recieve your PMs[/#]",
  "SelfPM": "You can not send messages to yourself.",
  "SyntaxR": "Incorrect Syntax use: /r <msg>",
  "HistorySyntax": "Incorrect Syntax use: /pmhistory <name>" ,
  "SyntaxPM": "Incorrect Syntax use: /{0} <name> <msg>",
  "NotAllowedToChat": "You are not allowed to chat here",
  "History": "Your History:\n{0}" ,
  "CooldownMessage": "You will be able to send a private message in {0} seconds" ,
  "NoHistory": "There is not any saved pm history with this player." ,
  "CannotFindUser": "Cannot find this user" ,
  "CommandDisabled": "This command has been disabled",
  "IsMuted": "You are currently muted & cannot send private messages",
  "TargetMuted": "This person is muted & cannot receive your private message",
  "NoPermission": "You don't have the correct permissions to run this command",
  "HistoryPM": "[#00FFFF]{0}[/#]: {1}",
  "Logging": "[PM]{0}->{1}:{2}"
}

For Developers

Hooks

object OnPMProcessed(IPlayer sender, IPlayer target, string message)  // Called before a PM/Reply is sent
//Returning a non-null value overrides default behavior

API Methods

 //Adds to the history of who PM'ed who.
void AddPmHistory(string initiatorId, string targetId)

//Adds to the users PM history & adds to logging.
void AddHistoryAndLogging(IPlayer initiator, IPlayer target, string message)

Credits

  • PaiN, for the original version of his PrivateMessages plugin
  • Nogrod, for the original version of his PrivateMessage plugin

MIT License


Copyright (c) 2019 MisterPixie


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.