SCRIPT_NAME, COLOR_CHAT_DELIMITERS, COLOR_RESET) # settings for opt, val in settings.iteritems(): if not weechat.config_is_set_plugin(opt): weechat.config_set_plugin(opt, val) # ------------------------------------------------------------------------- # Debug if weechat.config_get_plugin('debug'): try: # custom debug module I use, allows me to inspect script's objects. import pybuffer debug = pybuffer.debugBuffer(globals(), '%s_debug' % SCRIPT_NAME) except ImportError: def debug(s, *args): if not isinstance(s, basestring): s = str(s) if args: s = s %args prnt('', '%s\t%s' % (script_nick, s)) else: def debug(s, *args): pass # vim:set shiftwidth=4 tabstop=4 softtabstop=4 expandtab textwidth=100:
'ignore_update', '') # hook completer weechat.hook_completion('warn_patterns', '', 'warn_cmpl', '') # hook commands Warn().hook() # ------------------------------------------------------------------------- # Debug if weechat.config_get_plugin('debug'): try: # custom debug module I use, allows me to inspect script's objects. import pybuffer debug = pybuffer.debugBuffer(globals(), '%s_debug' % SCRIPT_NAME) except: def debug(s, *args): if not isinstance(s, basestring): s = str(s) if args: s = s % args prnt('', '%s\t%s' % (script_nick, s)) else: def debug(*args): pass # vim:set shiftwidth=4 tabstop=4 softtabstop=4 expandtab textwidth=100:
"get|show %(infos_info_list)", "cmd_infos", "", ) weechat.hook_completion("infos_info_list", "List of info names", "cmpl_infos_list", "") # ------------------------------------------------------------------------- # Debug if weechat.config_get_plugin("debug"): try: # custom debug module I use, allows me to inspect script's objects. import pybuffer debug = pybuffer.debugBuffer(globals(), "%s_debug" % SCRIPT_NAME) except ImportError: def debug(s, *args): if not isinstance(s, basestring): s = str(s) if args: s = s % args prnt("", "%s\t%s" % (script_nick, s)) else: def debug(s, *args): pass