EventArgs used for the PlayerHooks.PlayerPreLogin event.
Inheritance: System.ComponentModel.HandledEventArgs
Ejemplo n.º 1
0
        /// <summary>
        /// Fires the <see cref="PlayerPreLogin"/> event.
        /// </summary>
        /// <param name="ply">The player firing the event.</param>
        /// <param name="name">The user name.</param>
        /// <param name="pass">The password.</param>
        /// <returns>True if the event has been handled.</returns>
        public static bool OnPlayerPreLogin(TSPlayer ply, string name, string pass)
        {
            if (PlayerPreLogin == null)
            {
                return(false);
            }

            var args = new PlayerPreLoginEventArgs {
                Player = ply, LoginName = name, Password = pass
            };

            PlayerPreLogin(args);
            return(args.Handled);
        }
Ejemplo n.º 2
0
        public static bool OnPlayerPreLogin(TSPlayer ply, string name, string pass)
        {
            if (PlayerPreLogin == null)
                return false;

            var args = new PlayerPreLoginEventArgs {Player = ply, LoginName = name, Password = pass};
            PlayerPreLogin(args);
            return args.Handled;
        }