Updated code for line-wrapping.

This commit is contained in:
Aaron Weiss 2015-01-13 04:07:04 -05:00
parent 87fde7b212
commit da29644eb1

View file

@ -165,12 +165,12 @@ impl<T: IrcReader, U: IrcWriter> IrcServer<T, U> {
}
if &msg.command[] == "PING" {
self.send(PONG(&msg.suffix.as_ref().unwrap()[], None)).unwrap();
} else if &msg.command[] == "JOIN" || &msg.command[] == "PART" {
} else if cfg!(not(feature = "nochanlists")) &&
(&msg.command[] == "JOIN" || &msg.command[] == "PART") {
let chan = match msg.suffix {
Some(ref suffix) => &suffix[],
None => &msg.args[0][],
};
if cfg!(not(feature = "nochanlists")) {
if let Some(vec) = self.chanlists.lock().unwrap().get_mut(&String::from_str(chan)) {
if let Some(ref src) = msg.prefix {
if let Some(i) = src.find('!') {
@ -184,7 +184,6 @@ impl<T: IrcReader, U: IrcWriter> IrcServer<T, U> {
}
}
}
}
} else if let ("MODE", [ref chan, ref mode, ref user]) = (&msg.command[], &msg.args[]) {
if cfg!(not(feature = "nochanlists")) {
if let Some(vec) = self.chanlists.lock().unwrap().get_mut(chan) {