From 2decee83e982fba9d17e805c6b58c6e6c472690e Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 26 Dec 2023 00:26:08 +0100 Subject: [PATCH] Switch euphoria.io (RIP) to euphoria.leet.nu euphoria.io is dead for good now, and euphoria.leet.nu is the blessed clone/fork that will take its place. May this crevice of the internet survive another day. --- CHANGELOG.md | 4 ++++ examples/testbot_manual.rs | 2 +- src/api.rs | 4 +++- src/bot/instance.rs | 2 +- src/emoji.rs | 2 +- src/emoji.txt | 8 ++++---- src/nick.rs | 6 +++--- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c605fe3..a1707bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ Procedure when bumping the version number: ## Unreleased +### Changed +- **(breaking)** `bot::instance::ServerConfig::default` now points to `euphoria.leet.nu` +- Documentation now references `euphoria.leet.nu` instead of `euphoria.io` + ## v0.4.0 - 2023-05-14 ### Added diff --git a/examples/testbot_manual.rs b/examples/testbot_manual.rs index 8a7afe0..c059004 100644 --- a/examples/testbot_manual.rs +++ b/examples/testbot_manual.rs @@ -10,7 +10,7 @@ use euphoxide::conn::{Conn, ConnTx, State}; use time::OffsetDateTime; const TIMEOUT: Duration = Duration::from_secs(10); -const DOMAIN: &str = "euphoria.io"; +const DOMAIN: &str = "euphoria.leet.nu"; const ROOM: &str = "test"; const NICK: &str = "TestBot"; const HELP: &str = "I'm an example bot for https://github.com/Garmelon/euphoxide"; diff --git a/src/api.rs b/src/api.rs index 5923f47..d72b91c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,4 +1,6 @@ -//! Models the euphoria API at . +//! Models the [euphoria API][0]. +//! +//! [0](https://github.com/CylonicRaider/heim/blob/master/doc/api.md) mod account_cmds; mod events; diff --git a/src/bot/instance.rs b/src/bot/instance.rs index 58b1e3e..0d00d4d 100644 --- a/src/bot/instance.rs +++ b/src/bot/instance.rs @@ -98,7 +98,7 @@ impl Default for ServerConfig { Self { timeout: Duration::from_secs(30), reconnect_delay: Duration::from_secs(30), - domain: "euphoria.io".to_string(), + domain: "euphoria.leet.nu".to_string(), cookies: Arc::new(Mutex::new(CookieJar::new())), } } diff --git a/src/emoji.rs b/src/emoji.rs index 5f42e5d..7a6182d 100644 --- a/src/emoji.rs +++ b/src/emoji.rs @@ -1,4 +1,4 @@ -//! All emoji the vanilla euphoria.io client knows. +//! All emoji the euphoria.io client knows. use std::borrow::Cow; use std::collections::HashMap; diff --git a/src/emoji.txt b/src/emoji.txt index 51230c4..3989f24 100644 --- a/src/emoji.txt +++ b/src/emoji.txt @@ -4,10 +4,10 @@ # also adds a few more emoji names without a unicode equivalent [4]. # # [0]: https://www.npmjs.com/package/emoji-annotation-to-unicode/v/0.2.4 -# [1]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L37-L39 -# [2]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L26 -# [3]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L23 -# [4]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L8-L22 +# [1]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L37-L39 +# [2]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L26 +# [3]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L23 +# [4]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L8-L22 # Any line that is empty or starts with # is ignored. diff --git a/src/nick.rs b/src/nick.rs index 4a11393..03ada70 100644 --- a/src/nick.rs +++ b/src/nick.rs @@ -15,7 +15,7 @@ fn hue_normalize(text: &str) -> String { /// A re-implementation of [euphoria's nick hue hashing algorithm][0]. /// -/// [0]: https://github.com/euphoria-io/heim/blob/master/client/lib/hueHash.js +/// [0]: https://github.com/CylonicRaider/heim/blob/master/client/lib/hueHash.js fn hue_hash(text: &str, offset: i64) -> u8 { let mut val = 0_i32; for bibyte in text.encode_utf16() { @@ -48,7 +48,7 @@ pub fn hue_without_removing_emoji(nick: &str) -> u8 { /// This is a reimplementation of [euphoria's nick hue hashing algorithm][0]. It /// should always return the same value as the official client's implementation. /// -/// [0]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/hueHash.js +/// [0]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/hueHash.js pub fn hue(emoji: &Emoji, nick: &str) -> u8 { hue_without_removing_emoji(&emoji.remove(nick)) } @@ -74,7 +74,7 @@ pub fn hue(emoji: &Emoji, nick: &str) -> u8 { /// property that's easier to implement, even though it may be incorrect in some /// edge cases. /// -/// [0]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/stores/chat.js#L14 +/// [0]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/stores/chat.js#L14 pub fn normalize(nick: &str) -> String { mention(nick) // Step 1 .nfkc() // Step 2