示例#1
0
        public static bool CanChat(ChatInfo info, bool action)
        {
            if (info.Banned)
            {
                if (action)
                {
                    info.Mobile.SendMessage(info.SystemColor, "You are banned from chat.");
                }

                return(false);
            }

            if (info.PublicDisabled)
            {
                if (action)
                {
                    OptionsGump.SendTo(info.Mobile);
                    info.Mobile.SendMessage(info.SystemColor, "You must first enable public chat.");
                }

                return(false);
            }

            return(true);
        }
示例#2
0
        public static bool CanPm(ChatInfo info, bool action)
        {
            if (info.Banned)
            {
                if (action)
                {
                    info.Mobile.SendMessage(info.SystemColor, "You are banned from chat.");
                }

                return(false);
            }

            if (info.PmDisabled && info.Mobile.AccessLevel == AccessLevel.Player)
            {
                if (action)
                {
                    OptionsGump.SendTo(info.Mobile);
                    info.Mobile.SendMessage(info.SystemColor, "You must first enable private messages.");
                }

                return(false);
            }

            return(true);
        }
示例#3
0
        public static bool CanIRC(Mobile m, bool action)
        {
            ChatInfo info = ChatInfo.GetInfo(m);

            if (info.Banned)
            {
                if (action)
                {
                    m.SendMessage(info.SystemColor, "You are banned from chat.");
                }

                return(false);
            }

            if (!info.IrcOn)
            {
                if (action)
                {
                    OptionsGump.SendTo(info.Mobile);
                    m.SendMessage(info.SystemColor, "You must first turn on IRC.");
                }

                return(false);
            }

            if (!IrcConnection.Connection.Connected)
            {
                if (action)
                {
                    m.SendMessage(info.SystemColor, "The irc connection is down.");
                }

                return(false);
            }

            return(true);
        }
示例#4
0
 private static void OnOptions(CommandEventArgs e)
 {
     OptionsGump.SendTo(e.Mobile);
 }
示例#5
0
 private void Options()
 {
     NewGump();
     OptionsGump.SendTo(Owner);
 }