Moved protocol-related stuff to new proto module.

This commit is contained in:
Aaron Weiss 2017-01-15 13:41:16 -05:00
parent 1fd5668def
commit 880870770e
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2
8 changed files with 12 additions and 9 deletions

View file

@ -1,10 +1,10 @@
//! Data related to IRC functionality. //! Data related to IRC functionality.
pub use client::data::caps::{Capability, NegotiationVersion}; pub use proto::caps::{Capability, NegotiationVersion};
pub use client::data::command::Command; pub use proto::command::Command;
pub use client::data::config::Config; pub use client::data::config::Config;
pub use client::data::message::Message; pub use proto::message::Message;
pub use client::data::response::Response; pub use proto::response::Response;
pub use client::data::user::{AccessLevel, User}; pub use client::data::user::{AccessLevel, User};
pub mod kinds { pub mod kinds {
@ -20,9 +20,5 @@ pub mod kinds {
impl<T> IrcRead for T where T: BufRead + Sized + Send + 'static {} impl<T> IrcRead for T where T: BufRead + Sized + Send + 'static {}
} }
pub mod caps;
pub mod command;
pub mod config; pub mod config;
pub mod message;
pub mod response;
pub mod user; pub mod user;

View file

@ -4,7 +4,7 @@ use std::borrow::ToOwned;
use client::data::{Capability, NegotiationVersion}; use client::data::{Capability, NegotiationVersion};
use client::data::Command::{AUTHENTICATE, CAP, INVITE, JOIN, KICK, KILL, MODE, NICK, NOTICE}; use client::data::Command::{AUTHENTICATE, CAP, INVITE, JOIN, KICK, KILL, MODE, NICK, NOTICE};
use client::data::Command::{OPER, PART, PASS, PONG, PRIVMSG, QUIT, SAMODE, SANICK, TOPIC, USER}; use client::data::Command::{OPER, PART, PASS, PONG, PRIVMSG, QUIT, SAMODE, SANICK, TOPIC, USER};
use client::data::command::CapSubCommand::{END, LS, REQ}; use proto::command::CapSubCommand::{END, LS, REQ};
#[cfg(feature = "ctcp")] use time::get_time; #[cfg(feature = "ctcp")] use time::get_time;
use client::server::Server; use client::server::Server;

View file

@ -7,4 +7,5 @@ extern crate encoding;
extern crate rustc_serialize; extern crate rustc_serialize;
pub mod client; pub mod client;
pub mod proto;
pub mod server; pub mod server;

6
src/proto/mod.rs Normal file
View file

@ -0,0 +1,6 @@
//! Support for the IRC protocol using Tokio.
pub mod caps;
pub mod command;
pub mod message;
pub mod response;