rustfmt
This commit is contained in:
parent
431ef2f5b3
commit
d65e17b6b5
2 changed files with 11 additions and 7 deletions
|
|
@ -120,11 +120,7 @@ fn apply_censor(body: &str, censor: &[(String, String)]) -> Option<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn commands() -> Vec<Box<dyn Command>> {
|
pub fn commands() -> Vec<Box<dyn Command>> {
|
||||||
vec![
|
vec![Box::new(PrivMsg), Box::new(Notice), Box::new(TagMsg)]
|
||||||
Box::new(PrivMsg),
|
|
||||||
Box::new(Notice),
|
|
||||||
Box::new(TagMsg),
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shared PRIVMSG/NOTICE delivery. NOTICE never generates automatic replies.
|
/// Shared PRIVMSG/NOTICE delivery. NOTICE never generates automatic replies.
|
||||||
|
|
@ -437,7 +433,15 @@ pub(crate) fn deliver(s: &mut Server, uid: Uid, params: &[String], notice: bool)
|
||||||
s.send_tagged(tuid, uid, &ctags, &msgid, &pm);
|
s.send_tagged(tuid, uid, &ctags, &msgid, &pm);
|
||||||
// store for CHATHISTORY under the canonical pair key (both parties share it)
|
// store for CHATHISTORY under the canonical pair key (both parties share it)
|
||||||
let sender_nick = prefix.split('!').next().unwrap_or_default();
|
let sender_nick = prefix.split('!').next().unwrap_or_default();
|
||||||
record(s, &dm_key(sender_nick, target), &prefix, cmd, target, text, &msgid);
|
record(
|
||||||
|
s,
|
||||||
|
&dm_key(sender_nick, target),
|
||||||
|
&prefix,
|
||||||
|
cmd,
|
||||||
|
target,
|
||||||
|
text,
|
||||||
|
&msgid,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if s.users
|
if s.users
|
||||||
.get(&uid)
|
.get(&uid)
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ use std::net::{SocketAddr, TcpStream};
|
||||||
|
|
||||||
use crate::extensible::Extensible;
|
use crate::extensible::Extensible;
|
||||||
use crate::module::Hook;
|
use crate::module::Hook;
|
||||||
use crate::numeric::*;
|
|
||||||
use crate::modules::multiline::{MAX_BYTES as MLINE_MAX_BYTES, MAX_LINES as MLINE_MAX_LINES};
|
use crate::modules::multiline::{MAX_BYTES as MLINE_MAX_BYTES, MAX_LINES as MLINE_MAX_LINES};
|
||||||
|
use crate::numeric::*;
|
||||||
use crate::server::{Server, VERSION};
|
use crate::server::{Server, VERSION};
|
||||||
use crate::socketengine::OutSink;
|
use crate::socketengine::OutSink;
|
||||||
use crate::Uid;
|
use crate::Uid;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue