Coder Social home page Coder Social logo

fantoms / ace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acemulator/ace

0.0 0.0 0.0 5.25 MB

Asheron's Call server emulator.

Home Page: http://acemulator.org

License: GNU General Public License v3.0

C# 87.60% PLpgSQL 3.07% Batchfile 0.08% HTML 0.66% CSS 0.02% ASP 0.01% JavaScript 8.56%

ace's People

Contributors

chrisaikman avatar ddevec avatar delasteve avatar dworkin avatar fantoms avatar forbiddenz avatar immortalbob avatar jyard1 avatar kaos00723 avatar kochiroofhg avatar lidefeath avatar ltripley36706 avatar lurker-mcdoogle avatar lytelthorpethistledown avatar mag-nus avatar miachoftd avatar mogwai-thefurry avatar ogmage78 avatar optimshi avatar rawaho avatar rtmruczek avatar scottaday avatar slushnas avatar thementor avatar tigrisofgaul avatar verbal-ac avatar yazgoo avatar zbuc avatar zegeger avatar ziang4891 avatar

Watchers

 avatar  avatar

ace's Issues

Please help discuss: @ban requirements.

To Support the @ban command:

Would we want to add a new table too support @ban or should we add columns to the existing account table?

Examples of items to store in the database are variables like (bannedLength or BannedDateTime?), bannedOndate, bannedDescription, adminResponsible, etc?

Please help discuss: Group Chat Channels

In order to support the @boot and other administrative commands from appearing on the server audit chat channel, group chat channels need to be expanded out to support the client functionality. There currently is only 5 chat channels in use, Local is currently Global, General, Trade, LFG, and Roleplay.

Here are the currently assumed Chat Channel Typeschannels:

1. Local
2. General
3. Trade
4. LFG
5. Roleplay
6. Fellowship
7. Vassals
8. Monarch
9. Patron
10. Co-vassals
11. Allegiance
12. FellowBroadcast
13. Eldrytch Web
14. Celestial Hand
15. Radiant Blood
16. Olthoi
17. Admin
18. Audit
19. Abuse
20. Advocate 2
21. Advocate 1
22. Advocate 3
23. Sentinel
24. Help

Each of the chat channels must hook into the bitmask and check permissions on the flags that reside in the character PropertyInt for ChannelsAllowed and ChannelsActive.

Excluding Local, LFG, Trade, and General, Permissions for each of the other chat channels depends on either the current access-level of the character or the rank within a group.

All chat channels have their own chat commands to allow players to chat independently, example:

/lfg <lfg group chat text>
/ad <admin chat text>
/v <vassal directed chat text>

List of commands to follow, when found.

Please help discuss: Server shutdown

I've been tooling a few snippets of c# code that address a few unknown issues. I say unknown due to the lack of experience with some of the following technical questions (that may or may not need to be asked) and the limited documentation available. The questions or solutions to ideas presented below, are also exacerbated by my wondrous imagination - so please help me filter it:

I have created pull request with Ripley that provides a ServerManager object that will handle unloading the application in the "safest" way we can imagine.

The major reason for this pull request, is too attempt at preventing data loss when turning off the server properly. The best way to describe this idea is to tell you the history of it's inception.

During testing of the ACE server application on Linux, there was no way to close the server without pressing ctrl+c, so I needed a way to shutdown gracefully. I first started with just a shutdown command for the console that just exited the application, which seemed insufficient when I was saving data to the database.

Next, I quickly added other control logic that eventually migrated into the WorldManager object. Code in the worldmanager was also sufficient, but I felt that I had added to much code to that specific object, especially when I then noticed that in the future, other objects would need to be turned off properly as well.

Right now I am worried that since Landblocks have their own threading, we must be waiting for all threads too finish execution if want also assume that data will be saved.

To accompany the features of shutting down, the PR I've already created includes the following commands:

Stop the server after the interval set in the Config has Passed:
@stop-server <shutdown text>
Stop the Server immediately:
@stop-now
Cancel an in progress shutdown:
@cancel-shutdown
Change the seconds to wait until shutdown:
@change-shutdown-interval <00000-99999>

There is also a config change that adds an additional Configuration json variable called ShutdownInterval that needs to be set to seconds. The maximum seconds allowed is 99999.

When a shutdown has been initiated, the server will provide feedback too alert the players when the servers will be ending operation, IE: Server will shutdown in X seconds, initiated by Admin +Ash @ DateTime. If you include text after the @stop-server command, then the server message will also include the text as a shutdown message "Message from +Ash: Shutting down for Sunday maintenance.".

Feel free to propose a better name then ServerManager, I understand it's a big hammer.

As a conceptual outlook, I see that this feature-set may later be expanded on too also provide monitoring for other Managers:

  1. ServerManager could be used as a controller object to watch that WorldManager has unloaded the players properly, and that the DatabaseManager saves the Landblock Changes to the database at the correct time, after the LandblockManger has finishing save process.
  2. Start each Manager Object, instead of the main loop in ACE.cs.
  3. Restart a world or Pause a server.
  4. Provide a mechanism that will ensure the Managers have all properly stopped.
  5. Change the log4net mechanisms and output.
  6. House the log4net logging object:

private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); is currently in everything that needs to be logged. Without testing performance issues, would a publicly accessible log method in the ServerManager: like maybe "ServerManager.Log(LogName,Log.Level)", too cut down on code and confusion?

  1. Manage the Console Window output, title, and reporting.
  2. Monitor latency to the Database server.
  3. Monitor the ability for the database object to reach the database server, on disconnect it could pause the world until the connection has restored or switch to a backup db server.

I know I am getting ahead of myself by 8 miles with this paragrah, but my development plan to support live testing:

Visual Studio Build-> ssh contents to server-> ssh open screen/tmux/socket and send "@stop-server new development build released, restarting with new build in 5 minutes"-> users get alert of server shutdown-> logs off safely when the server shuts down safely -> a script that is watching if the server crashes will do database migrations for backup-> restart with the latest build -> users can start testing latest changes

Here is the log (now-outdated by a re-base):

  • Added server shutdown command for admins - will be needed in consoles.
  • Added shutdown text, logoff, admin shutdown message
  • Added ShutdownInterval to the ConfigManager Server Section
  • Added ChangeShutdownInterval command, Fixed seconds on shutdown
  • Added @stop-server, @stop-now, @cancel-shutdown
  • Moved Shutdown to a thread in worldmanager
  • Fixed code style and upstream merge
  • Added ShutdownInterval to the example config
  • Added more comments and moved the shutdownInterval to a private accessor to tell the console when it changes
  • Added log4net and moved exit to ServerManager

Please help discuss: Starter Town position storage for Character in the database

Writing a task now to save the player's starter position to the database that was selected during character generation, stored in the PositionType.Undef (0).

This will require a new function that accepts 0 as a position type.

After this change, I want to also implement another change on the character loading function that searches for the position 0 when Location type (1) is missing. This will let me stop using the LastPortal PositionType as the fallback, when Location is missing.

Secondary task: an admin command is necessary to wipe a character's Location (1) position type.

This will allow for resetting broken characters and sending them back to the starting town - if Position type Undef (0), is set.

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.