This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
rust-irc/src/lib.rs

20 lines
585 B
Rust

pub mod codes {
pub mod client {
pub const JOIN_ROOM: u8 = 0x01;
pub const JOIN_SERVER: u8 = 0x02;
pub const LEAVE_ROOM: u8 = 0x03;
pub const LIST_ROOMS: u8 = 0x04;
pub const SEND_MESSAGE: u8 = 0x05;
}
pub const KEEP_ALIVE: u8 = 0x0C;
pub const RESPONSE: u8 = 0x0D;
pub const RESPONSE_OK: u8 = 0x0E;
pub const ERROR: u8 = 0x0F;
pub const QUIT: u8 = 0x0B;
pub mod error {
pub const INVALID_ROOM: u8 = 0x10;
pub const NICKNAME_COLLISION: u8 = 0x11;
pub const SERVER_FULL: u8 = 0x12;
}
}