Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit d83db57

Browse files
authored
Merge pull request #235 from programble/feature/playbot-invite
Playbot: respond to invites if channel is in config
2 parents 62a71cc + fbe19cf commit d83db57

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bin/playbot.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ fn main() {{
205205
self.handle_privmsg(from, &msg);
206206
}
207207
},
208+
Command::INVITE(_, ref to) => {
209+
if cloned.config().channels.as_ref().unwrap().contains(to) {
210+
if let Err(e) = self.conn.send_join(to) {
211+
error!("couldn't join {}: {}", to, e);
212+
}
213+
}
214+
},
208215
_ => {},
209216
}
210217
}

0 commit comments

Comments
 (0)