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.
This commit is contained in:
Joscha 2023-12-26 00:26:08 +01:00
parent fa6c8cdce9
commit 2decee83e9
7 changed files with 17 additions and 11 deletions

View file

@ -13,6 +13,10 @@ Procedure when bumping the version number:
## Unreleased ## 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 ## v0.4.0 - 2023-05-14
### Added ### Added

View file

@ -10,7 +10,7 @@ use euphoxide::conn::{Conn, ConnTx, State};
use time::OffsetDateTime; use time::OffsetDateTime;
const TIMEOUT: Duration = Duration::from_secs(10); const TIMEOUT: Duration = Duration::from_secs(10);
const DOMAIN: &str = "euphoria.io"; const DOMAIN: &str = "euphoria.leet.nu";
const ROOM: &str = "test"; const ROOM: &str = "test";
const NICK: &str = "TestBot"; const NICK: &str = "TestBot";
const HELP: &str = "I'm an example bot for https://github.com/Garmelon/euphoxide"; const HELP: &str = "I'm an example bot for https://github.com/Garmelon/euphoxide";

View file

@ -1,4 +1,6 @@
//! Models the euphoria API at <http://api.euphoria.io/>. //! Models the [euphoria API][0].
//!
//! [0](https://github.com/CylonicRaider/heim/blob/master/doc/api.md)
mod account_cmds; mod account_cmds;
mod events; mod events;

View file

@ -98,7 +98,7 @@ impl Default for ServerConfig {
Self { Self {
timeout: Duration::from_secs(30), timeout: Duration::from_secs(30),
reconnect_delay: 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())), cookies: Arc::new(Mutex::new(CookieJar::new())),
} }
} }

View file

@ -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::borrow::Cow;
use std::collections::HashMap; use std::collections::HashMap;

View file

@ -4,10 +4,10 @@
# also adds a few more emoji names without a unicode equivalent [4]. # 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 # [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 # [1]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L37-L39
# [2]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L26 # [2]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L26
# [3]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L23 # [3]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L23
# [4]: https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L8-L22 # [4]: https://github.com/CylonicRaider/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/emoji.js#L8-L22
# Any line that is empty or starts with # is ignored. # Any line that is empty or starts with # is ignored.

View file

@ -15,7 +15,7 @@ fn hue_normalize(text: &str) -> String {
/// A re-implementation of [euphoria's nick hue hashing algorithm][0]. /// 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 { fn hue_hash(text: &str, offset: i64) -> u8 {
let mut val = 0_i32; let mut val = 0_i32;
for bibyte in text.encode_utf16() { 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 /// 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. /// 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 { pub fn hue(emoji: &Emoji, nick: &str) -> u8 {
hue_without_removing_emoji(&emoji.remove(nick)) 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 /// property that's easier to implement, even though it may be incorrect in some
/// edge cases. /// 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 { pub fn normalize(nick: &str) -> String {
mention(nick) // Step 1 mention(nick) // Step 1
.nfkc() // Step 2 .nfkc() // Step 2