BetterChatMute

Moved

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

5/5, 10 likes
  1. It`s normal?
    Code:
    [N-B-T] ХОМЯЧЕК: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Gh0st: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Fantom: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Skidrow: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Skadi: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    VAPE_NaTiOn: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    blackpearL: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Death_Knigth: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    your mom's name?: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    CapJack: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
    Froyline: -736365 day(s), -16 hour(s), -37 minute(s), -40 second(s)
     
  2. Plugin not working since update
    It tells the person they are muted but still allows them to talk in general chat.
    same as Loyalty plugin it tells them they have reached a new rank but it does not give them the rank

    Sorted this after removing CapsNoCaps plugin as they no longer work together
     
    Last edited by a moderator: Feb 11, 2017
  3. Getting the same problems with my users; I'm getting randomly high mute times. (I already cleared the file, I apologize).

    Does rebooting the server w/ concurrently muted people turn their times to that? I haven't tested it yet.
     
  4. Same problem for me.
    When i doing temporary mute, for example 60 minutes, everything is fine, i can see proper output of the /mutelist command. In 60 minutes, player is being unmuted, and using /mutelist shows "There is nobody muted at the moment.". Checking data/BetterChatMute.json, and there is muted guy. If i reloading the plugin, player is getting muted again, and when i type /mutelist, i see that output with -736365 day(s). Only manual /unmute command removes the player from data/BetterChatMute.json and unmutes him forever.
     
  5. Looks like this problem is the same as was mine.
    Manually edit BetterChatMute.cs and on the line 99 add command SaveData(mutes);
    So it would look like this:

    Code:
    ...
    timer.Repeat(10, 0, () =>
    {
        List<string> expired = mutes.Where(m => m.Value.Expired).Select(m => m.Key).ToList();
        foreach (string id in expired)
        {
            mutes.Remove(id);
            server.Broadcast(lang.GetMessage("Mute Expired", this).Replace("{player}", players.FindPlayerById(id)?.Name));
            Puts(lang.GetMessage("Mute Expired", this).Replace("{player}", players.FindPlayerById(id)?.Name));
        }
        ---->SaveData(mutes);
    });
    ...
     
  6. And work it?
     
  7. I wouldn't post this otherwise=)
     
  8. Working for me, thanks!
     
  9. Calling hook OnUserChat resulted in a conflict between the following plugins: BetterChat - True (Boolean), BetterChatMute (False (Boolean))
     
  10. Are you using latest version of BetterChat?
     
  11. "Better Chat", "LaserHydra", "5.0.3", ResourceId = 979

    Calling hook OnBetterChat resulted in a conflict between the following plugins: BetterChatMute - False (Boolean), CapsNoCaps (а ничо (String))
     
  12. CapsNoCaps is out of date, as I remember....
    Try to remove it and see if it'l help
     
  13. Eat

    Eat

    Add console command plz))) Ops... mute "nick\id" "time"
    Cool plugin)))
     
  14. What are you talking about? There is mute, unmute console commands already.... Every command can be executed from both chat and console
     
  15. @LaserHydra just a feature request for 2 things :)
    • If player mutes could be printed to Console, with the mute duration, player and mute initiator for logging later. Just helpful to keep tabs on Staff actions :)
    • A hook with Slack | Oxide, that prints in a similar way to SlackReport | Oxide the above things to Slack. This would be amazing for people managing multiple servers and keeping tabs on things even when not ingame/looking at console :D
    Thanks a million Hydra if these are possible!!
     
  16. Well after further testing, it doesn't working. Problems started, when i gave mute for 24 hours. Maybe due to server restart, but im not sure, still getting -736365 day(s).
     
  17. Done!
    I've finally made a fix for this!
    Ok, so here is the fixed version with some additional changes. Here is a full list of what I've added:
    1) Fixed -736365 day(s) bug after plugin reloading
    2) Added time for reply to time-muted players, so they can see how long until unmute.
    3) Added admin name to the mute/time mute. Both to console and players, so everyone can see who gave a player mute.
    4) Added call to SaveData after removing expireid mutes

    Especcially for @LaserHydra -
    Code:
    public class Date
            {
                public string _value = "00/00/00/01/01/0001";
                //We don't need _cachedDateTime here at all - it doesn't sotres at data file
                internal DateTime value
                {
                    get
                    {
                        //return _cachedDateTime;
                        //As i mention above - time cache is not being stored at the data file, we only have _value
                        int[] date = (from val in _value.Split('/') select Convert.ToInt32(val)).ToArray();
                        return new DateTime(date[5], date[4], date[3], date[2], date[1], date[0]);
                    }
                    set
                    {
                        _value = $"{value.Second}/{value.Minute}/{value.Hour}/{value.Day}/{value.Month}/{value.Year}";
                    }
                }
            }
     
    Last edited by a moderator: Feb 16, 2017
  18. Wulf

    Wulf Community Admin

    If you have contribution, we've mentioned to you how to contribute it. Random versions are not allowed to be posted, we've mentioned this before as well, as we have to moderate them and check for potential malicious changes despite who posted it. Patch.diff files work great, [ code ] tags to show changes also work.
     
  19. Ok, Fine. This is patch. For some reason I'm unable to attach file right now. Whatever...
    Here is a full list of what I've added:
    1) Fixed -736365 day(s) bug after plugin reloading
    2) Added time for reply to time-muted players, so they can see how long until unmute.
    3) Added admin name to the mute/time mute. Both to console and players, so everyone can see who gave a player mute.
    4) Added call to SaveData after removing expireid mutes

    I don't really care if over users would be able to get my patch. I basicly made it for myself only. Just wanted to share the working version with over users.
     
  20. Wulf

    Wulf Community Admin

    I'm reviewing it right now, will post a version with it if it all checks out. Thanks. :)