Giter Club home page Giter Club logo

mchawk's People

Contributors

giantcrocodile avatar vexyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mchawk's Issues

Verify blocks placed

The server currently doesn't know anything about block types and doesn't check if blocks placed by players are valid. Clients could send bogus blocks to the server which will happily broadcast the changes to other clients, potentially causing clients to crash.

Permissions plugin should prune permission list

If a plugin writer decides to change the permission name, players with the previous permission name will still retain that permission, and /revoke won't work because the plugin won't be able to find it. There should be a PermissionsPlugin.Prune() function that searches for unused player permissions and deletes them. It should be called automatically when the Permissions plugin's init() gets called.

Subcommands and /help

Commands should have to register subcommands that have their own parameters. /help should show the appropriate subcommand help listing.

(Thanks Empy for suggestion)

Using @playername

A player should be able to send a private message using the @ symbol. E.g., @playername message should work as a private message to playername.

(Thanks Empy for suggestion)

Notify on player relog

Players should be notified when someone rejoins the game, kicking the inactive "ghost" client, which, without a notification, looks strange. It should say something like "Player rejoined the game" or "Player kicked (Logged in from somewhere else)."

(Thanks Empy for suggestion)

Warp message when teleporting

The server should send a "Player warped to world" message in all cases where the player leaves the world and goes to another world. For instance, the message should be broadcasted when a player uses /teleport from a world that the target player is not in.

(Thanks Empy for pointing this out)

WorldJoin event

There should be a WorldJoin event for plugins to hook onto. This will be useful for a plugin like cuboid that needs to delete cuboid operations when a player leaves the world. Also, this could solve issue #33 since you could write a function that display " warped to " that hooks onto WorldJoinEvent.

Generic protocols

Protocols should be more generic. Keep it all in C++ (could be done in Lua, but no reason to do so). Protocol base class/interface? It should at least register itself with the server and worlds can check if a given protocol is available and do whatever it wants based on that. E.g., worlds could choose whether to use CPE or not and players could create entirely classic worlds (no CPE).

Example idea:

class IProtocol {
    virtual bool IsValidBlock(int type) = 0;
    virtual GetName() = 0;
};

...

class CPE : public IProtocol
{
    // implement the above virtual functions
    /// ...
}

CPE::CPE()
{
    Server::GetInstance()->RegisterProtocol("CPE", this);
}

/* ...
 * Server/World use the above for whatever
*/

Log verbosity and color

The log system should be less verbose with date/time. It should say the date only when the server first starts and on new days. After that, it should only state the time for each entry. Also, optional colors would be nice for the log type (info/warning/error).

Notify clients on switching worlds

Clients should be notified when a player joins another world.

E.g., /goto freebuild should show something like "Vexyl warped to freebuild" to all other players connected.

(Thanks Empy for suggestion)

Bedrock placement

Bedrock shouldn't be placable or breakable. Make sure commands respect this as well (e.g., /cuboid)

(Thanks turtleclub for pointing this out)

/help command categories

There should be categories for commands in the /help and /commands listings.

(Thanks Empy for suggestion)

Use cmake

Use cmake to generate makefile for Linux and VS2017 project files for Windows.

Plugin dependencies

Plugins should be able to specify which Lua library it requires. If a dependency is missing, it should either output an error or automatically download it with a Lua package manager such as LuaRocks.

(Thanks Xerolyph for suggestion)

World name autocompletion

Commands taking world names should have name autocompletion just like player names. This should be implemented in a Server::GetWorldByName() function.

(Thanks Empy for suggestion)

Saving new worlds

Saving newly created worlds using /world new only saves the raw map data (to the wrong directory). It needs to write a .ini file with the correct settings to the worlds directory and the map data to worlds/maps directory.

Plugin tick frequency

There should be a timer to limit how often plugins can update. If the plugin has a tick function it should only be called every n milliseconds.

Project won't build with latest Visual Studio 2017 because of outdated Lua library

The Lua library (.lua) is outdated. The current Visual Studio 2017 version won't compile the project with this lua library because it has been built with an older version of the C++ compiler. For someone with the same problem:

You have to download the latest lua binary from the official site, copy it to the corresponding paths of the C++ project directory and then adjust the Visual Studio project file to point to the right files and directories.

