• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python xchat.hook_unload函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中xchat.hook_unload函数的典型用法代码示例。如果您正苦于以下问题:Python hook_unload函数的具体用法?Python hook_unload怎么用?Python hook_unload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了hook_unload函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setup

    def setup(self):
        # Register contact events raised by minbif.
        xchat.hook_print('Channel DeVoice', self.replicate_event, (1, 'is away'))
        xchat.hook_print('Channel Voice', self.replicate_event, (1, 'is back'))
        xchat.hook_print('Join', self.replicate_event, (0, 'has joined'))

        # The following is already notified.
        #xchat.hook_print('Quit', self.replicate_event, (0, 'has quit'))

        xchat.hook_unload(self.unload_cb)

        xchat.prnt('%s version %s by %s loaded' % (
                __module_name__, __module_version__, __author__))
开发者ID:dsoulayrol,项目名称:config,代码行数:13,代码来源:xchat-minbif.py


示例2: setup

    def setup(self):
        self._process = self._create_pipe()

        # Register timed check of screensaver status.
        self._hook = self._register_hook()

        xchat.hook_unload(self.unload_cb)

        # Register some commands.
        xchat.hook_command("xs_start_polling", self.on_start)
        xchat.hook_command("xs_stop_polling", self.on_stop)

        xchat.prnt('%s version %s by %s loaded' % (
                __module_name__, __module_version__, __author__))
开发者ID:dsoulayrol,项目名称:config,代码行数:14,代码来源:xchat-xscreensaver.py


示例3: __init__

    def __init__(self, reg_hooks=True):
        # Maps networks to a dict of their active channels against their
        # ChannelCollector objects
        #: @type: dict from str to (dict from str to ChannelCollector)
        self.networks = defaultdict(
            lambda: DefaultDict(lambda channel: ChannelCollector(channel)))

        xchat.prnt('%sYak\'s Highlight Collector loaded! :D' % LOG_TAG)
        if reg_hooks:
            def hook(evt, highlight=False, action=False, me=False):
                xchat.hook_print(evt, self.hook, (highlight, action, me))
            hook(EVENT_CHANNEL_MESSAGE)
            hook(EVENT_CHANNEL_MESSAGE_HIGHLIGHT, True)
            hook(EVENT_CHANNEL_ACTION, action=True)
            hook(EVENT_CHANNEL_ACTION_HIGHLIGHT, True, True)
            hook(EVENT_YOUR_MESSAGE, me=True)
            hook(EVENT_YOUR_ACTION, action=True, me=True)

            xchat.hook_unload(self.on_unload)
开发者ID:theY4Kman,项目名称:yakhilite,代码行数:19,代码来源:yakhilite.py


示例4: __init__

 def __init__(self):
     self.id_dh = {}
     self.hooks = [
         xchat.hook_command('', self.on_send_message),
         xchat.hook_command('ME', self.on_send_me),
         xchat.hook_command('MSG', self.on_send_msg),
         xchat.hook_command('NOTICE', self.on_send_notice),
         xchat.hook_server('notice', self.on_recv_notice, priority=xchat.PRI_HIGHEST),
         xchat.hook_print('Change Nick', self.on_change_nick),
         xchat.hook_unload(self.unload),
     ]
     for name in (
         'Channel Action', 'Private Action to Dialog', 'Private Action', 'Channel Message',
         'Private Message to Dialog', 'Private Message'
     ):
         xchat.hook_print(name, self.on_recv_message, name, priority=xchat.PRI_HIGHEST),
开发者ID:simonzack,项目名称:hexfish,代码行数:16,代码来源:plugin.py


示例5: addJob

	xchat.prnt("Last error: " + LAST_ERROR)
xchat.hook_command("LASTERROR", readError, help = "/LASTERROR - prints out the last error message to screen locally.")

'''
	Adds a new translation job to the queue.
'''
def addJob(word, word_eol, userdata):
	channel = xchat.get_info('channel')
	key = channel + " " + word[0].lower()

	if(AUTOUSER.has_key(key)):
		dest, src = AUTOUSER[key]
		ThreadController.addJob((xchat.get_context(), word[0], src, dest, word[1]))

	return xchat.EAT_NONE

xchat.hook_print("Channel Message", addJob)

