Exemplo n.º 1
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                Player player1, player2, player3, player4, player5, player6, player7, player8, player9, player10, player11;
                player1 = new Player( "Player01", "Player 01" ) { Skill = 200 };
                player2 = new Player( "Player02", "Player 02" ) { Skill = 50 };
                player3 = new Player( "Player03", "Player 03" ) { Skill = 200 };
                player4 = new Player( "Player04", "Player 04" ) { Skill = 75 };
                player5 = new Player( "Player05", "Player 05" ) { Skill = 115 };
                player6 = new Player( "Player06", "Player 06" ) { Skill = 98 };
                player7 = new Player( "Player07", "Player 07" ) { Skill = 215 };
                player8 = new Player( "Player08", "Player 08" ) { Skill = 75 };
                player9 = new Player( "Player09", "Player 09" ) { Skill = 125 };
                player10 = new Player( "Player10", "Player 10" ) { Skill = 185 };
                player11 = new Player( "Player11", "Player 11" ) { Skill = 25 };

                CurrentPug.AddPlayer( player1, PlayerClass.Medic );
                CurrentPug.AddPlayer( player2, PlayerClass.Medic );
                CurrentPug.AddPlayer( player3, PlayerClass.Demo );
                CurrentPug.AddPlayer( player4, PlayerClass.Demo );
                CurrentPug.AddPlayer( player5, PlayerClass.Scout );
                CurrentPug.AddPlayer( player6, PlayerClass.Scout );
                CurrentPug.AddPlayer( player7, PlayerClass.Scout );
                CurrentPug.AddPlayer( player8, PlayerClass.Scout );
                CurrentPug.AddPlayer( player9, PlayerClass.Soldier );
                CurrentPug.AddPlayer( player10, PlayerClass.Soldier );
                CurrentPug.AddPlayer( player11, PlayerClass.Soldier );
                return true;
            }

            return false;
        }
Exemplo n.º 2
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (Scout.IsMatch( command ))
            {
                CurrentPug.AddPlayer( player, PlayerClass.Scout );
                return true;
            }

            if (Soldier.IsMatch( command ))
            {
                CurrentPug.AddPlayer( player, PlayerClass.Soldier );
                return true;
            }

            if (Demo.IsMatch( command ))
            {
                CurrentPug.AddPlayer( player, PlayerClass.Demo );
                return true;
            }

            if (Medic.IsMatch( command ))
            {
                CurrentPug.AddPlayer( player, PlayerClass.Medic );
                return true;
            }

            return false;
        }
Exemplo n.º 3
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                string playerSkill = null;

                foreach (PlayerClass currentClass in CurrentPug.Players.Keys)
                {
                    foreach (Player currentPlayer in CurrentPug.Players[currentClass])
                    {
                        playerSkill += String.Format( ", {0} ({1})", currentPlayer.Name, currentPlayer.Skill );
                    }
                }
                if (!String.IsNullOrEmpty( playerSkill ))
                {
                    IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, playerSkill.Substring( 2 ) );
                }
                else
                {
                    IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, @"No players are added" );
                }
                return true;
            }

            return false;
        }
Exemplo n.º 4
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                IrcBot.Topic = command.Substring( 6 );
                return true;
            }

            return false;
        }
Exemplo n.º 5
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, @"The next PUG will be played on " + IrcBot.Servers.Peek().FriendlyName );
                return true;
            }

            return false;
        }
Exemplo n.º 6
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                CurrentPug.RemovePlayer( player );
                return true;
            }

            return false;
        }
Exemplo n.º 7
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, @"For information about the PUG process visit: http://tf2pug.us/" );
                return true;
            }

            return false;
        }
Exemplo n.º 8
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                IrcBot.IrcClient.SendMessage( Meebey.SmartIrc4net.SendType.Message, IrcBot.Channel, @"Mumble info here." );
                return true;
            }

            return false;
        }
Exemplo n.º 9
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                IrcBot.IrcClient.RfcQuit( "Good Day!" );

                return true;
            }

            return false;
        }
Exemplo n.º 10
0
        /// <summary>
        /// Attempts to process the given command.
        /// </summary>
        /// <param name="command"></param>
        /// <param name="player"></param>
        /// <returns>True if the command was applicable to this class; otherwise, false.</returns>
        public virtual bool ProcessCommand( string command, IrcPlayer player )
        {
            if (!Command.IsMatch(command))
                return false;

            if (player.UserLevel < UserLevel)
            {
                player.Kick( @"You lack the necessary access to execute that command." );
                return false;
            }

            return true;
        }
Exemplo n.º 11
0
        public override bool ProcessCommand( string command, IrcPlayer player )
        {
            if (base.ProcessCommand( command, player ))
            {
                foreach (Server currentServer in IrcBot.Servers)
                {
                    currentServer.RefreshStatus();
                    System.Threading.Thread.Sleep( 500 );
                    if (currentServer.PlayerCount >= 0)
                        IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, String.Format( "{0} player(s) on {1}.", currentServer.PlayerCount, currentServer.FriendlyName ) );
                    else
                        IrcBot.IrcClient.SendMessage( SendType.Message, IrcBot.Channel, String.Format( "{0} is unreachable.", currentServer.FriendlyName ) );
                }

                return true;
            }

            return false;
        }