Updated code for line-wrapping.
This commit is contained in:
parent
87fde7b212
commit
da29644eb1
1 changed files with 10 additions and 11 deletions
|
@ -165,12 +165,12 @@ impl<T: IrcReader, U: IrcWriter> IrcServer<T, U> {
|
||||||
}
|
}
|
||||||
if &msg.command[] == "PING" {
|
if &msg.command[] == "PING" {
|
||||||
self.send(PONG(&msg.suffix.as_ref().unwrap()[], None)).unwrap();
|
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 {
|
let chan = match msg.suffix {
|
||||||
Some(ref suffix) => &suffix[],
|
Some(ref suffix) => &suffix[],
|
||||||
None => &msg.args[0][],
|
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(vec) = self.chanlists.lock().unwrap().get_mut(&String::from_str(chan)) {
|
||||||
if let Some(ref src) = msg.prefix {
|
if let Some(ref src) = msg.prefix {
|
||||||
if let Some(i) = src.find('!') {
|
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[]) {
|
} else if let ("MODE", [ref chan, ref mode, ref user]) = (&msg.command[], &msg.args[]) {
|
||||||
if cfg!(not(feature = "nochanlists")) {
|
if cfg!(not(feature = "nochanlists")) {
|
||||||
if let Some(vec) = self.chanlists.lock().unwrap().get_mut(chan) {
|
if let Some(vec) = self.chanlists.lock().unwrap().get_mut(chan) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue