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

Commit fbe19cf

Browse files
committed
Respond to invites if channel is in config
Allows ops to invite playbot back into the channel if it gets kicked, which sometimes happens due to flood limits.
1 parent 62a71cc commit fbe19cf

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)