--- a/rust/hedgewars-server/src/core/anteroom.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/core/anteroom.rs Tue Feb 13 00:58:17 2024 +0300
@@ -32,7 +32,7 @@
impl BanCollection {
fn new() -> Self {
- todo!("add nick bans");
+ //todo!("add nick bans");
Self {
ban_ips: vec![],
ban_timeouts: vec![],
--- a/rust/hedgewars-server/src/core/client.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/core/client.rs Tue Feb 13 00:58:17 2024 +0300
@@ -30,7 +30,7 @@
impl HwClient {
pub fn new(id: ClientId, protocol_number: u16, nick: String) -> HwClient {
- todo!("add quiet flag");
+ //todo!("add quiet flag");
HwClient {
id,
nick,
--- a/rust/hedgewars-server/src/core/server.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/core/server.rs Tue Feb 13 00:58:17 2024 +0300
@@ -199,7 +199,7 @@
impl HwServer {
pub fn new(clients_limit: usize, rooms_limit: usize) -> Self {
- todo!("add reconnection IDs");
+ //todo!("add reconnection IDs");
let rooms = Slab::with_capacity(rooms_limit);
let clients = IndexSlab::with_capacity(clients_limit);
let checkers = IndexSlab::new();
@@ -780,7 +780,7 @@
VoteType::NewSeed => {
let seed = thread_rng().gen_range(0..1_000_000_000).to_string();
let cfg = GameCfg::Seed(seed);
- todo!("Protocol backwards compatibility");
+ //todo!("Protocol backwards compatibility");
self.room_mut().set_config(cfg.clone());
Some(VoteEffect::NewSeed(cfg))
}
--- a/rust/hedgewars-server/src/handlers/inlobby.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/handlers/inlobby.rs Tue Feb 13 00:58:17 2024 +0300
@@ -26,7 +26,8 @@
) {
use hedgewars_network_protocol::messages::HwProtocolMessage::*;
- todo!("add kick/ban handlers");
+ //todo!("add kick/ban handlers");
+ //todo!("add kick/ban handling");
match message {
CreateRoom(name, password) => match server.create_room(client_id, name, password) {
@@ -49,7 +50,7 @@
}
},
Chat(msg) => {
- todo!("add client quiet flag");
+ //todo!("add client quiet flag");
response.add(
ChatMsg {
nick: server.client(client_id).nick.clone(),
--- a/rust/hedgewars-server/src/handlers/inroom.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/handlers/inroom.rs Tue Feb 13 00:58:17 2024 +0300
@@ -334,6 +334,7 @@
}
}
CallVote(None) => {
+ //todo!("implement ghost points")
response.add(server_chat("Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs <number>".to_string())
.send_self());
}
--- a/rust/hedgewars-server/src/main.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/main.rs Tue Feb 13 00:58:17 2024 +0300
@@ -27,7 +27,7 @@
let args: Vec<String> = env::args().collect();
let mut opts = Options::new();
- todo!("Add options for cert paths");
+ //todo!("Add options for cert paths");
opts.optopt("p", "port", "port - defaults to 46631", "PORT");
opts.optflag("h", "help", "help");
let matches = match opts.parse(&args[1..]) {
--- a/rust/hedgewars-server/src/protocol.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/protocol.rs Tue Feb 13 00:58:17 2024 +0300
@@ -102,6 +102,7 @@
loop {
if !self.buffer.has_remaining() {
+ //todo!("ensure the buffer doesn't grow indefinitely")
match timeout(self.read_timeout, stream.read_buf(&mut self.buffer)).await {
Err(_) => return Err(Timeout),
Ok(Err(e)) => return Err(Network(Box::new(e))),
--- a/rust/hedgewars-server/src/server/demo.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/server/demo.rs Tue Feb 13 00:58:17 2024 +0300
@@ -135,7 +135,7 @@
let mut teams = vec![];
let mut hog_index = 7usize;
- todo!("read messages from file");
+ //todo!("read messages from file");
let messages = vec![];
while let Some(cmd) = read_command(&mut reader, &mut buffer)? {
--- a/rust/hedgewars-server/src/server/io.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/server/io.rs Tue Feb 13 00:58:17 2024 +0300
@@ -24,7 +24,7 @@
let (core_tx, io_rx) = mpsc::channel();
let (io_tx, core_rx) = mpsc::channel();
- todo!("convert into an IO task");
+ //todo!("convert into an IO task");
/*let mut db = Database::new("localhost");
--- a/rust/hedgewars-server/src/server/network.rs Mon Feb 12 21:26:35 2024 +0300
+++ b/rust/hedgewars-server/src/server/network.rs Tue Feb 13 00:58:17 2024 +0300
@@ -180,12 +180,13 @@
client_message = Self::read(&mut self.stream, &mut self.decoder) => {
match client_message {
Ok(message) => {
+ //todo!("add flood stats");
if !sender.send(Message(message)).await {
break;
}
}
Err(e) => {
- todo!("send cmdline errors");
+ //todo!("send cmdline errors");
sender.send(Error(format!("{}", e))).await;
if matches!(e, ProtocolError::Timeout) {
Self::write(&mut self.stream, Bytes::from(HwServerMessage::Bye("Ping timeout".to_string()).to_raw_protocol())).await;
@@ -274,8 +275,8 @@
}
}
- todo!("add the DB task");
- todo!("add certfile watcher task");
+ //todo!("add the DB task");
+ //todo!("add certfile watcher task");
loop {
#[cfg(not(feature = "tls-connections"))]
tokio::select! {