'''
	Shuts down the threads and thread controller when unloading the module.
'''
def unload_translator(userdata):
	ThreadController.worker.kill = True
	ThreadController.addJob(None)
	print 'Translator is unloaded'

xchat.hook_unload(unload_translator)

# Load successful, print message
print 'Translator script loaded successfully.'
开发者ID:MauricioLucas,项目名称:xchat-translator,代码行数:30,代码来源:xChatTranslator.py


示例6: otcauth_unload_cb

		eauthCheck = True
	elif switch == "bauth":
		xchat.prnt("RESERVED FOR FUTURE FUNCTIONALITY")
	else:
		xchat.prnt("\002\00304Invalid Option:\00304\002 %s not defined" % (word[1]))
	
	return xchat.EAT_XCHAT
	
# Hook our functions to the callback handler
xchat.hook_command("OTCTK", otcauth_cb, help="'/OTCTK help' for more help")

# An unload callback function to clean up 
def otcauth_unload_cb(userdata):
	# Remove our MENU's 
	xchat.command('MENU DEL "OTC Toolkit/GPG EAuth" "otctk eauth"')
	xchat.command('MENU DEL "OTC Toolkit/-"')
	xchat.command('MENU DEL "OTC Toolkit/Get Voice"')
	xchat.command('MENU DEL "OTC Toolkit"')

	# Remove nicklist popup menus
	xchat.command('MENU DEL "$NICK/OTC Toolkit/Get WoT Rating"')
	xchat.command('MENU DEL "$NICK/OTC Toolkit/GPG Information"')
	xchat.command('MENU DEL "$NICK/OTC Toolkit"')
	
	# Print out our unloaded message.
	xchat.prnt("\002\00302%s:\00302 \00304[[[UNLOADED]]]\00304\002" % __module_name__)
	return xchat.EAT_XCHAT
	
# And hook into our unload event
xchat.hook_unload(otcauth_unload_cb)
开发者ID:Ex0deus,项目名称:xchat_otc_toolkit,代码行数:30,代码来源:otc_tk.py


示例7: unload_cb

                            #respuestas = remoto[1].split(",")
                            xchat.command("say Esto no esta implementado aun")
                        else:
                            xchat.command("say {0}".format(remoto[1]))


##############################################################################
## Definimos la funcion para la descarga del programa
##############################################################################
def unload_cb(userdata):
    """Esta funcion debe desenlazar todas las funciones del modulo al
    descargarse el script.
    Argumentos:
    userdata -- variable opcional que se puede enviar a un hook (ignorado)
    """
    # Desconectamos los comandos
    # Controles remotos
    xchat.unhook(HOOKREMOTO)
    # Descarga
    xchat.unhook(HOOKREMOTOS)


##############################################################################
## Conectamos los "lanzadores" de xchat con las funciones que hemos definido
## para ellos
##############################################################################
# Controles remotos
HOOKREMOTO = xchat.hook_server('PRIVMSG', remoto_cb)
# Descarga del script
HOOKREMOTOS = xchat.hook_unload(unload_cb)
开发者ID:GatoLoko,项目名称:GatoScript,代码行数:30,代码来源:remotes.py


示例8: Rules

            noteType=notif,
            title=title,
            description=message,
            sticky=False,
            icon=icon,
            priority=1,)

# Initialize Alert Object
sufix = '...'
print __module_name__ + ": Initializing" + sufix
rules = Rules()
alerts = SmartAlert(rules)

# Hook Print Events
print __module_name__ + ": Loading hooks" + sufix

# Possible Event binds:
# Your Message
# Message Send -- when sending a priv message
# Private Message
# Private Message to Dialog
# Generic Message -- doesn't seem to work -- probably only at server level
# Channel Message

# add channel hooks on join... also unloads and reloads every join...
# prevents floods!
xchat.hook_command('SMARTALERT', alerts.command, userdata=None, priority=xchat.PRI_HIGHEST)
xchat.hook_server('JOIN', alerts.joiner, userdata=None, priority=xchat.PRI_HIGHEST)
alerts.xchatHook()
xchat.hook_unload(alerts.unload)
开发者ID:dingus9,项目名称:xchat-smartAlert,代码行数:30,代码来源:smartAlert.py


