pvp queue join messages
This commit is contained in:
parent
e4a952ecbb
commit
c83172ca3d
@ -24,6 +24,7 @@ ssh -q "$TARGET" ls -lah "$SERVER_BIN_DIR"
|
||||
echo "syncing client $VERSION"
|
||||
rsync -a --delete --delete-excluded "$MNML_PATH/client/dist/" "$TARGET:$CLIENT_DIST_DIR/$VERSION/"
|
||||
ssh -q "$TARGET" ln -nfs "$CLIENT_DIST_DIR/$VERSION" "$CLIENT_PUBLIC_DIR"
|
||||
ssh -q "$TARGET" ls -lah "$CLIENT_DIST_DIR"
|
||||
|
||||
echo "restarting mnml service"
|
||||
ssh -q -t "$TARGET" sudo service mnml restart && sleep 1 && systemctl --no-pager status mnml
|
||||
|
||||
@ -223,8 +223,8 @@ function createSocket(events) {
|
||||
ItemInfo: onItemInfo,
|
||||
Pong: onPong,
|
||||
|
||||
QueueRequested: () => console.log('pvp queue request received'),
|
||||
QueueJoined: () => console.log('you have joined the pvp queue'),
|
||||
QueueRequested: () => events.notify('pvp queue request received'),
|
||||
QueueJoined: () => events.notify('you have joined the pvp queue'),
|
||||
|
||||
Error: errHandler,
|
||||
};
|
||||
|
||||
@ -192,7 +192,13 @@ impl Events {
|
||||
},
|
||||
None => {
|
||||
info!("joined game queue id={:?} account={:?}", req.id, req.account);
|
||||
Some(req)
|
||||
match self.clients.get(&req.id) {
|
||||
Some(ref c) => {
|
||||
c.tx.send(RpcMessage::QueueJoined(()))?;
|
||||
Some(req)
|
||||
},
|
||||
None => return Err(format_err!("missing client client={:?}", req.id)),
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user