Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Commit

Permalink
12.25.2020-prerelease.01
Browse files Browse the repository at this point in the history
Very first release of the TenableGameServer!

+ Added console log for when a user kicks a player.
  • Loading branch information
200Tigersbloxed committed Dec 25, 2020
1 parent edb7bd3 commit 5bb7814
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions beep.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,6 @@ function CheckForDuplicatePlayer(playername){

function PickNewPlayer(){
// This SHOULD be used for picking the host

// this section should no longer have to be used
/*
for(var i = 0; i < theplayerlisttopickfrom.length; i++){
if(theplayerlisttopickfrom[i] == host){
delete theplayerlisttopickfrom[i]
}
}
// check if the array is empty
if(filtered.length <= 0){
return false
}
*/

// filter theplayerlisttopickfrom[] for empty things
var filtered = theplayerlisttopickfrom.filter(function (el) {
return el != null
Expand Down Expand Up @@ -286,7 +271,6 @@ function EndRound(){
io.emit("endround")
theplayerlisttopickfrom.length = 0
theplayerlisttopickfrom = players
console.log(theplayerlisttopickfrom)
sendServerMessage("Timeout for 30 Seconds")
setTimeout(function(){
BeginStartRound()
Expand Down Expand Up @@ -470,6 +454,7 @@ io.on('connection', (socket) => {
if(isadmin){
try{
kickPlayer(targetsocket, reason)
console.log(getSocketFromPlayerName(socket) + " kicked " + target + " for " + reason + ".")
}
catch{}
}
Expand Down

0 comments on commit 5bb7814

Please sign in to comment.