示例9: len

        if len(word) >= 3 and word[2] != '--network':
            if word_eol[2]=="1" or word_eol[2]=="True" or word_eol[2]=="true":
                key.aes = True
            if word_eol[2]=="0" or word_eol[2]=="False" or word_eol[2]=="false":
                key.aes = False
            KEY_MAP[id_] = key
        elif len(word) >= 5 and word[2] == '--network':
            if word_eol[4]=="1" or word_eol[4]=="True" or word_eol[4]=="true":
                key.aes = True
            if word_eol[4]=="0" or word_eol[4]=="False" or word_eol[4]=="false":
                key.aes = False
        print 'Key aes', id_, 'set', key.aes
        return xchat.EAT_ALL

import xchat
xchat.hook_command('key', key, help='show information or set key, /key <nick> [<--network> <network>] [new_key]')
xchat.hook_command('key_exchange', key_exchange, help='exchange a new key, /key_exchange <nick>')
xchat.hook_command('key_list', key_list, help='list keys, /key_list')
xchat.hook_command('key_load', key_load, help='load keys, /key_load')
xchat.hook_command('key_pass', key_pass, help='set key file pass, /key_pass password')
xchat.hook_command('aes', aes, help='aes #channel/nick 1|0 or True|False')
xchat.hook_command('key_remove', key_remove, help='remove key, /key_remove <nick>')
xchat.hook_server('notice', dh1080)
xchat.hook_print('Channel Message', decrypt_print, 'Channel Message')
xchat.hook_print('Change Nick', change_nick)
xchat.hook_print('Private Message to Dialog', decrypt_print, 'Private Message to Dialog')
xchat.hook_server('332', server_332)
xchat.hook_command('', encrypt_privmsg)
xchat.hook_unload(unload)
load()
开发者ID:Sharker,项目名称:XChat-FiSH-AES,代码行数:30,代码来源:XChat_AES.py


示例10: select

    #try:
    reason = select((
                     'Goodbye!','See you later.','Cya.','Bye.','Later!',
                     'Kindergarden is elsewhere!','Ugh. BYE!','G\'day',
                     'Seeya later!','Be gone!','This is awkward. Bye.',
                     'I didn\'t do it!'
                    ))
    if len(word) == 2:
        # Assume they supplied a username
        return xchat.command('kick %s %s' % (word[1], reason))
    elif len(word) == 1:
        # Assume they want a random user
        list = xchat.get_list("users") 
        if not list:
            return xchat.prnt(help)
        user = select((list))
        return xchat.command('kick %s %s' % (user.nick, reason))
    else:
        # Assume they entered some weird stuff
        return xchat.prnt(help)
    #except:
    #    xchat.prnt(help)
    
    return xchat.EAT_ALL

def onUnload(userdata):
    xchat.prnt('%s%s has been unloaded.' % (c, __module_name__))

xchat.hook_command('rkick', rkick, help=help)
xchat.hook_unload(onUnload)
开发者ID:Jake0720,项目名称:XChat-Scripts,代码行数:30,代码来源:Randomkick.py


示例11: test

	else:
		xchat.prnt('Found %s' % version)
		ircrypt_options['BINARY'] = ircrypt_gpg_binary

def test(word, word_eol, userdata):


	xchat.prnt(word[-2])
	return xchat.EAT_ALL

# Initialize
ircrypt_init()

# Chek if gpg binary is set
ircrypt_check_binary()

# hook for ircrypt command
xchat.hook_command('ircrypt', ircrypt_command_hook, help=ircrypt_help_text)

# hook for encryption
xchat.hook_command('', ircrypt_encrypt_hook)

# hook for decryption
xchat.hook_print('Channel Message', ircrypt_decrypt_hook, 'Channel Message')

# hook to check for asymmetric encryption in notices
xchat.hook_print('Notice', ircrypt_notice_hook)

# Unload
xchat.hook_unload(ircrypt_unload)
开发者ID:lordi,项目名称:ircrypt-xchat,代码行数:30,代码来源:ircrypt.py


