add a timeout (wtimeout) param to wait_for
This commit is contained in:
parent
331b497c8a
commit
0fc66f7f7b
1 changed files with 3 additions and 2 deletions
|
@ -266,7 +266,8 @@ class Server(IServer):
|
||||||
|
|
||||||
async def wait_for(self,
|
async def wait_for(self,
|
||||||
response: Union[IMatchResponse, Set[IMatchResponse]],
|
response: Union[IMatchResponse, Set[IMatchResponse]],
|
||||||
sent_aw: Optional[Awaitable[SentLine]]=None
|
sent_aw: Optional[Awaitable[SentLine]]=None,
|
||||||
|
wtimeout: float=WAIT_TIMEOUT
|
||||||
) -> Line:
|
) -> Line:
|
||||||
|
|
||||||
response_obj: IMatchResponse
|
response_obj: IMatchResponse
|
||||||
|
@ -292,7 +293,7 @@ class Server(IServer):
|
||||||
return (await our_wait_for)
|
return (await our_wait_for)
|
||||||
|
|
||||||
async def _on_send_line(self, line: Line):
|
async def _on_send_line(self, line: Line):
|
||||||
if (line.command == "PRIVMSG" and
|
if (line.command in ["PRIVMSG", "NOTICE", "TAGMSG"] and
|
||||||
not self.cap_agreed(CAP_ECHO)):
|
not self.cap_agreed(CAP_ECHO)):
|
||||||
new_line = line.with_source(self.hostmask())
|
new_line = line.with_source(self.hostmask())
|
||||||
emit = self.parse_tokens(new_line)
|
emit = self.parse_tokens(new_line)
|
||||||
|
|
Loading…
Add table
Reference in a new issue