Skip to content

Commit

Permalink
fixing issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander171294 committed Mar 23, 2021
1 parent 1d4c673 commit e24fc08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ export class ChatComponent implements OnInit {

ban(steamID: string, name: string) {
this.promptSrv.openPrompt(new PromptData('ban('+name+') Write the reason:')).then(reason => {
this.rustSrv.sendCommand('banid ' + steamID + ' ' + name + ' ' + reason);
this.rustSrv.sendCommand('banid ' + steamID + ' "' + name + '" "' + reason + '"');
this.messageService.add({severity: 'success', summary: 'Banned', detail: this.contextMessage.UserId + ' | ' + this.contextMessage.Username});
});
}

kick(steamID: string, name: string) {
this.promptSrv.openPrompt(new PromptData('kick('+name+') Write the reason:')).then(reason => {
this.rustSrv.sendCommand('kick ' + steamID + ' ' + reason);
this.rustSrv.sendCommand('kick ' + steamID + ' "' + reason + '"');
this.messageService.add({severity: 'success', summary: 'Banned', detail: this.contextMessage.UserId + ' | ' + this.contextMessage.Username});
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/players/players.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ export class PlayersComponent implements OnInit {
ban(steamID: string, name: string) {
this.userPopup.opened = false;
this.promptSrv.openPrompt(new PromptData('Write the reason:')).then(reason => {
this.rustSrv.sendCommand('banid ' + steamID + ' ' + name + ' ' + reason);
this.rustSrv.sendCommand('banid ' + steamID + ' "' + name + '" "' + reason + '"');
this.messageService.add({severity: 'success', summary: 'Banned', detail: steamID + ' | ' + name});
});
}

kick(steamID: string) {
this.userPopup.opened = false;
this.promptSrv.openPrompt(new PromptData('Write the reason:')).then(reason => {
this.rustSrv.sendCommand('kick ' + steamID + ' ' + reason);
this.rustSrv.sendCommand('kick ' + steamID + ' "' + reason + '"');
this.messageService.add({severity: 'success', summary: 'Kicked', detail: steamID + ' | ' + name});
});
}
Expand Down

0 comments on commit e24fc08

Please sign in to comment.