示例12: elif

				text = undobuflist.pop()
			hexchat.command('settext {}'.format(text))
			hexchat.command('setcursor {}'.format(len(text)))

			redobuflist.append(text)

		except IndexError: pass # No undos left

	elif ((key, mod) == ('121', ctrlmod) or # ctrl+y
			(key, mod) == ('90', shiftctrlmod)): # ctrl+shift+z 
		try:
			text = redobuflist.pop()
			if text == inputtext:
				text = redobuflist.pop()
			hexchat.command('settext {}'.format(text))
			hexchat.command('setcursor {}'.format(len(text)))

		except IndexError: pass

	else:
		# Just throw anything else in here if it has changed
		if not undobuflist or undobuflist[-1] != inputtext:
			undobuflist.append(inputtext)

def unload_cb(userdata):
	print(__module_name__, 'version',  __module_version__, 'unloaded.')

hexchat.hook_print('Key Press', keypress_cb) 
hexchat.hook_unload(unload_cb)
print(__module_name__, 'version',  __module_version__, 'loaded.')
开发者ID:BFCatalin,项目名称:plugins,代码行数:30,代码来源:undo.py


示例13: label

      def label(self, line, align="left"):
          """ Stampa i label del layout """
          c = 0
          for l in line:
               maxchars = self.table[c][1]
               label = len(l[0]) > self.table[c][1] and "%s...." % \
                                                      l[0][:maxchars-4] or l[0]
               print '\x0301,00', label.ljust(l[1], " "),
               c += 1
          print

      def write(self, line, align="left", delimiter=" "):
          """ Stampa i campi della tabella """
          c = 0
          for l in line:
               maxchars = self.table[c][1]
               str = len(l) > self.table[c][1] and "%s...." % \
                                                            l[:maxchars-4] or l
               strlen = len(str)

               if align == 'left': print str.ljust(maxchars, delimiter),
               else: print str.rust(maxchars, delimiter)
               c += 1
          print

mp3blocker = mp3filter()
cososwap = mp3filter.debug_swap
xchat.hook_unload(mp3blocker.unload)

开发者ID:hiryu85,项目名称:xchat_filter_mp3_advices,代码行数:28,代码来源:mp3filter.py


示例14: printStats

        printStats(nick, data)
    
    return xchat.EAT_NONE 
        
def printStats(nick, data):
    msgOut = []
    msgOut.append("Statistiche del giono %s" % data)
    msgOut.append("Grafico join: %s" % makeChartOfDayJoin(data))
    for joinOra in userList[data]['stats']['joins']:
        msgOut.append("Join alle ore %s: %s" % 
                      (joinOra, str(userList[data]['stats']['joins'][joinOra])))
    msgOut.append("Grafico utenti online: %s" % makeChartOfDay(data))
    for onlineOra in userList[data]['stats']['online']:
        msgOut.append("Online alle ore %s: %s" % 
                      (onlineOra, str(userList[data]['stats']['online'][onlineOra])))
    msgOut.append("Totale utenti unici: %s" % str(len(userList[data]['users'])))
    for messageOut in msgOut:
        channelObj.command('notice %s %s' % (nick, messageOut))
        
def saveState(data):
    cPickle.dump(userList, open('ffstats.p','w'))
    
channelObj = xchat.find_context(channel='#forumfree') 
getUserList()
xchat.hook_server('JOIN', onJoin)
xchat.hook_server('PART', onPart)
#xchat.hook_server('KICK', onPart)
xchat.hook_server('PRIVMSG', onMsg)

xchat.hook_unload(saveState)
开发者ID:SimoneManduchi,项目名称:forumfreeskin,代码行数:30,代码来源:ffutenza.py


示例15: _

ascii["furiosa"]	=["   (__)","   (\\/)","    \\/"]
ascii["ambiciosa"]	=["   (__)","   ($$)","    \\/"]
ascii["aburrida"]	=["   (__)","   (--)","    \\/"]
ascii["guerrilla"]	=["   (__)","   (oo)","  / \\/ \\"," D===b=-----"]
ascii["flaca"]		=[" _(~)_","  )\"("," (@[email protected])","  ) (  autor:hjw"]
ascii["rellenita"]	=["  _ (.\".) _"," '-'/. .\\'-'","   ( o o )","    `\"-\"`   autor:jgs"]

