예제 #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);
 }