GithubHelp home page GithubHelp logo

nolanwhy / msgroom-custom-server Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 367 KB

A custom Windows 96 MsgRoom Server by nolanwhy & Kelbaz

License: Other

JavaScript 53.40% CSS 40.60% HTML 6.00%
css css3 html html5 javascript msgroom socket-io socket-io-client socketio socketio-client w96 windows96

msgroom-custom-server's Introduction

MsgRoom Custom Server

A custom Windows 96 MsgRoom Server

Made by nolanwhy and Kelbaz. Feel free to make pull requests!

How to use

# Step 1: Clone the repository
git clone https://github.com/SigmacellHQ/msgroom-custom-server.git

# Step 2: Go to the folder
cd msgroom-custom-server

# Step 3: Install dependencies
npm install

# Step 4: Run the server
#:           <PORT>   <CLIENT UI>
npm run serve 4096 -- --client

# Step 5: Share with friends (optional)
#:        <PORT>
ngrok http 4096 # (*)

(*): You need an ngrok account, which you can set up here.

Done!

You successfully installed MsgRoom Custom Server!
On the terminal, you should see the Arguments, and the url to visit your custom server.

Thank you for using our custom server! โค

CLI Options

  • --client: Starts the client ui server
  • --db-file <PATH>: Sets the path to the JSON db file
  • --admin-secret <SECRET>: Sets the admin secret
  • --random-ids: Randomizes user ids
  • --api-url <URL>: Sets the api endpoint
  • --require-loginkeys: Requires login keys to connect
  • --enable-automod: Enables the AutoMod bot
  • --ratelimit <limit>: Sets the message rate limit
  • --user-limit <limit>: Sets the user limit (alt accounts)
  • --user-knowblocks: Makes users able to see when they're blocked
  • --enable-channels: Enables channels

How to add bots

This is up to the bot api owner to add, but if its like msgroom-orm, here's how to do it
Your client should look like:

const client = new Client("TestBot", [ "!" ]);

Now, it's really easy, just add a new argument to Client with an object containing the arguments
If you don't understand anything, just do it like this:

//                                                             <DOMAIN>   <PORT>
const client = new Client("TestBot", [ "!" ], { server: "wss://example.com:4096" });

Congrats! ๐ŸŽ‰ Your bot should now work with MRCS!

How to give yourself staff and perform mod actions

  1. Go to .env and edit the ADMIN_SECRET value
  2. Go to /admin and put the admin secret
  3. Follow instructions

Alternative

  1. Go to your db file (db.json by default) and add your ID.
  2. You can execute /a help to get a list of every admin command.
  3. To ban a user, use /a ban or add the user's ID to database/banned.json.
  4. To kick a user, use /a disconnect.

How to give yourself staff, and do mod actions

Go to your db file (db.json by default) and add your key and ID.
Then you can execute /a help to get every admin command.
To ban, use /a ban or put the user's id in database/banned.json
To kick, use /a disconnect.

msgroom-custom-server's People

Contributors

kelbazz avatar nolanwhy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

msgroom-custom-server's Issues

you can ban a person multiple times

The array with bans can have duplicates, making it extremely hard to unban someone.
The workaround is to spam the unban command.
The solution is to remove duplicates from this array when loading it from the JSON file by converting it to a set and then converting it back to an array. You can remove duplicates like this.
I would also recommend just keeping it as a Set in memory so you can use its has() method, which is more efficient.
Next, make your ban and unban commands check if a user is already banned or unbanned before trying to ban/unban.
And please also make the admin-action handler tell the user if they are not an admin before doing anything else and return right away.

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.