xchat.command("MENU -p5 ADD Huayra")
xchat.command("MENU ADD Huayra/AsciiArt")
xchat.command("MENU ADD Huayra/AsciiArt/Panadero1 \".asciihuayra panadero1\"")
xchat.command("MENU ADD Huayra/AsciiArt/Panadero2 \".asciihuayra panadero2\"")
xchat.command("MENU ADD Huayra/AsciiArt/Netbook \".asciihuayra netbook\"")
xchat.command("MENU ADD Huayra/AsciiArt/Vaquita \".asciihuayra vaquita\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Inexpresiva \".asciihuayra inexpresiva\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Hipnotizada \".asciihuayra hipnotizada\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Muerta \".asciihuayra muerta\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Sarcástica \".asciihuayra sarcastica\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Incredula \".asciihuayra incredula\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Furiosa \".asciihuayra furiosa\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Ambiciosa \".asciihuayra ambiciosa\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Aburrida \".asciihuayra aburrida\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Guerrilla \".asciihuayra guerrilla\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Estilizadas")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Estilizadas/Flaca \".asciihuayra flaca\"")
xchat.command("MENU ADD Huayra/AsciiArt/Emotica/Estilizadas/Rellenita \".asciihuayra rellenita\"")

__unhook__ = xchat.hook_command(".asciihuayra",dispatch,help="Ascii Art de vacas y panaderos.")

xchat.hook_unload(unload_ah)
开发者ID:sjlvanq,项目名称:xchat-plugins,代码行数:30,代码来源:asciihuayra.py


示例16: growlnotify

	if nick in word[1] or hostip in word[1]:
		growlnotify('Banned',
		'You have been banned by ' + word[0])

def tray_callback(word, word_eol, userdata):
	if len(word) > 3 and word[1] == '-b':
		growlnotify('Custom', word[2], word_eol[3], 1)
		return xchat.EAT_ALL

def unload_callback(userdata):
	xchat.prnt(__module_name__ + ' version ' + __module_version__ + ' unloaded.')

# get events from hexchat to call notifications
xchat.hook_print("Channel Msg Hilight", hilight_callback)
xchat.hook_print("Channel Action Hilight", hilight_callback)
xchat.hook_print("Private Message to Dialog", pm_callback)
xchat.hook_print("Private Action to Dialog", pm_callback)
xchat.hook_print("Invited", invited_callback)
xchat.hook_print("Notice", servernotice_callback)
xchat.hook_print("Notify Online", onlinenotify_callback)
xchat.hook_print("Topic Change", topic_callback)
xchat.hook_print("You Kicked", kicked_callback)
xchat.hook_print("Killed", killed_callback)
xchat.hook_print("Channel Ban", banned_callback)
# hook the tray command for other scripts to use
xchat.hook_command("tray", tray_callback)
# just to print its unloaded
xchat.hook_unload(unload_callback)
# Nothing broke yet, its loaded! =)
xchat.prnt(__module_name__ + ' version ' + __module_version__ + ' loaded.')
开发者ID:BFCatalin,项目名称:plugins,代码行数:30,代码来源:growl.py


示例17: float

            else:
                temp_db_size = 0
            db_file = xchat.get_info("xchatdir") + "/seen.db"
            temp_db_file = xchat.get_info("xchatdir") + "/seen.db-journal"
        xchat.prnt(
            "\x02\x0313Seen database info\x02:\n"
            "\x0313\x02Size\x02: %.2fKB\n"      #1
            "\x0313\x02Temp Size\x02: %.2fKB\n" #2
            "\x0313\x02Entries\x02: %d\n"       #3
            "\x0313\x02File\x02: %s\n"          #4
            "\x0313\x02Temp File\x02: %s\n"     #5
            "\x0313\x02Version\x02: %s\n"       #6
            %(
            float(db_size/1024.0),              #1
            float(temp_db_size/1024.0),         #2
            int(num_of_entrys),                 #3
            db_file,                            #4
            temp_db_file,                       #5
            __module_version__                  #6
            ))

seen = Seen()
xchat.hook_unload(seen.on_unload)
xchat.hook_server("PRIVMSG", seen.parse)
xchat.hook_command("seen", seen.lastseen)
xchat.hook_command("seen->info", seen.info)
xchat.hook_command("seen->commit", seen.commit)
xchat.prnt("%s version %s by %s has been loaded." % (__module_name__, __module_version__, __module_author__))
seen.info();
# xchat.prnt("\x02\x0304Note: NEVER LOAD THIS MORE THEN ONCE! IF YOU NEED TO RELOAD IT MAKE SURE TO UNLOAD IT FIRST!!\x02\x03")
开发者ID:AwwCookies,项目名称:xchat-plugin-seen,代码行数:30,代码来源:seen.py


