Request a channel join and enter JOINING state.
(
self, channel: str, key: Optional[str] = None
)
| 209 | return actions |
| 210 | |
| 211 | def request_join( |
| 212 | self, channel: str, key: Optional[str] = None |
| 213 | ) -> list[IRCAction]: |
| 214 | """Request a channel join and enter JOINING state.""" |
| 215 | self.state = IRCState.JOINING |
| 216 | |
| 217 | if key: |
| 218 | return [ |
| 219 | IRCAction(IRCActionKind.SEND, line=f"JOIN {channel} {key}") |
| 220 | ] |
| 221 | return [IRCAction(IRCActionKind.SEND, line=f"JOIN {channel}")] |
| 222 | |
| 223 | def request_quit(self, message: str) -> list[IRCAction]: |
| 224 | """Request a quit and enter QUITTING state.""" |