UrlShortenerPlugin. coding style
This commit is contained in:
@@ -32,13 +32,12 @@ class UrlShortenerPlugin(GajimPlugin):
|
||||
'MAX_CHARS': (50, ('MAX_CHARS(30-...)')),
|
||||
'IN_MAX_CHARS': (50, ('MAX_CHARS(30-...)')),
|
||||
'SHORTEN_OUTGOING': (False, ''),}
|
||||
self.events_handlers['message-outgoing'] = (ged.OUT_PRECORE,
|
||||
self.handle_outgoing_msg)
|
||||
self.events_handlers['gc-message-outgoing'] = (ged.OUT_PRECORE,
|
||||
self.handle_outgoing_msg)
|
||||
self.events_handlers = {'message-outgoing': (ged.OUT_PRECORE,
|
||||
self.handle_outgoing_msg),
|
||||
'gc-message-outgoing': (ged.OUT_PRECORE,
|
||||
self.handle_outgoing_msg)}
|
||||
self.chat_control = None
|
||||
self.controls = []
|
||||
self.is_active = None
|
||||
|
||||
def handle_outgoing_msg(self, event):
|
||||
if not self.active:
|
||||
@@ -99,12 +98,6 @@ class UrlShortenerPlugin(GajimPlugin):
|
||||
control.disconnect_from_chat_control()
|
||||
self.controls.remove(control)
|
||||
|
||||
def activate(self):
|
||||
self.active = True
|
||||
|
||||
def deactivate(self):
|
||||
self.active = False
|
||||
|
||||
|
||||
class Base(object):
|
||||
def __init__(self, plugin, chat_control):
|
||||
|
||||
Reference in New Issue
Block a user