示例18: unloading

		except:
			xchat.prnt("Sorry, you need to input a time in seconds")
	elif word[1][0:3] == "off":
		if active == 1:
			active = 0
			xchat.prnt("Module turned off!")
		else:
			xchat.prnt("Module already disabled!")
	elif word[1][0:2] == "on":
		if active == 0:
			active = 1
			lastcommand = 0
			xchat.prnt("Module turned on!")
		else:
			xchat.prnt("Module already enabled!")
	return xchat.EAT_ALL

def unloading(userdata):
	xchat.prnt("Unloading Dict module...")

# These are all XChat specific functions
xchat.hook_print("Channel Msg Hilight", they_say)
xchat.hook_print("Channel Message", they_say)
xchat.hook_print("Private Message to Dialog", they_say)
xchat.hook_print("Your Message", me_say)
xchat.hook_command("dict", set_vars)
xchat.hook_unload(unloading)

# Print success on load
xchat.prnt("Dict loaded successfully.")
开发者ID:10crimes,项目名称:code,代码行数:30,代码来源:dict.py


示例19: defab_callback

        return hexchat.EAT_ALL

def defab_callback(word, word_eol, user_data):
        global fab_hook
        
        if fab_hook is not None:
                hexchat.unhook(fab_hook)
                fab_hook = None
                hexchat.prnt('Fabulous mode off')
        
        return hexchat.EAT_ALL

def fab_passthru_callback(word, word_eol, user_data):
        global in_fab_hook
        
        if in_fab_hook:
                return hexchat.EAT_NONE
        else:
                hexchat.command('fab {0}'.format(word_eol[0]))
                
                return hexchat.EAT_ALL
def onUnload(userdata):
        hexchat.prnt('%s has been unloaded.' % __module_name__)

hexchat.hook_command('fab', fab_callback, help=fabhelp)
hexchat.hook_command('fab2', fab2_callback, help=fab2help)
hexchat.hook_command('spoiler', spoiler_callback, help=spoilerhelp)
hexchat.hook_command('enfab', enfab_callback, help=enfabhelp)
hexchat.hook_command('defab', defab_callback, help=defabhelp)
hexchat.hook_unload(onUnload)
开发者ID:Jake0720,项目名称:XChat-Scripts,代码行数:30,代码来源:rainbowtext.py


示例20: any

		pass
	elif any(word[2] == stopcmd for stopcmd in stopcommands):
		mySyntax = " "
		moreInfoLines = ["Terminates all livestreamer processes"]
	if len(mySyntax) > 0:
		haveTopic = True
	else:
		haveTopic = False
	if len(moreInfoLines) > 0:
		haveMoreInfo = True
	else:
		haveMoreInfo = False
	if haveTopic:
		print("Usage: /xstream {0} {1}".format(word[2], mySyntax))
	if haveMoreInfo:
		for nextLine in moreInfoLines:
			print("{0}".format(nextLine))
	if not haveTopic and len(word) >= 3:
		print("Sorry, I don't have any help topics for {0}".format(word_eol[2]))
	return xchat.EAT_ALL

def unload_xstream(userdata):
	print("{0} unloaded".format(__module_name__))

xchat.hook_unload(unload_xstream)
xchat.hook_command("xstream", main, help="Usage: /xstream (<channel>) (<quality>) (<server>)")
xchat.hook_command("livestreamer", main, help="Usage: /livestreamer (<channel>) (<quality>) (<server>)")
xchat.hook_command("xs", main, help="Usage: /xs (<channel>) (<quality>) (<server>)")

print("{0} {1} loaded".format(__module_name__, __module_version__))
开发者ID:Soulflare3,项目名称:spawncamping-octo-bugfixes,代码行数:30,代码来源:xstream.py



注:本文中的xchat.hook_unload函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python xchat.prnt函数代码示例发布时间:2022-05-26
下一篇:
Python xchat.hook_timer函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap