/                                                                              \
          [ FCon ]                                               v1.0.0
          Server actor for UT99
          
          By Ferry Timmers, June 2011
          
          External console for Unreal Tournament servers.
>------------------------------------------------------------------------------<

     [ Introduction ]
          
          This server actor allows server administrators to log in with a
          terminal client (fi. telnet) to access the console. FCon is
          designed to mimic the console as it is in-game but with some
          additional features. It also has a mode especially for scripts
          wanting to interact with the server, in this mode the return
          messages are formatted and the prompt is hidden.

     [ Installation ]
          
          Copy the .int and .u file to the System folder.
          Edit the server ini (UnrealTournament.ini):
          
[Engine.GameEngine]
...
ServerActors=FCon.FCon
...
          
          Add to the end of the config file: (optional)
          
[FCon.FCon]
ListenPort=7787
MaxConnections=2
bEnabled=True
bLocal=True
bAutoAdmin=True
bScripted=False
          
          Restart the server afterwards.
          You should see 'FCon: listening to port XYZ.' in the logs.

     [ Configuration ]
          
          ListenPort
            FCon will listen for connections on this port
          
          MaxConnections
            FCon will stop accepting new connections after this
            number of connections.
          
          bEnabled
            Set this to false to completely disable FCon.
          
          bLocal
            When set true it will only accept local connections (127.0.0.1).
          
          bAutoAdmin
            The console users will automatically have admin abilities.
            (use adminlogin otherwise)
          
          bScripted
            When true all connections will start out in script-mode.

>------------------------------------------------------------------------------<

     [ Usage ]

          FCon is self documented, to receive help simply type 'help'.
          Press enter to execute the command.
          You can use semicolons between commands to execute them
          right after each other.

          Put a table above Alarik
               > as Alarik;move 0 0 64;summon table

          Put a colon in front of a command to ignore further semicolons.
         
               > say you suck!;:say ;)

          When the prompt is active press enter with an empty command line
          to disable the prompt. Messages will now appear as they come.
          Press enter on a empty line again to reenable the prompt.
          Messages will be queued and only displayed after you send a
          command.

     [ Special commands ]

          Special commands will change the way FCon operates.
          They start with a symbol and need to be on a new line.

          Message filter:               ?[mode]
          The messages that the server will send to you can be
          filtered. Control the message filter by sending a
          question mark.
          
          ?0 / ?none
            No messages will be sent.
            (except responses of some commands)
          
          ?1 / ?event
            Only client messages will be sent.
          
          ?2 / ?chat
            Only localized messages are omitted.
          
          ?* / ?all
            All messages will be sent.

          Auto text:                    ![string]
          All commands will be prefixed by this string. The string will
          also appear in the prompt. This function can be useful if you use
          the same command over and over like 'say '. Send a ! to clear the
          auto text.

          Timed command:                *[repetitions] <interval> <command>
          This can be useful if you want to send a certain command after a
          while, or every now and then. When repetition is omitted it will
          go on until stopped. The interval is in seconds. Send a * to stop
          the timer.

          Toggle script-mode:           @
          See the scripting section for more information.
     
     [ Commands ]
     
          FCon tries to mimic the existing command set but some of those
          commands are not useful (fi. walk and fire) and some features are
          missing. Therefor some commands have been removed, others have a
          different behavior and a few new ones have been added. Some of
          the commands need administrator abilities to function, if
          bAutoAdmin is not set in the configuration you need to login the
          usual way. Below is a complete list of all commands available and
          a short description. If you want a more thorough explanation use
          the built in help: 'help <command>'. Also note: all commands are
          case insensitive.
          
          Each connection will also a spectator in game.
          
          New commands:
          Quit / Exit         Close the console connection
          Goto                Move spectator to a location
          Move                Move the spectator around
          As                  Shortcut for goto followed by face
          Face                Rotate the spectator
     A    Timed               Similar behavior to *
     A    Set                 Set actor properties
     A    Get                 Get actor properties
     A    SaveConfig          Save the config of an actor to ini
     A    Give                Give actors something
     A    Kill                Kill actors
     A    List                List actors
     A    Find                Find actors with certain properties
          Help                Give help
          
          Altered commands:
          PlayerList          List useful information of all players
     A    Summon              Spawns a new actor
          
          Existing commands:
     A    Admin               Send an admin command
          Adminlogin          Receive admin abilities
          Adminlogout         Give up admin abilities
     A    CauseEvent          Trigger an event
          Say                 Send a message
          TeamSay             Send a team message
          Mutate              Send a command to the mutator chain
     A    Kick                Kick a player
     A    KickBan             Kick and ban a player
     A    Pause               Pause server
          Name                Change spectator name
          Team                Change spectator team
     A    AddBots             Add a number of bots
     A    KillAll             Use kill instead
     A    KillPawns           Kills all players and bots
          
          Undocumented:
          ViewPLayerNum, Profile, Speech, RestartLevel, LocalTravel,
          SetName, SwitchLevel, SwitchCoopLevel, SetWeaponStay, Slomo,
          SetJumpZ, SetFriction, SetSpeed, SetAirControl, ShowPath,
          RememberSpot
     
     [ Examples ]
     
          Find a bot called Kragoth.
               > find bot.pri.playername Kragoth
          
          Get the score of a player.
               > get Player.pri.score
          
          Get the team scores.
               > get teaminfo.score
          
          Cause a lot of annoyment.
               > give Loque supershockrifle
          
          Change a setting and save it.
               > set fcon.MaxConnections 4;saveconfig fcon
          
          Let a bot form a trail of glowing orbs.
               > * 0.5 as Drimacus;summon translocglow GlowPath
          or better:
               > * 0.1 give Drimacus translocglow GlowPath
          
          Clean up.
               > *
               > kill actor GlowPath
          
          Let every bot form a bot every second and clean up the last one.
               > * 1 kill translocglow GP;give bot translocglow GP

          Cause even more annoyment.
               > give navigationpoint nalirabbit carrot;
               set nalirabbit.physics falling

>------------------------------------------------------------------------------<

     [ Scripting ]

          In scripting mode the prompt will be disabled and each message
          the server sends will be prefixed with a letter. This letter
          indicates what kind of message it is. The commands sent to the
          server remain the same.

          C type message
            Client messages, these are returned when the client
            does an action or a client event ocurred.
            
          T type sender message
            Chat messages.
            
          L instigator other message
            Localized messages, caused by in-game events.
            
          V type sender message
            Voice messages.
            
          M x y z
            The spectator is moved to another location.
            
          R x y z
            The spectator faces a new direction. This uses a unit vector.
            
          S name.key=value,...
            A property has been changed.
            
          G name.key=value,...
            A property has been queried.
            
          I name
            An actor has been saved to ini.
            
          H item name,name,...
            An item has been handed.
            
          K name,name,...
            An actor has been destroyed.
            
          F name,name,...
            An actor has been found.

>------------------------------------------------------------------------------<

     [ Author notes ]
     
          Some of the commands can be quite heavy and repeated operations
          can deplete server resources. It goes without saying that the
          external console can just as easy break a server as the in-game
          console so be careful who you give access to it.
         
          If you want to modify this plug-in or port it to another engine
          be my guest.
          If you want to republish an altered version you need to:
            1. State that you've changed it.
            2. Include me as original author.
            3. Add something to the package name.
          
          You are not obligated to anything when using this plug-in.
          
          Have fun!

\                                                                              /