feat: ignore who for now, implement it later

This commit is contained in:
user0-07161 2025-12-26 21:57:32 +01:00
parent b63010fa43
commit 86b9c8d3a7
2 changed files with 23 additions and 0 deletions

View file

@ -9,6 +9,7 @@ use crate::{
channels::Channel,
commands::{
cap::Cap, join::Join, nick::Nick, ping::Ping, privmsg::PrivMsg, user::User as UserHandler,
who::Who,
},
error_structs::CommandExecError,
messages::{JoinMessage, Message},
@ -22,6 +23,7 @@ mod nick;
mod ping;
mod privmsg;
mod user;
mod who;
#[derive(Debug)]
pub struct IrcCommand {
@ -103,6 +105,7 @@ impl IrcCommand {
command_map.insert("PRIVMSG".to_owned(), &PrivMsg);
command_map.insert("PING".to_owned(), &Ping);
command_map.insert("JOIN".to_owned(), &Join);
command_map.insert("WHO".to_owned(), &Who);
println!("{self:#?}");

20
src/commands/who.rs Normal file
View file

@ -0,0 +1,20 @@
use async_trait::async_trait;
use crate::{
commands::{IrcAction, IrcHandler},
user::User,
};
pub struct Who;
#[async_trait]
impl IrcHandler for Who {
async fn handle(
&self,
_arguments: Vec<String>,
_authenticated: bool,
_user_state: &mut User,
) -> super::IrcAction {
IrcAction::DoNothing // TODO
}
}