For the future, we have to find a way to make it better. It's not feasible to update the dependency by hand all time nor is self compiling it a good idea.

Before this issue, we also had issues with C includes. These includes has been replaced by their C++ equivalents. (see commit 92e00df)

Also the project specified Windows SDK version didn't fit.

Permission groups

There should be some kind of permission group in the Permissions plugin. It should basically be a list of permissions with a name. This will make it easy to add a ranks plugin later.

Per-command cooldown delay

There should be a cooldown option for commands. For example, the /billnye command can be used to spam the chat, so a SetCooldown(30) for a 30second delay inbetween calls would help a lot.

(Thanks turtleclub for suggestion)

Automute plugin

There should be an automute plugin for chat. It should automatically mute a player some default n seconds. It could work by hooking onto ClassicProtocol.MessageEvent how many messages are being sent per second. If it's enough to be regarded as spam, automute the player.

(Thanks Cecil for suggestion)

Add missing ops.txt and plugin directory to repository

The ops.txt and plugin directory should be added to the repository and the server should create them if they don't exist - rather than error about them in the console/log.

  • add both to the repository
  • create them if they don't exist
  • same for groups.txt

Granting/Revoking multiple permissions

The permission plugin should be able to accept a space or comma separated string of permissions in any case where a single permission would be accepted.

Corrupted worlds

Every so often a world create and saved with /world is corrupted, turning into a 0-byte map file. The config file is not affected. This does not happen to default/freebuild.

Console input

Server operators should be able to type commands into the console shell window. The server should have some kind of concept of a console user. Use a cross-platform library such as Readline if necessary. Since it would be nice to have command history and cursor movement, do not use raw std::cin or std::getline.

(Thanks Xerolyph for suggestion)

Logger accessibility and color

Lua plugins should be able to access the logger and have logger show source file name and line (even in Lua plugins).

The logger should also be able to use colors easily. There should be some convenient way to specify log colors that the logger translates to the platform's correct console color.

Subcommands

Commands should be able to register subcommands. The command handler or the command itself should go through each argument and check if it's a subcommand of that command. It should recursively do this for subcommands as they themselves may have subcommands.

Command idea /voice

There should be a command to set which channel you're currently chatting in. For example, /voice <global/local/playername> would set it to the global, local, or player private message channel respectively.

(Thanks Empy for suggestion)

Who command show aliases

The who command currently only displays the player list. If a player provides the who command with an argument, have it do a reverse lookup on aliases to find player.

Muli-threaded

The server should be multi-threaded, preferably using C++11 threads. Make sure it's portable. If necessary, use SFML threads since we link to it anyway (even though that library's functionality the server uses should eventually be replaced by custom implementations, see issue #6 )

Add /main command

There should be a /main command that sends the player to default world.

(Thanks ChrisKerman999 for suggestion)

Remove SFML dependency

SFML is currently being used mostly for it's network capabilities (sfml-network). The server also uses it for timers with sf::Clock and for sending the heartbeat request. SFML does the job very well and has a clean API but it's an additional dependency that's not really needed, so I'd like to replace it with custom implementations.

More specifically, I want TCPSocket/TCPServer classes that take care of buffering data, listening for connections, sending/receiving data, and setting socket options. Also, we'll need a Timer class that has at least the following member functions: Start(), Pause(), Reset(), and GetTimeAsMilliseconds().

Clients crash when sent 0-byte worlds

If a map is 0-bytes and the server attempts to send it to a client, the level data chunk packet will not be sent. The client will receive the level init packet and level end packet, crashing clients such as ClassicalSharp.

(Thanks UnknownShadow200 for pointing this out)

Get it to work on Windows

Need to compile libraries used by server for Windows and make a VS2017 project, fixing any platform errors that arise. Better yet, use cmake to generate the project files.

Smart pointers and const correctness

Refactor code to use smart pointers and to be const-correct. I've already ran into a lot of issues using raw pointers. Const-correct code is less error prone and looks cleaner.

Autocomplete world name

Using /goto or any other world lookup command should autocomplete world names (like how player names work in commands; see Server::GetClientByName())

(Thanks Empy for suggestion)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.