aboutsummaryrefslogtreecommitdiff
path: root/src/IRCBot.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-11 17:54:24 +0100
committerGravatar jesopo2019-09-11 17:54:24 +0100
commit81347fbba0ab9325321bc9e085b3354bb16512df (patch)
tree1815173d24fa5feb7fbdaa02b046f89ee62a45d3 /src/IRCBot.py
parentadd a helper utils.http.Client static object (diff)
signature
add IRCBot.http_client(), to allow modules to override default http client
Diffstat (limited to 'src/IRCBot.py')
-rw-r--r--src/IRCBot.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/IRCBot.py b/src/IRCBot.py
index 526484b8..8004cde2 100644
--- a/src/IRCBot.py
+++ b/src/IRCBot.py
@@ -59,6 +59,9 @@ class Bot(object):
self._events.on("timer.reconnect").hook(self._timed_reconnect)
+ def http_client(self):
+ return self._exports.get_one("http-client", utils.http.Client)
+
def _trigger_both(self):
self.trigger_read()
self.trigger_write()