feat: ignore who for now, implement it later
This commit is contained in:
parent
b63010fa43
commit
86b9c8d3a7
2 changed files with 23 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ use crate::{
|
||||||
channels::Channel,
|
channels::Channel,
|
||||||
commands::{
|
commands::{
|
||||||
cap::Cap, join::Join, nick::Nick, ping::Ping, privmsg::PrivMsg, user::User as UserHandler,
|
cap::Cap, join::Join, nick::Nick, ping::Ping, privmsg::PrivMsg, user::User as UserHandler,
|
||||||
|
who::Who,
|
||||||
},
|
},
|
||||||
error_structs::CommandExecError,
|
error_structs::CommandExecError,
|
||||||
messages::{JoinMessage, Message},
|
messages::{JoinMessage, Message},
|
||||||
|
|
@ -22,6 +23,7 @@ mod nick;
|
||||||
mod ping;
|
mod ping;
|
||||||
mod privmsg;
|
mod privmsg;
|
||||||
mod user;
|
mod user;
|
||||||
|
mod who;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct IrcCommand {
|
pub struct IrcCommand {
|
||||||
|
|
@ -103,6 +105,7 @@ impl IrcCommand {
|
||||||
command_map.insert("PRIVMSG".to_owned(), &PrivMsg);
|
command_map.insert("PRIVMSG".to_owned(), &PrivMsg);
|
||||||
command_map.insert("PING".to_owned(), &Ping);
|
command_map.insert("PING".to_owned(), &Ping);
|
||||||
command_map.insert("JOIN".to_owned(), &Join);
|
command_map.insert("JOIN".to_owned(), &Join);
|
||||||
|
command_map.insert("WHO".to_owned(), &Who);
|
||||||
|
|
||||||
println!("{self:#?}");
|
println!("{self:#?}");
|
||||||
|
|
||||||
|
|
|
||||||
20
src/commands/who.rs
Normal file
20
src/commands/who.rs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue