Pavlov mod.io maps integration with pavlovrcon.com

Add extra buttons to mod.io pavlov map pages to allow switching to the map or adding it to the rotation of a server by using pavlovrcon.com

Author
UnderPL
Daily installs
0
Total installs
25
Ratings
0 0 0
Version
3.0
Created
2023-06-17
Updated
2023-06-24
Size
21.5 KB
License
CC BY-NC 4.0
Applies to

Pavlov mod.io RCON integration (pavlovrcon.com)

mod.io extra pavlovrcon.com buttons

This userscript adds extra buttons to the mod.io page for Pavlov maps and mods, making it easier for users to quickly interact with maps and mods using RCON (Remote Console) commands. The script uses the pavlovrcon.com API to send the requests.

Features

  • Adds a "Play" button to instantly switch to a selected map
  • Adds a "Add to map rotation" button to add a selected map to the map rotation
  • Adds a "Remove from map rotation" button to remove a selected map from the map rotation
  • Provides a dropdown menu to choose between various game modes (e.g. SND, TDM, DM, etc.)
  • Adds buttons to the map interface showing which game modes are currently in rotation with that map. These buttons allow you to quickly remove the corresponding map and game mode combination from the rotation by simply clicking on them. (see blue buttons in screenshots)

Usage

  1. Install script (after installing Violentmonkey/Tampermonkey/Greasemonkey)
  2. Log in with your server info in pavlovrcon.com
  3. Use the buttons in any map page (https://mod.io/g/pavlov/m/) (Server ID should stay at 0 unless you have logged in to multiple servers in pavlovrcon.com)

Advanced Configuration

If you find that pavlovrcon.com is down, or if you prefer not to route your requests through the website, you can configure the script to use an HTTP "rcon proxy"/server instead. This alternative method can be particularly useful if you don't want to first log in with your RCON password on pavlovrcon.com before using the script. I use a node.js server to translate the HTTP requests to TCP, you can message me for it.

To enable this option:

  • Edit the script and set the httpProxy variable to true.
  • Update the httpProxyIp and httpProxyPort variables with your HTTP proxy/server's IP and port number respectively.

The script will then send requests to the following endpoint:

http://${httpProxyIp}:${httpProxyPort}/rcon?command=${action}

If you have a different endpoint structure, you can easily modify it directly in the script.

In this URL, ${action} corresponds to the RCON command you wish to send.

To do:

  • Improve the code?