From 968d43affe36fe38d6bb390aaa3ab0f08b66f863 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sat, 5 Nov 2016 17:03:22 +0300 Subject: [PATCH] utox send inline plugin --- README.md | 1 + uToxInlineSending/uin.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 uToxInlineSending/uin.py diff --git a/README.md b/README.md index eb3cd0f..5cc653a 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,5 @@ For more info visit [plugins.md](https://github.com/toxygen-project/toxygen/blob - Chess - play chess with your friends using Tox. - Garland - changes your status like it's garland. - AutoAnswer - calls auto answering. +- uToxInlineSending - send inlines with the same name as uTox does. diff --git a/uToxInlineSending/uin.py b/uToxInlineSending/uin.py new file mode 100644 index 0000000..10becc8 --- /dev/null +++ b/uToxInlineSending/uin.py @@ -0,0 +1,19 @@ +import plugin_super_class + + +class uToxInlineSending(plugin_super_class.PluginSuperClass): + + def __init__(self, *args): + super(uToxInlineSending, self).__init__('uToxInlineSending', 'uin', *args) + self._tmp = None + + def stop(self): + self._profile.send_screenshot = self._tmp + + def start(self): + self._tmp = self._profile.send_screenshot + + def func(data): + self._profile.send_inline(data, 'utox-inline.png') + + self._profile.send_screenshot = func