Working on README. The relay will now error out if 2 servers share a tripcode
parent
189ae7abd7
commit
903d5f338d
|
@ -397,6 +397,16 @@ pub async fn run_relay (
|
||||||
4000,
|
4000,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
{
|
||||||
|
let mut tripcode_set = HashSet::new ();
|
||||||
|
|
||||||
|
for (_, v) in state.config.server_tripcodes.iter () {
|
||||||
|
if ! tripcode_set.insert (v) {
|
||||||
|
panic! ("Two servers have the same tripcode. That is not allowed.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
eprintln! ("Loaded {} server tripcodes", state.config.server_tripcodes.len ());
|
eprintln! ("Loaded {} server tripcodes", state.config.server_tripcodes.len ());
|
||||||
|
|
||||||
let make_svc = make_service_fn (|_conn| {
|
let make_svc = make_service_fn (|_conn| {
|
||||||
|
|
Loading…
Reference in New Issue