BetterChatMute

Moved

Total Downloads: 2,515 - First Release: Jan 9, 2017 - Last Update: Jan 23, 2018

5/5, 10 likes
  1. Alright, though thats not the cause of the error above, the error is caused bz the fact that I changed the time param from DateTime to TimeSpan, I forgot to mention that :/
     
  2. Yeah, I was stating that I fixed the error he was getting on my plugin. I've implemented your change.
     
  3. How to i add myself so i can use the command /mute etc? been trying to figure it out.
     
  4. grant user DefectiveGamer betterchatmute.use
    grant user DefectiveGamer betterchatmute.use.global
    grant user DefectiveGamer betterchatmute.permanent
     
  5. Thanks, haha i managed to figure it out in the end!
    [DOUBLEPOST=1500146344][/DOUBLEPOST]Is there a way to see what is causing a server to time out? like an error file or something?
     
  6. I think there is a problem:

    global mute doesn't work for me ?
     
  7. Hello,

    I was wondering how i'd go about making a /advert plugin i made to also be muted when a player is muted? I have already tried myself, but i don't seem to figure out quite how it works.

    Thanks for any help!
     
  8. Is there a way to remove the name of the person who does the Mute? So instead of saying "Wulf has been muted by Mack7n for 1 minute" It would just be "Wulf has been muted for 1 minute"?

    I have a couple moderators who strictly have kick/ban/mute, and nothing else. If someone sees that one of these guys muted someone, people are going to claim admin abuse and other stuff on them (like god mode, noclip, etc....) when they don't have access to it. More or less just to protect my mods so they can continue playing w/o issues.

    **Found it, under language Folder if anyone else is looking for this. Need to edit it there.
     
  9. Right in lang directory you can edit it easily than the .cs
     
  10. (11:12:07) | [Better Chat Mute] Unable to call hook directly: OnBetterChat(System.Collections.Generic.Dictionary`2[System.String,System.Object])
     
  11. how to fix? Config no

    Failed to initialize plugin 'BetterChatMute v1.0.8' (JsonReaderException: Unexpected character encountered while parsing value: . Path '', line 0, position 0.)
    at Newtonsoft.Json.JsonTextReader.ParseValue () [0x00000] in <filename unknown>:0 at Newtonsoft.Json.JsonTextReader.Read () [0x00000] in <filename unknown>:0 at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () [0x00000] in <filename unknown>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, Boolean hasConverter) [0x00000] in <filename unknown>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) [0x00000] in <filename unknown>:0
     
  12. This was an issue with Oxide which requires you to update Oxide to the latest version.

    You must have incorrectly edited your config and broken it.
     
  13. Is this for players who want to mute a specific player from their own chat? Or is it just for admin use?
     
  14. Admin use - global chat mute. I suggest getting Ignore API for Rust | Oxide if you want people to be able to ignore mute other people. :)
     
  15. Actually that is just an API. If you are running Rust and BetterChat, I recommend BetterChat Ignore for Rust | Oxide
     
  16. It's for Hurtworld v2
     
  17. @LaserHydra as stated before can you please modify the plugin as API_TimeMute and API_Mute are a copy of eachother.

    Here is what it should be
    Code:
    private void API_TimeMute(IPlayer target, IPlayer player, TimeSpan timeSpan, bool callHook = true, bool broadcast = true)
            {
                mutes[target.Id] = new MuteInfo(DateTime.UtcNow + timeSpan);
                SaveData(mutes);            if (callHook)
                    Interface.CallHook("OnBetterChatTimeMuted", target, player, timeSpan);            if (broadcast)
                {
                    PublicMessage("Muted",
                        new KeyValuePair<string, string>("initiator", player.Name),
                        new KeyValuePair<string, string>("player", target.Name),
                        new KeyValuePair<string, string>("time", FormatTime(timeSpan)));
                }
            }
    It correctly time mutes them but the hook call is "OnBetterChatMuted" not "OnBetterChatTimeMuted" aswell as "broadcast" which tries to broadcast a perm mute.

    Thanks :)
     
  18. Also here's a globalmute fix.

    Code:
            private object OnBetterChat(Dictionary<string, object> messageData)
            {
                IPlayer player = (IPlayer) messageData["Player"];
                object result = HandleChat(player);
                if (result is bool && !(bool)result)
                {
                    if (!globalMute) {
                        if (mutes[player.Id].Timed)
                            player.Reply(lang.GetMessage("Time Muted Player Chat", this, player.Id).Replace("{time}", FormatTime(mutes[player.Id].ExpireDate - DateTime.UtcNow)));
                        else
                            player.Reply(lang.GetMessage("Muted Player Chat", this, player.Id));
                    }
                }            return result;
            }
     
  19. Code:
    Failed to call hook 'CmdMute' on plugin 'BetterChatMute v1.0.8' (FormatException: Input string was not in a correct format.)
    (16:17:46) | at System.String.ParseFormatSpecifier (System.String str, System.Int32& ptr, System.Int32& n, System.Int32& width, System.Boolean& left_align, System.String& format) [0x00000] in <filename unknown>:0
    at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
    at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
    at System.String.Format (System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Game.Rust.Libraries.Server.Broadcast (System.String message, System.String prefix, UInt64 userId, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Nov 11, 2017