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