Make IRCClient into a context manager

For now just a placeholder, will properly do it later.
This commit is contained in:
Vgr E. Barry 2016-11-02 16:14:23 -04:00
parent 04e7f952d3
commit e1d3e1150b

View File

@ -108,6 +108,12 @@ class IRCClient:
self.command_handler = cmd_handler
self._end = 0
def __enter__(self):
return self
def __exit__(self, exc, value, tb):
return False # TODO: make this into a proper context manager
def send(self, *args, **kwargs):
""" send a message to the connected server. all arguments are joined
with a space for convenience, for example the following are identical