02:12 < bridge_> Whats the way i can check to see if someone mentions me in chat in chat.cpp? 03:17 < ws-client> In a few days we will probably reach issue/pr #8303 on the ddnet/ddnet repo <:poggers2:1008007455936094328> 03:17 < ws-client> @Tyrone you mean where to put what if statement in the code? there is highlight already 03:19 < ws-client> for example here @Tyrone https://github.com/ddnet/ddnet/blob/d26505759181835b3736d3be57215444f2bccd07/src/game/client/components/chat.cpp#L880-L895 03:20 < discord__> UwU 04:06 < bridge_> Will look at this in the morning thank you tho Mr dragon 10:45 < bridge_> morning 10:47 < bridge_> gm 13:39 < ws-client> gn 15:22 < bridge_> What function is called when a player hooks a player? Like OnCharacerDeath, but I couldn't find something similar to OnHook 15:22 < bridge_> I don't think there is a hook for it since nothing acts on that information 15:22 < bridge_> Are there other functions that are called along with the hook? 15:28 < bridge_> I meant "hook" as in "hooking point". As in I don't think any function is called when you successfully attach your hook to another tee 15:28 < bridge_> But check gamecore to be sure 15:29 < bridge_> `SetHookedPlayer` is called. Maybe you can check that 16:53 < bridge_> Is there a way to do the ger10.ddnet.org whitelist handshake thing via bash terminal? Just pinging it is not enough 16:55 < bridge_> curl maybe 17:12 < bridge_> hey, i was trying to make thingy which would parse numeric string and return little endian bytes from that string. here's what ive done 17:12 < bridge_> 17:12 < bridge_> ```rust 17:12 < bridge_> #[derive(Debug)] 17:12 < bridge_> struct IntRepr(Vec); 17:12 < bridge_> 17:12 < bridge_> impl IntRepr { 17:12 < bridge_> pub fn new() -> Self { 17:12 < bridge_> Self(Vec::new()) 17:12 < bridge_> } 17:12 < bridge_> 17:12 < bridge_> pub fn div2(&self, num: &str) -> Option<(String, bool)> { 17:12 < bridge_> let mut remainder = false; 17:12 < bridge_> let result = num 17:12 < bridge_> .chars() 17:12 < bridge_> .map(|ch| { 17:12 < bridge_> let mut new = ch as u8 - b'0'; 17:12 < bridge_> if remainder { 17:12 < bridge_> new += 10; 17:12 < bridge_> } 17:12 < bridge_> 17:12 < bridge_> if new & 1 != 0 { 17:13 < bridge_> remainder = true; 17:13 < bridge_> } else { 17:13 < bridge_> remainder = false; 17:13 < bridge_> } 17:13 < bridge_> 17:13 < bridge_> new >>= 1; 17:13 < bridge_> 17:13 < bridge_> (new + b'0') as char 17:13 < bridge_> }) 17:22 < bridge_> hey, i was trying to make thingy which would parse numeric string and return little endian bytes from that string. here's what ive done 17:22 < bridge_> 17:22 < bridge_> ```rust 17:22 < bridge_> #[derive(Debug)] 17:22 < bridge_> struct IntRepr(Vec); 17:22 < bridge_> 17:22 < bridge_> impl IntRepr { 17:22 < bridge_> pub fn new() -> Self { 17:22 < bridge_> Self(Vec::new()) 17:22 < bridge_> } 17:22 < bridge_> 17:22 < bridge_> fn div2(&self, num: &str) -> Option<(String, bool)> { 17:22 < bridge_> let mut remainder = false; 17:23 < bridge_> let result = num 17:23 < bridge_> .chars() 17:23 < bridge_> .map(|ch| { 17:23 < bridge_> let mut new = ch as u8 - b'0'; 17:23 < bridge_> if remainder { 17:23 < bridge_> new += 10; 17:23 < bridge_> } 17:23 < bridge_> 17:23 < bridge_> if new & 1 != 0 { 17:23 < bridge_> remainder = true; 17:23 < bridge_> } else { 17:23 < bridge_> remainder = false; 17:23 < bridge_> } 17:23 < bridge_> 17:23 < bridge_> new >>= 1; 17:23 < bridge_> 17:23 < bridge_> (new + b'0') as char 17:23 < bridge_> }) 17:26 < bridge_> nice understanding of bit manipulation! 17:26 < bridge_> > `foo` 17:26 < bridge_> 🤔 17:27 < bridge_> > `foo` 17:27 < bridge_> that's probably the only part I understand 🤔 17:27 < bridge_> In F-DDrace there is 17:28 < bridge_> https://github.com/fokkonaut/F-DDrace/blob/5c75409ba38b65a83ff9f9717c734f35263c80a4/src/game/server/entities/character.cpp#L1496 18:02 < bridge_> https://doc.rust-lang.org/std/primitive.char.html#method.to_digit 18:06 < bridge_> looks rly hacky tho 18:06 < bridge_> but it works 😏 18:07 < bridge_> try to remove the allocations 18:07 < bridge_> maybe return a iterator 18:07 < bridge_> idk 18:07 < bridge_> to_string is a allocation 18:08 < bridge_> it's a feature 18:08 < bridge_> ```rust 18:08 < bridge_> pub const fn to_digit(self, radix: u32) -> Option { 18:08 < bridge_> // If not a digit, a number greater than radix will be created. 18:08 < bridge_> let mut digit = (self as u32).wrapping_sub('0' as u32); 18:08 < bridge_> if radix > 10 { 18:08 < bridge_> assert!(radix <= 36, "to_digit: radix is too high (maximum 36)"); 18:08 < bridge_> if digit < 10 { 18:08 < bridge_> return Some(digit); 18:08 < bridge_> } 18:08 < bridge_> // Force the 6th bit to be set to ensure ascii is lower case. 18:08 < bridge_> digit = (self as u32 | 0b10_0000).wrapping_sub('a' as u32).saturating_add(10); 18:08 < bridge_> } 18:08 < bridge_> // FIXME: once then_some is const fn, use it here 18:08 < bridge_> if digit < radix { Some(digit) } else { None } 18:08 < bridge_> } 18:09 < bridge_> ``` 19:05 < bridge_> :justatest: 19:43 < bridge_> :justatest: git hard fr