1. Dont remove it from the file manually, use the chat or console commands.
     
  2. i did that, but the next day he was muted again, so i removed manually
     
  3. Did he maybe get auto muted after you unmuted him so he was again muted when you checked the 2nd time?
     
  4. yes he did get auto muted
     
  5. Can someone help me??

    I want to make like 3 different groups and colors in chat. Like normaluser, moderator and admin. Now do I just have to add moderator but i cant make it work. I've already added this to the .lua :
    Code:
    if IsModerator(player) then
            color = self.Config.Settings.NameColor.Moderator
        end
    And also in the .json added the following line:
    "Moderator": "01B124"

    But i got the following message in Rusty:
    Code:
    [Oxide] 2:53 PM [Error] Failed to call hook 'OnPlayerChat' on plugin 'Chat Handler'
    File: chathandler.lua Line: 220 attempt to call global 'IsModerator' (a nil value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:
    Can someone please help?
     
  6. Wulf

    Wulf Community Admin

    Your "IsModerator" function is going to have to have a bit more to it, as right now it doesn't actually check anything. I'd recommend posting the full code.
     
  7. Code:
    -- broadcasts chat messages
    -- --------------------------------
    function PLUGIN:BroadcastChat(player, name, msg)
        local steamID = rust.UserIDFromPlayer(player)
        local color = self.Config.Settings.NameColor.NormalUser
        if IsModerator(player) then
            color = self.Config.Settings.NameColor.Moderator
        end
        if IsAdmin(player) then
            color = self.Config.Settings.NameColor.Admin
        end
        if AdminMode[steamID] then
            color = self.Config.Settings.NameColor.AdminMode
            global.ConsoleSystem.Broadcast("chat.add", 0, "<color="..color..">"..name.."</color> "..msg)
        else
            global.ConsoleSystem.Broadcast("chat.add", steamID, "<color="..color..">"..player.displayName.."</color> "..msg)
        end
    end
     
  8. Im thinking about adding a groups feature with customizable colors and prefixes like chat handler had in its legacy version but i havent finally decided yet.
    If you want to do something like this yourself there is a bit more to do than just adding 3 lines of code.
     
  9. Is there a way that it is possible for now, or do you have to add it?
     
  10. Wulf

    Wulf Community Admin

    You still need to make the IsModerator function.
     
  11. How can i do this? I can read a little bit codes like this, but not as good as u propably can :)
     
  12. Code:
    local function IsModerator(player)
        return player:GetComponent("BaseNetworkable").net.connection.authLevel == 1
    end
    and change the IsAdmin function to
    Code:
    local function IsAdmin(player)
        return player:GetComponent("BaseNetworkable").net.connection.authLevel == 2
    end
     
    Last edited by a moderator: Mar 11, 2015
  13. Hey I'm having an issue that I can't figure out. I'm currently using Chat Handler and I've set the color for admins and moderators using the html color code and it works but my name is green while admins etc is red. Anyone know what the issue could be?

    Thanks!
     
  14. I changed that, but now, everyone gets the colour of the moderator :\ Do you have a solution for me?
     
  15. Post your config please.
     
  16. Code:
    {
      "WordFilter": {
        "nigger": "****",
        "cunt": "twat"
      },
      "Settings": {
        "Wordfilter": {
          "ReplaceFullWord": "true",
          "EnableWordfilter": "false"
        },
        "NameColor": {
          "Admin": "#FA5858",
          "AdminMode": "#FA5858",
          "NormalUser": "#5af"
        },
        "AdminMode": {
          "ReplaceChatName": "false",
          "AdminChatName": "[Server Admin]"
        },
        "AntiSpam": {
          "EnableAntiSpam": "true",
          "TimeFrame": 6,
          "MaxLines": 4
        },
        "Logging": {
          "LogToFile": "false",
          "LogToConsole": "true",
          "LogBlockedMessages": "true"
        },
        "General": {
          "BlockServerAds": "true",
          "Language": "en",
          "AllowedIPsToPost": [],
          "EnableChatHistory": "true",
          "ChatHistoryMaxLines": 10,
          "BroadcastMutes": "true"
        },
        "ChatCommands": {
          "Wordfilter": [
            "wordfilter"
          ],
          "ChatHistory": [
            "history",
            "h"
          ],
          "Mute": [
            "mute"
          ],
          "Unmute": [
            "unmute"
          ],
          "AdminMode": [
            "admin"
          ],
          "GlobalMute": [
            "globalmute"
          ]
        }
      }
    }
     
  17. According to this config all your regular users should have the color #5af which is blue, all your admins and moderators (auth level 1 and 2) have the color #fa5858 which is red.
    So what exactly isnt working as you expected?
     
  18. All my admins and moderators are red like they should be but Im green for some reason. shouldnt I be red as im auth level 2
     
  19. Are you using any other chat related plugins?
     
  20. I have notifier and RotAG-Groups