def init(): global randkickAccess host.registerHandler('ProcessCommand', onCommand) # configuration config = host.config() randkickAccess = config.getInt("p_randkick_access", randkickAccess)
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)
def init(): global pounceAccess host.registerHandler('UserJoined', onJoin) host.registerHandler('ProcessCommand', onCommand) # configuration config = host.config() pounceAccess = config.getInt("p_pounce_access", pounceAccess)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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()