Fixed bug in nochanlists from handle_message rewrite.
This commit is contained in:
parent
5df4d26c07
commit
bf9bd3ecb8
1 changed files with 2 additions and 2 deletions
|
@ -339,14 +339,14 @@ impl<T: IrcRead, U: IrcWrite> IrcServer<T, U> where Connection<T, U>: Reconnect
|
||||||
} else if let Ok(cmd) = msg.into() {
|
} else if let Ok(cmd) = msg.into() {
|
||||||
match cmd {
|
match cmd {
|
||||||
PING(data, _) => try!(self.send_pong(&data)),
|
PING(data, _) => try!(self.send_pong(&data)),
|
||||||
JOIN(chan, _, _) => {
|
JOIN(chan, _, _) => if cfg!(not(feature = "nochanlists")) {
|
||||||
if let Some(vec) = self.chanlists().lock().unwrap().get_mut(&chan.to_owned()) {
|
if let Some(vec) = self.chanlists().lock().unwrap().get_mut(&chan.to_owned()) {
|
||||||
if let Some(src) = msg.get_source_nickname() {
|
if let Some(src) = msg.get_source_nickname() {
|
||||||
vec.push(User::new(src))
|
vec.push(User::new(src))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
PART(chan, _) => {
|
PART(chan, _) => if cfg!(not(feature = "nochanlists")) {
|
||||||
if let Some(vec) = self.chanlists().lock().unwrap().get_mut(&chan.to_owned()) {
|
if let Some(vec) = self.chanlists().lock().unwrap().get_mut(&chan.to_owned()) {
|
||||||
if let Some(src) = msg.get_source_nickname() {
|
if let Some(src) = msg.get_source_nickname() {
|
||||||
if let Some(n) = vec.iter().position(|x| x.get_nickname() == src) {
|
if let Some(n) = vec.iter().position(|x| x.get_nickname() == src) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue