mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Implement most of clans functionality; close #89
This commit is contained in:
1 parent
e120b945c8
commit
f0cca11d3c
43 files changed
+2605
-26
No files matched your search
@@ -0,0 +1,26 @@
|
||||
pub struct ClanInviteCancelled {
|
||||
pub clan_name: String,
|
||||
}
|
||||
|
||||
impl ClanInviteCancelled {
|
||||
pub const CODE: u8 = 25;
|
||||
|
||||
pub fn as_event_params<C>(&self) -> polariton::operation::ParameterTable<C> {
|
||||
let mut params = std::collections::HashMap::with_capacity(1);
|
||||
params.insert(31, polariton::operation::Typed::Str(self.clan_name.clone().into()));
|
||||
params.into()
|
||||
}
|
||||
}
|
||||
|
||||
impl <C: Send + 'static> polariton_server::events::IntoEvent<C> for ClanInviteCancelled {
|
||||
const CHANNEL: u8 = 0;
|
||||
const ENCRYPT: bool = true;
|
||||
const RELIABLE: bool = true;
|
||||
|
||||
fn into_event(self) -> polariton::operation::Event<C> {
|
||||
polariton::operation::Event {
|
||||
code: Self::CODE,
|
||||
params: self.as_event_params(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user