Author Topic: Server_Mute [v1.0.0-2 / v1.1.0-1] - as per request of K3k0m@n  (Read 2220 times)

MSP's mute command is apparently really bad, and I decided against using CSCS to create a new one.
I attempted to make it look as default as possible, even going as far as preventing serverCmdStartTalking from functioning (optionally) on muted players.

Command syntax is /mute victim minutes, the victim does not have to be on the server. Names will work if the victim is on the server, while BL_ID will always work.

Features:
  • Mutes remain persistent after restarts.
  • Blue names in the upper-left corner can optionally be prevented from working on muted players (their name will not show up when they're typing a message). By default, it is prevented from working.
  • Permanent muting can be used by using -1 for the amount of minutes.
  • Victims do not have to be on the server to be muted
  • Mutes do not have to be announced, they are by default.

Variables:
  • $Mute::Core::Config
    • Configuration location
    • config/server/mute/config.cs by default.
  • $Mute::Core::SaveDir
    • Muted player data goes here, this is where the DB will fetch muted players on server start.
    • config/server/mute/saves by default.
  • $Mute::Server::Announce
    • Option to announce mutes.
    • 1 by default.
  • $Mute::Server::AllowRank
    • Who is able to use the command.
    • Admin by default
    • Options include
      • Moderator*
        • *Must use %client.isModerator, wasn't sure what to actually use here so I just assumed the standard.
      • Admin
      • Super Admin
      • Host
  • $Mute::Server::AllowIsTyping
    • Option to enable/disable muted player's blue name in the upper left.
    • 1 by default.

I'll add RTB prefs by demand, considering it's supposed to be dead and there's no replacement for it.



Download
Stable: v1.0.0-2
Testing: v1.1.0-1

Support_Updater will work with this addon, delete version.txt if you wish for it not to.



Testing repository currently has a shadow mute option, set $Mute::Server::Shadow to 1 to try it out. The stable version does not currently have this option.
« Last Edit: May 31, 2015, 07:10:55 PM by TheBlackParrot »


Fixed a couple of bugs
  • Fixed bug with permanent mutes giving an invalid timestamp when muted players try to chat. ("You have been muted. It expires on 0.")
  • Forgot to add support for the announce variable.

This is fantastic. Do you think it's possible to add in a shadowmute? Basically when they try to talk they see their chat but noone else does.

This is fantastic. Do you think it's possible to add in a shadowmute? Basically when they try to talk they see their chat but noone else does.
wouldnt that be hellban though

This is fantastic. Do you think it's possible to add in a shadowmute? Basically when they try to talk they see their chat but noone else does.
Just pushed it to the testing repository actually. :P

Just pushed it to the testing repository actually. :P
Fantastic, also:
// (!%year % 4) wasn't working. why? i don't know
It's because the ! is evaluated before the %, causing it to be (!%year) % 4 instead of !(%year % 4).

you can mute someone for a whole year?
holy stuff lol

you can mute someone for a whole year?
holy stuff lol
Technically it seems you can mute for upwards of 4000 years, since there's a maximum integer value of over 2 billion.

But at that point you might as well permamute