Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
S
srvpro
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Packages
    • Packages
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issues
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • MyCard
  • srvpro
  • Wiki
  • Plguins

Plguins

Last edited by purerosefallen Jul 26, 2019
Page history
This is an old version of this page. You can view the most recent version or browse the history.

SRVPro Plguins

SRVPro also support plugins for extending its functions. Developing plugins for SRVPro is highly recommended.

How to use a plugin

All installed plugins should be put in ./plugins directory. A plugin could be a single js file, or an entire Node package.

If the plugin to install is a...

  • Single JS file: Just simply place the js file into ./plugins.
  • Node package: Clone the entire repository into ./plugins directory. You may have to follow the instructions of the plugin's documents.

Sample plugins

Here are some sample plugins. All the plugins listed here were written in Node packages by Nanahira, and licensed under AGPL v3.

You may directly install those plugins into your server, or take those plugins as reference to make your own SRVPro plugins.

  • https://github.com/purerosefallen/srvpro-coolq A QQ bot for SRVPro room list or card testing, using CoolQ HTTP SDK.
  • https://github.com/purerosefallen/srvpro-pre-compat A plugin for compating pre-release cards, allowing players with official cards or pre-release cards have no trouble dueling with each other.
  • https://github.com/purerosefallen/srvpro-side-restrict An SRVPro plguin, restricting changing side. This may be useful for specific tournaments.

Making your own plguins

Making a plugin for SRVPro is very simple. You may make up an entire Node package, or write a single js file.

Entry point

If you are developing a plugin as a Node package, make sure the package.json is inside your repository, in which the value of main should be the entry point.

Global variables

You may access those global variables provided by SRVPro for your convenience.

  • _ The underscore library.
  • log The bunyan logger.
Clone repository
  • Home
  • How to run
  • Install script for CentOS 7
  • Install script for Ubuntu 16
  • Install script for Ubuntu 18 or Debian 9
  • Plguins
  • SRVPro on Docker
More Pages