mirror of
https://codeberg.org/spire/webrcon.git
synced 2026-06-03 17:24:07 +02:00
Update connection.js
Added port parameter to WebRcon
This commit is contained in:
parent
980e3ef6c1
commit
3352401b2b
1 changed files with 3 additions and 2 deletions
|
|
@ -7,9 +7,10 @@ export default class Connection {
|
|||
receivedBuffer = '';
|
||||
errorCount = 0;
|
||||
|
||||
constructor (host, password) {
|
||||
constructor (host, password, port = 27021) {
|
||||
this.host = host;
|
||||
this.password = password;
|
||||
this.port = port;
|
||||
this.errorListeners = [];
|
||||
|
||||
this.init();
|
||||
|
|
@ -23,7 +24,7 @@ export default class Connection {
|
|||
if (this.rcon) {
|
||||
return;
|
||||
}
|
||||
this.rcon = new WebRcon(this.host, this.password);
|
||||
this.rcon = new WebRcon(this.host, this.password, this.port);
|
||||
}
|
||||
|
||||
init () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue