Skip to content

Commit

Permalink
Renaming and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys64 committed Sep 3, 2019
1 parent d8da323 commit 90c8f0c
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Tweaked the readme, thanks to @B0RYS and @MastaCoder;
* Fixed mothercell spawning issue;
* Edited the Wiki, thanks to @AlexHGaming, @Steve7914, @Tyler3D, @ItzLevvie, and @MastaCoder;
* Created the MultiOgar-Edited Wiki, thanks to @AlexHGaming;
* Created the MultiOgarII Wiki, thanks to @AlexHGaming;
* Match randomskins.txt to Agar.io's skins, thanks to @ItzLevvie;

-------------
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# MultiOgar-Edited
Multiogar-edited is a FOSS agar.io server implementation that is based upon the [work done](https://github.com/Barbosik/MultiOgar) by [Barbosik](https://github.com/Barbosik/).
# MultiOgarII
MultiOgarII is a FOSS agar.io server implementation that is based upon the [work done](https://github.com/Barbosik/MultiOgar) by [Barbosik](https://github.com/Barbosik/).

# Usage
Before the server can be used you need to install [NodeJS](https://nodejs.org/en/) onto your machine. Instructions for which are available on the NodeJS website linked above.

## Running
The server can be ran by executing the following commands in a `Linux` terminal or a `Windows Command Prompt`. This is assuming that you're in the `root` of the project directory.
```BASH
$ cd src
$ node index.js
```
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "MultiOgar-Edited",
"name": "MultiOgarII",
"version": "1.6.2",
"description": "Open source multi-protocol Ogar server",
"author": "Megabyte918 (https://github.com/Megabyte918)",
"homepage": "https://github.com/Megabyte918/MultiOgar-Edited",
"homepage": "https://github.com/Megabyte918/MultiOgarII",
"license": "Apache-2.0",
"main": "src/index.js",
"dependencies": {
Expand All @@ -15,9 +15,9 @@
},
"repository": {
"type": "git",
"url": "https://github.com/Megabyte918/MultiOgar-Edited"
"url": "https://github.com/Megabyte918/MultiOgarII"
},
"bugs": {
"url": "https://github.com/Megabyte918/MultiOgar-Edited/issues"
"url": "https://github.com/Megabyte918/MultiOgarII/issues"
}
}
4 changes: 2 additions & 2 deletions src/PacketHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class PacketHandler {
this.protocol = protocol;
// Send handshake response
this.sendPacket(new Packet.ClearAll());
this.sendPacket(new Packet.SetBorder(this.socket.playerTracker, this.server.border, this.server.config.serverGamemode, "MultiOgar-Edited " + this.server.version));
this.sendPacket(new Packet.SetBorder(this.socket.playerTracker, this.server.border, this.server.config.serverGamemode, "MultiOgarII " + this.server.version));
// Send welcome message
this.server.sendChatMessage(null, this.socket.playerTracker, "MultiOgar-Edited " + this.server.version);
this.server.sendChatMessage(null, this.socket.playerTracker, "MultiOgarII " + this.server.version);
if (this.server.config.serverWelcome1)
this.server.sendChatMessage(null, this.socket.playerTracker, this.server.config.serverWelcome1);
if (this.server.config.serverWelcome2)
Expand Down
8 changes: 4 additions & 4 deletions src/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Server {
Logger.error("Please close out of Skype or change 'serverPort' in the config to a different number.");
break;
case "EACCES":
Logger.error("Please make sure you are running MultiOgar-Edited with root privileges.");
Logger.error("Please make sure you are running MultiOgarII with root privileges.");
break;
}
process.exit(1); // Exits the program
Expand Down Expand Up @@ -1018,12 +1018,12 @@ class Server {
'&spectators=' + spectatePlayers +
'&max_players=' + this.config.serverMaxConnections +
'&sport=' + this.config.serverPort +
'&gamemode=[**] ' + this.mode.name + // we add [**] to indicate that this is MultiOgar-Edited server
'&gamemode=[**] ' + this.mode.name + // we add [**] to indicate that this is MultiOgarII server
'&agario=true' + // protocol version
'&name=Unnamed Server' + // we cannot use it, because other value will be used as dns name
'&opp=' + os.platform() + ' ' + os.arch() + // "win32 x64"
'&uptime=' + process.uptime() + // Number of seconds server has been running
'&version=MultiOgar-Edited ' + this.version +
'&version=MultiOgarII ' + this.version +
'&start_time=' + this.startTime;
trackerRequest({
host: 'ogar.mivabe.nl',
Expand All @@ -1036,7 +1036,7 @@ class Server {

function trackerRequest(options, type, body) {
if (options.headers == null) options.headers = {};
options.headers['user-agent'] = 'MultiOgar-Edited' + this.version;
options.headers['user-agent'] = 'MultiOgarII' + this.version;
options.headers['content-type'] = type;
options.headers['content-length'] = body == null ? 0 : Buffer.byteLength(body, 'utf8');
var req = http.request(options, function (res) {
Expand Down
10 changes: 5 additions & 5 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = Object.seal({
// MultiOgar-Edited configurations file
// MultiOgarII configurations file
// Lines starting with semicolons are comments

// [NOTES]
// MultiOgar-Edited uses cell size instead of cell mass to improve performance!
// MultiOgarII uses cell size instead of cell mass to improve performance!
// In order to get the cell size from mass value, you need to calculate using this formula:
// size: SQRT( mass * 100 )
//
Expand Down Expand Up @@ -68,8 +68,8 @@ module.exports = Object.seal({
"serverChat": 1,
"serverChatAscii": 1,
"separateChatForTeams": 0,
"serverName": "MultiOgar-Edited #1",
"serverWelcome1": "Welcome to MultiOgar-Edited!",
"serverName": "MultiOgarII #1",
"serverWelcome1": "Welcome to MultiOgarII!",
"serverWelcome2": "",
"clientBind": "",

Expand Down Expand Up @@ -137,7 +137,7 @@ module.exports = Object.seal({
"ejectVelocity": 780,

// [PLAYERS]
// Reminder: MultiOgar-Edited uses cell size instead of mass!
// Reminder: MultiOgarII uses cell size instead of mass!
// playerStartMass replaced with playerStartSize
//
// playerMinSize: Minimum size a player cell can decay too. (vanilla: val*val/100: 10 mass)
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const instance = new Server();
instance.start();

// Welcome message.
Logger.info(`Running MultiOgar-Edited ${instance.version}, a FOSS agar.io server implementation.`);
Logger.info(`Running MultiOgarII ${instance.version}, a FOSS agar.io server implementation.`);

// Catch console input.
inputInterface.on("line", (input) => {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/CommandList.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CommandsList {

// Ignore aliases, only print commands.
if(CommandsList.prototype[commandObj.name] && !CommandsList.prototype[commandObj.name].isAlias) {
console.log(`- ${command}: ${commandObj.description}`);
console.log(`${commands.indexOf(command) + 1}. ${command}: ${commandObj.description}`);
};
});
};
Expand Down

0 comments on commit 90c8f0c

Please sign in to comment.