Comments (5)
Why shouldn't an admin be able to run those commands from within the MUD?
from ranviermud.
In theory they could but the MVP is that they only run them from the server. Having them run the commands through the mud (specifically shutdown/restart) would require extra code to reattach sockets through the actual process shutting down which I haven't taken the time to look into yet
from ranviermud.
Following up on my pullrequest (#90) I was thinking this would be some good next steps. Let me know what you think:
- Add flag to Server.js that serverOperation checks to make sure other operations aren't already in-flight.
- Add option to server shutdown to shutdown and process.exit()
- Store server operation timeouts as variables so you can call clearTimeout on them if you want to, maybe allowing for a "Cancel" server command?
- Separate out console input into its own class that extends EventEmitter and emits to the 'data' event (in the same way the Telnet Class does)
- Add arg to data event emitted to in Telnet and the new Console class that specifies where the command is coming from
- Add logic to command parser to separate server console commands from telnet commands to ensure players cant send server commands.
- Add command script for server commands to /bundles/core-commands/commands/ to be consistent with other commands
Notes on things I don't like about my checkin but don't have solution to yet:
- Countdown counter for player warn is a global variable
- BroadcastAt method for each player called via players.foreach, should we modify .players getter to include a method for players.broadcast that broadcasts to all players?
- Server.js instance is a scoped variable. Need to be able to access with state in tact from other modules. Possibly move Server variables outside class and make them globals, then make server methods static? I'm still relatively new to node so I'm not sure on the best design pattern to use here.
from ranviermud.
BroadcastAt method for each player called via players.foreach
This bit
this.GameState.PlayerManager.players.forEach(p => Broadcast.sayAt(p, `${warningStr} ${global.countdown/ 1000} SECONDS`));
Should be
Broadcast.sayAt(this.GameState.PlayerManager, `${warningStr} ${global.countdown/1000} SECONDS`);
PlayerManager
is a Broadcastable
so it can just be passed in as a target to sayAt()
, likewise with Area
and Room
Server.js instance is a scoped variable. Need to be able to access with state in tact from other modules.
this.GameState = { server: this, ... }
should work just fine
from ranviermud.
The main ./ranvier
executable no longer has any commands, this can be implemented in bundle-land with server events
from ranviermud.
Related Issues (20)
- Rudimentary way to specify other required bundles
- When attempting to lower a positive attribute (e.g. from 5 to 3), Math.min forces it to 0 instead HOT 2
- Question: Integration into existing system HOT 4
- Computed Attributes RFC HOT 9
- NPC properties and inheritance HOT 2
- Scriptable Areas RFC HOT 2
- 3.x TODO List
- Player Character Duplication HOT 1
- Equipment Slot Manager HOT 10
- 3.0 - Help Files (YAML Directories) Not Loading After Data Handling Merge HOT 2
- Comment incorrectly suggests that a tick is "every half second" HOT 4
- NPC Metadata is shared amongst instances of the same NPC HOT 7
- Command Lag
- slack invitation has expired HOT 1
- Last line character cut off using netcat - is this some \n vs \r\n issue? HOT 1
- npm start includes options that aren't supported in the current ranvier script
- How to localize exit names HOT 6
- How to create a dungeon? HOT 1
- find module 'ranvier-telnet' HOT 1
- impossible git clone and install bundle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ranviermud.