fuk it
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Server } from 'socket.io'
|
||||
import { TSocket } from '../../../../utilities/types'
|
||||
import prisma from '../../../../utilities/prisma'
|
||||
import CharacterManager from '../../../../managers/characterManager'
|
||||
|
||||
type Payload = {
|
||||
id: string
|
||||
@ -21,7 +22,8 @@ type Payload = {
|
||||
*/
|
||||
export default function (socket: TSocket, io: Server) {
|
||||
socket.on('gm:object:update', async (data: Payload, callback: (success: boolean) => void) => {
|
||||
if (socket.character?.role !== 'gm') {
|
||||
const character = CharacterManager.getCharacterFromSocket(socket);
|
||||
if (character?.role !== 'gm') {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user