Admin Leave and Join

Displays a chat message when a admin leaves or joins to all the players

Total Downloads: 1,250 - First Release: Jul 25, 2016 - Last Update: Oct 29, 2016

5/5, 3 likes
  1. Austinv900 submitted a new resource:

    Admin Leave and Join - Displays a chat message when a admin leaves or joins to all the players

    Read more about this resource...
     
  2. So if I can post a stupid question, it haves permission system, thats great and what I wanted, but I want to ask if it will only show up in chat if I have permission, or If I am just authlevel2 (RUST admins system) basicaly I want to give it only to moderators (authlevel1) but I dont want it on me as a owner/admin (authlevel2).
     
  3. I have a couple updates I need to post. But it should be permission based and auth based if I remember correctly
     
  4. darn, can you do in config like use permissions true false and use authlevel tru/false (for rust) ? :)
     
  5. What if I changed it so the group you have the option to choose to just use permission and not the whole admin group in general

    Right now it should work like this
    ----------------------------------------------------------------------
    If you have perm (and/or) Have oxide group "admin"

    Announce Login/Logoff
     
  6. Austinv900 updated Admin Leave and Join with a new update entry:

    0.0.2

     
  7. Well the problem is I dont want to have involved groups or so, I want it clearly based on permission, nothing else :) no group count in, no authlevel count it, just the glory oxide permission system :) So I can really maximaly configure what I want to give or not ;)
     
  8. Okay, I'll make the group setting toggle
     
  9. Austinv900 updated Admin Leave and Join with a new update entry:

    0.0.3

     
  10. Nice plugin
     
  11. Thanx alot, love it and its awesome ;) Thanx again to hear my request :D

    BTW Pokeball logo ? PokemonGO Hype I see, reminds me like those 15-20 years back when it was live in TV what that Hype was - I was collecting pictures of those that were in bublegums :D
     
  12. =D BTW I havent tested the config toggle let me know if it works the way you need it too
     
  13. Great plugins guy :) Instant upload :p but i can use a messagejoin for group admin and an others message for group moderator ? and maybe again an others message for an others group ?


    Pokemon is better than Rust, you want say it ?!!!!!!! :mad: :p
     
  14. Ill work on something for a moderator message. A temporary fix would be change the prefix inside your config so it says like "StaffJoin" or something
     
  15. I have made a ModeratorLeaveJoin moment, i upload it
    [DOUBLEPOST=1469482663][/DOUBLEPOST]There is the code


    Code:
    using System;
    using System.Collections.Generic;
    using Oxide.Core.Libraries.Covalence;
    using Oxide.Core.Plugins;namespace Oxide.Plugins
    {
        [Info("ModLeaveJoin", "austinv900 (modified by Fablitos)", "0.0.3", ResourceId = 2032)]
        [Description("Custom Join and Leave Message when moderator leave and join")]    class ModLeaveJoin : CovalencePlugin
        {    #region Initialization
        const string perm = "modleavejoin.allowed";        void Init()
            {
                LoadDefaultConfig();
                LoadDefaultMessages();
                permission.RegisterPermission(perm, this);
            }
            #endregion        #region Configuration        bool showJoin;
            bool showLeave;
            string msgPrefix;
            bool isAdminSupport;        protected override void LoadDefaultConfig()
            {
                Config["ShowJoinMessage"] = showJoin = GetConfig("ShowJoinMessage", true);
                Config["ShowLeaveMessage"] = showLeave = GetConfig("ShowLeaveMessage", true);
                Config["MessagePrefix"] = msgPrefix = GetConfig("MessagePrefix", "AdminJoin");
                Config["AdminGroupSupport"] = isAdminSupport = GetConfig("AdminGroupSupport", true);
                SaveConfig();
            }
            #endregion        #region Localization        void LoadDefaultMessages()
            {
                lang.RegisterMessages(new Dictionary<string, string>
                {
                    ["Online"] = "<color=#a100ab>{0}</color> has come <color=#00c30d>{1}</color>",
                    ["Offline"] = "<color=#a100ab>{0}</color> has just went <color=#C90000>{1}</color>",
                    ["Connected"] = "<color=#00c30d>Online</color>",
                    ["Disconnected"] = "<color=#C90000>Offline</color>"
                }, this, "en");            lang.RegisterMessages(new Dictionary<string, string>
                {
                    ["Online"] = "<color=#a100ab>{0}</color> se ha <color=#00c30d>{1}</color>",
                    ["Offline"] = "<color=#a100ab>{0}</color> Se acaba de <color=#C90000>{1}</color>",
                    ["Connected"] = "<color=#00c30d>conectado</color>",
                    ["Disconnected"] = "<color=#C90000>Desconectado</color>"
                }, this, "es");
            }        #endregion        #region Main Hooks        void OnUserConnected(IPlayer player)
            {
                if (!showJoin) return;
                if (HasPermission(player.Id, perm))
                {
                    aljAnnounce("Online", "Connected", player.Name);
                }
            }        void OnUserDisconnected(IPlayer player)
            {
                if (!showLeave) return;
                if (HasPermission(player.Id, perm))
                {
                    aljAnnounce("Offline", "Disconnected", player.Name);
                }
            }        #endregion        #region Grunt Work
            void aljAnnounce(string status, string status2, string adminjoin)
            {
                foreach (var player in players.GetAllOnlinePlayers())
                {
                        player.Reply("[<color=#C90000>" + msgPrefix + "</color>] : " + Lang(status, player.BasePlayer.Id, adminjoin , Lang(status2, player.BasePlayer.Id)));
                }
            }
            #endregion
            #region Helpers
            T GetConfig<T>(string name, T defaultValue)
            {
                if (Config[name] == null) return defaultValue;
                return (T)Convert.ChangeType(Config[name], typeof(T));
            }        bool HasPermission(string id, string perm) => permission.UserHasPermission(id, perm);        string Lang(string key, string id = null, params object[] args) => string.Format(lang.GetMessage(key, this, id), args);
            #endregion
        }
    }
    
    [DOUBLEPOST=1469482762][/DOUBLEPOST]@Cataclysme @Austinv900 I deleted the admin audit, and remove the check of group, if the player has the permission "modleavejoin.allowed" that emits a message
     
  16. Yeah just copy the plugins and change the persmissions and the name of plugins but i need only one plugins with more option, i think @Austinv900 can do it :)
    But thx for this plugins Aunstinv ^^
     
    Last edited by a moderator: Jul 26, 2016
  17. Austinv900 updated Admin Leave and Join with a new update entry:

    0.0.4

     
  18. I think add a command (/ available) to see if an admin is present (if IsAdmin) and give the username admin, or these admins
    No? :)

    (Based on Request - Admin on duty tool | Oxide)
     
  19. I was thinking of this being a rust plugin I forgot its a universal plugin in that case it would be a great idea