Skip to content

Commit

Permalink
Merge pull request #651 from squidowl/fix/misc
Browse files Browse the repository at this point in the history
  • Loading branch information
andymandias authored Nov 13, 2024
2 parents 73752de + 9158000 commit 5745688
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions data/src/isupport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ impl Parameter {
Parameter::AWAYLEN(_) => Some(Kind::AWAYLEN),
Parameter::CHANLIMIT(_) => Some(Kind::CHANLIMIT),
Parameter::CHANNELLEN(_) => Some(Kind::CHANNELLEN),
Parameter::CHANTYPES(_) => Some(Kind::CHANTYPES),
Parameter::CNOTICE => Some(Kind::CNOTICE),
Parameter::CPRIVMSG => Some(Kind::CPRIVMSG),
Parameter::ELIST(_) => Some(Kind::ELIST),
Expand Down
8 changes: 7 additions & 1 deletion data/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ impl Target {
pub fn prefixes(&self) -> Option<&[char]> {
match self {
Target::Server { .. } => None,
Target::Channel { prefixes, .. } => Some(prefixes),
Target::Channel { prefixes, .. } => {
if prefixes.is_empty() {
None
} else {
Some(prefixes)
}
}
Target::Query { .. } => None,
Target::Logs => None,
Target::Highlights { .. } => None,
Expand Down
4 changes: 2 additions & 2 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn setup(is_debug: bool) -> Result<ReceiverStream<Vec<Record>>, Error> {
io_sink = io_sink.chain(log_file);
}

let (channel_sink, reciever) = channel_logger();
let (channel_sink, receiver) = channel_logger();

fern::Dispatch::new()
.level(log::LevelFilter::Off)
Expand All @@ -50,7 +50,7 @@ pub fn setup(is_debug: bool) -> Result<ReceiverStream<Vec<Record>>, Error> {
.chain(channel_sink)
.apply()?;

Ok(reciever)
Ok(receiver)
}

fn channel_logger() -> (Box<dyn Log>, ReceiverStream<Vec<Record>>) {
Expand Down

0 comments on commit 5745688

Please sign in to comment.