1. Wulf

    Wulf Community Admin

    Any errors in your oxide/logs?
     
  2. Can you please tell me how I check if I have errors?
     
  3. You should add permissions for private message, for allows a certains group
     
  4. Mine does.
     
  5. It says no permission when people try to /pm, but there are no permissions for me to set?
     
  6. Could something be added to this plugin to ban certain players from PM'ing?

    Sometimes if they're muted they will abuse people over PM instead of over Chat, and currently if they're in the default group there's no way of stepping them except for Banning them.
     
  7. @Nogrod Came here to ask for the same thing please
     
  8. This would be good it it had permissions.. I would love to PM players as an admin, but players not being able to PM.
     
  9. What jemes said and also would be great if PM worked with /ignore
     
  10. If you receive a message from a player and that player disconnects before you had a chance to reply, when you hit /r <message>, the message will go to a completely different player. It also seems to be random and not alphabetical. Any chance this can be changed so it says the player is no longer online?
    Thank you
     
  11. Put this at line 33:
    permission.RegisterPermission("privatemessage.disable", this);

    Put this at line 54:
    if (permission.UserHasPermission(p.UserIDString, "privatemessage.disable"))
    {
    SendReply(player, "This user does not allow private messages.");
    return;
    }
     
  12. i wonder how to check PM logs :) :)
     
  13. Can you please help I'm trying to add the bit by riddle but keep getting this
    Error while compiling: PrivateMessage.cs(34,38): error CS1519: Unexpected symbol `(' in class, struct, or interface member declaration
    This is what i changed this is line 33 to 62
    Code:
    permission.RegisterPermission("privatemessage.disable", this);
            void OnPlayerDisconnected(BasePlayer player)
            {
                if (pmHistory.ContainsKey(player.userID)) pmHistory.Remove(player.userID);
            }        [ChatCommand("pm")]
            void cmdPm(BasePlayer player, string command, string[] args)
            {
                if (args.Length > 1)
                {
                    var name = args[0];
                    var p = FindPlayer(name);
                    if (p == player)
                    {
                        PrintMessage(player, "SelfPM");
                        return;
                    }
                    if (p != null)
                    {
                        if (!(bool) (Interface.Oxide.CallHook("CanChat", player) ?? true))
                        if (permission.UserHasPermission(p.UserIDString, "privatemessage.disable"))
                        {
                            SendReply(player, "This user does not allow private messages.");
                            return;
                        }
                        {
                            SendReply(player, "You are not allowed to chat here");
                            return;
                        }
     
  14. Wulf

    Wulf Community Admin

    The permission registration needs to be inside a hook such as Init().
     
  15. When a PM is being sent to a non existing user, eg fgsrgrtfwef this error pops up because of the earlier added snippet to disable PM's to someone, so a little bit of tweaking is needed before you use it.

    You have to put the small code for checking the permission downwards inside the next if, just before the actual code where it would send a PM.

    Code:
    (04:41:17) | Failed to call hook 'cmdPm' on plugin 'PrivateMessage v2.0.2' (NullReferenceException: Object reference not set to an instance of an object)
    (04:41:17) | at Oxide.Plugins.PrivateMessage.cmdPm (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PrivateMessage.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  16. Is the file attachment above, the latest update then?
     
  17. Hey, can you add a hook to betterchatmute? people can still harass others using PM while they are still muted
     
  18. Installed PM, however everyone (including me, the ownerid) is receiving the server message "[PrivateMessage] Blocked from Private Messaging!"

    LOG FILE
    16:56 [Info] Unloaded plugin PrivateMessage v2.0.2 by Nogrod
    16:56 [Info] Loaded plugin PrivateMessage v2.0.2 by Nogrod
    16:56 [Info] [PrivateMessage] Blocked from Private Messaging!
     
  19. Wulf

    Wulf Community Admin

    This plugin calls the CanChat hook to see if players can chat.

    There is no message in this plugin that says that.
     
  20. I was also having problems with muted players abusing private messaging to keep spammng even after muted.
    Also what does ufilter_enabled in config actually do?