Ejemplo n.º 1
0
    def __change_context(self):
        old_ctx = lib.hexchat_get_context(lib.ph)
        if not self.set():
            # XXX: Behavior change, previously used wrong context
            lib.hexchat_print(lib.ph, b'Context object refers to closed context, ignoring call')
            return

        yield
        lib.hexchat_set_context(lib.ph, old_ctx)
Ejemplo n.º 2
0
    def __change_context(self):
        old_ctx = lib.hexchat_get_context(lib.ph)
        if not self.set():
            # XXX: Behavior change, previously used wrong context
            lib.hexchat_print(lib.ph, b'Context object refers to closed context, ignoring call')
            return

        yield
        lib.hexchat_set_context(lib.ph, old_ctx)
Ejemplo n.º 3
0
 def set(self):
     # XXX: API addition, C plugin silently ignored failure
     return bool(lib.hexchat_set_context(lib.ph, self._ctx))
Ejemplo n.º 4
0
 def set(self):
     # XXX: API addition, C plugin silently ignored failure
     return bool(lib.hexchat_set_context(lib.ph, self._ctx))