Ejemplo n.º 1
0
def init():
	global randkickAccess
	host.registerHandler('ProcessCommand', onCommand)
	
	# configuration
	config = host.config()
	randkickAccess = config.getInt("p_randkick_access", randkickAccess)
Ejemplo n.º 2
0
 def __init__(self):
     config = host.config()
     self.dbHost = config.getString("db_server", self.dbHost)
     self.dbUser = config.getString("db_user", self.dbUser)
     self.dbPassword = config.getString("db_password", self.dbPassword)
     self.dbName = config.getString("db_database", self.dbName)
     self.dbPort = config.getInt("db_port", self.dbPort)
Ejemplo n.º 3
0
def init():
	global pounceAccess
	host.registerHandler('UserJoined', onJoin)
	host.registerHandler('ProcessCommand', onCommand)
	
	# configuration
	config = host.config()
	pounceAccess = config.getInt("p_pounce_access", pounceAccess)
Ejemplo n.º 4
0
def init():
    global pounceAccess
    host.registerHandler('UserJoined', onJoin)
    host.registerHandler('ProcessCommand', onCommand)

    # configuration
    config = host.config()
    pounceAccess = config.getInt("p_pounce_access", pounceAccess)
Ejemplo n.º 5
0
def init():
	global controlAccess
	
	host.registerHandler('ProcessCommand', onCommand)
	host.registerHandler('ChatReceivedExtended', onTalk) # extended to distinguish between local chat and whispers
	
	# configuration
	config = host.config()
	controlAccess = config.getInt("p_copycat_access", controlAccess)
Ejemplo n.º 6
0
def init():
    global controlAccess

    host.registerHandler('ProcessCommand', onCommand)
    host.registerHandler(
        'ChatReceivedExtended',
        onTalk)  # extended to distinguish between local chat and whispers

    # configuration
    config = host.config()
    controlAccess = config.getInt("p_copycat_access", controlAccess)
Ejemplo n.º 7
0
def init():
    global pdb, commandAccess

    host.registerHandler('ProcessCommand', onCommand, True)

    pdb = PluginDB()
    pdb.dbconnect()

    # configuration
    config = host.config()
    commandAccess = config.getInt("p_inactive_access", commandAccess)
Ejemplo n.º 8
0
def init():
	global minAccess, accessEnabled, accessBan
	
	host.registerHandler('UserJoined', onJoin)
	host.registerHandler('ProcessCommand', onCommand)
	
	# configuration
	config = host.config()
	minAccess = config.getInt("p_accesskick_minaccess", minAccess)
	accessEnabled = config.getBool("p_accesskick_enabled", accessEnabled)
	accessBan = config.getBool("p_accesskick_ban", accessBan)
Ejemplo n.º 9
0
def init():
	global pdb, commandAccess

	host.registerHandler('ProcessCommand', onCommand, True)
	
	pdb = PluginDB()
	pdb.dbconnect()
	
	# configuration
	config = host.config()
	commandAccess = config.getInt("p_inactive_access", commandAccess)
Ejemplo n.º 10
0
def init():
    global minAccess, maxAccess, greetAccess, greetMessage

    host.registerHandler('UserJoined', onJoin)
    host.registerHandler('ProcessCommand', onCommand)

    # configuration
    config = host.config()
    greetAccess = config.getInt("p_greet_access", greetAccess)
    minAccess = config.getInt("p_greet_minaccess", minAccess)
    maxAccess = config.getInt("p_greet_maxaccess", maxAccess)
    greetMessage = config.getString("p_greet_message", greetMessage)
Ejemplo n.º 11
0
def init():
    global pdb, controlAccess

    host.registerHandler('ProcessCommand', onCommand)
    host.registerHandler('Update', onUpdate)

    pdb = PluginDB()
    pdb.setPluginName("alarm")
    pdb.dbconnect()
    dbList()

    # configuration
    config = host.config()
    controlAccess = config.getInt("p_alarm_access", controlAccess)
Ejemplo n.º 12
0
def init():
    global pdb, controlAccess

    host.registerHandler("ProcessCommand", onCommand)
    host.registerHandler("Update", onUpdate)

    pdb = PluginDB()
    pdb.setPluginName("alarm")
    pdb.dbconnect()
    dbList()

    # configuration
    config = host.config()
    controlAccess = config.getInt("p_alarm_access", controlAccess)
Ejemplo n.º 13
0
def init():
	global announceAccess, announceMessage, announceEnabled, announceInterval
	
	host.registerHandler('ProcessCommand', onCommand)
	host.registerHandler('Update', onUpdate)
	
	# configuration
	config = host.config()
	announceAccess = config.getInt("p_announce_access", announceAccess)
	
	announceMessage = config.getString("p_announce_message", announceMessage)
	
	if announceMessage:
		announceEnabled = True
		announceInterval = config.getInt("p_announce_interval", announceInterval)
Ejemplo n.º 14
0
def init():
	global afkTime, afkAccess, afkKick, afkExempt
	
	host.registerHandler('ProcessCommand', onCommand)
	host.registerHandler('ChatReceivedExtended', onTalk) # extended to distinguish between local chat and whispers
	host.registerHandler('Update', onUpdate)
	host.registerHandler('UserLeft', onLeave)
	host.registerHandler('UserJoined', onJoin)
	
	# configuration
	config = host.config()
	afkTime = config.getInt("p_afk_time", afkTime / 1000) * 1000
	afkAccess = config.getInt("p_afk_access", afkAccess)
	afkKick = config.getBool("p_afk_kick", afkKick)
	afkExempt = config.getInt("p_afk_exempt", afkExempt)
Ejemplo n.º 15
0
Archivo: afk.py Proyecto: w3gh/pychop
def init():
    global afkTime, afkAccess, afkKick, afkExempt

    host.registerHandler('ProcessCommand', onCommand)
    host.registerHandler(
        'ChatReceivedExtended',
        onTalk)  # extended to distinguish between local chat and whispers
    host.registerHandler('Update', onUpdate)
    host.registerHandler('UserLeft', onLeave)
    host.registerHandler('UserJoined', onJoin)

    # configuration
    config = host.config()
    afkTime = config.getInt("p_afk_time", afkTime / 1000) * 1000
    afkAccess = config.getInt("p_afk_access", afkAccess)
    afkKick = config.getBool("p_afk_kick", afkKick)
    afkExempt = config.getInt("p_afk_exempt", afkExempt)
Ejemplo n.º 16
0
def init():
	global controlAccess
	host.registerHandler('ProcessCommand', onCommand, True)
	
	for name in startupLoad:
		importedPlugins[name] = __import__(name, globals(), locals(), [], -1)
		loadedPlugins[name] = importedPlugins[name]
		loadedPlugins[name].init()
	
	# configuration
	config = host.config()
	controlAccess = config.getInt("p_pluginman_access", controlAccess)
	startupConfLoad = config.getString("p_pluginman_plugins", "").split(" ")
	
	for name in startupConfLoad:
		if name.strip():
			name = ''.join(ch for ch in name.strip() if ch.isalnum() or ch == "_" or ch == "-")
			importedPlugins[name] = __import__(name, globals(), locals(), [], -1)
			loadedPlugins[name] = importedPlugins[name]
			loadedPlugins[name].init()