If private messaging is turned off, deny messages, even from friends.
This commit is contained in:
parent
3ef3689e6d
commit
3b0a131ca2
@ -60,13 +60,15 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
|||||||
_punish = punish;
|
_punish = punish;
|
||||||
_friendsManager = friendManager;
|
_friendsManager = friendManager;
|
||||||
_serverName = GetPlugin().getConfig().getString("serverstatus.name");
|
_serverName = GetPlugin().getConfig().getString("serverstatus.name");
|
||||||
|
|
||||||
MessageHandler messageHandler = new MessageHandler(this);
|
MessageHandler messageHandler = new MessageHandler(this);
|
||||||
|
|
||||||
ServerCommandManager.getInstance().registerCommandType("AnnouncementCommand", AnnouncementCommand.class, new AnnouncementHandler());
|
ServerCommandManager.getInstance().registerCommandType("AnnouncementCommand", AnnouncementCommand.class,
|
||||||
|
new AnnouncementHandler());
|
||||||
|
|
||||||
ServerCommandManager.getInstance().registerCommandType("RedisMessage", RedisMessage.class, messageHandler);
|
ServerCommandManager.getInstance().registerCommandType("RedisMessage", RedisMessage.class, messageHandler);
|
||||||
ServerCommandManager.getInstance().registerCommandType("RedisMessageCallback", RedisMessageCallback.class, messageHandler);
|
ServerCommandManager.getInstance()
|
||||||
|
.registerCommandType("RedisMessageCallback", RedisMessageCallback.class, messageHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddCommands()
|
public void AddCommands()
|
||||||
@ -113,7 +115,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
|||||||
{
|
{
|
||||||
|
|
||||||
// If the receiver has turned off private messaging and the sender isn't a mod
|
// If the receiver has turned off private messaging and the sender isn't a mod
|
||||||
if (!_friendsManager.isFriends(target, sender) && !_preferences.Get(target).PrivateMessaging)
|
if (!_preferences.Get(target).PrivateMessaging)
|
||||||
{
|
{
|
||||||
return C.cPurple + target.getName() + " has private messaging disabled.";
|
return C.cPurple + target.getName() + " has private messaging disabled.";
|
||||||
|
|
||||||
@ -472,7 +474,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
|||||||
|
|
||||||
// Include the sender's rank if this is a admin message. So we can format the receivers chat.
|
// Include the sender's rank if this is a admin message. So we can format the receivers chat.
|
||||||
adminMessage ? F.rank(_clientManager.Get(sender).GetRank()) : null);
|
adminMessage ? F.rank(_clientManager.Get(sender).GetRank()) : null);
|
||||||
|
|
||||||
final UUID uuid = globalMessage.getUUID();
|
final UUID uuid = globalMessage.getUUID();
|
||||||
|
|
||||||
// A backup for the rare case where the message fails to deliver. Server doesn't respond
|
// A backup for the rare case where the message fails to deliver. Server doesn't respond
|
||||||
|
Loading…
Reference in New Issue
Block a user