2024-04-21 18:50:45 +00:00
|
|
|
use lavina_core::prelude::Str;
|
|
|
|
|
use lavina_core::repo::Storage;
|
2024-04-23 18:16:18 +00:00
|
|
|
use proto_irc::response::WriteResponse;
|
2024-04-21 18:50:45 +00:00
|
|
|
use std::future::Future;
|
|
|
|
|
use tokio::io::AsyncWrite;
|
|
|
|
|
|
|
|
|
|
pub mod whois;
|
|
|
|
|
|
2024-04-22 04:44:16 +00:00
|
|
|
pub trait Handler {
|
2024-04-21 18:50:45 +00:00
|
|
|
fn handle(
|
|
|
|
|
&self,
|
2024-04-23 18:13:38 +00:00
|
|
|
server_name: Str,
|
|
|
|
|
client: Str,
|
2024-04-21 18:50:45 +00:00
|
|
|
writer: &mut (impl AsyncWrite + Unpin),
|
2024-04-23 18:13:38 +00:00
|
|
|
storage: Storage,
|
2024-04-21 18:50:45 +00:00
|
|
|
) -> impl Future<Output = anyhow::Result<()>>;
|
|
|
|
|
}
|