Exemplo n.º 1
0
def loadConfig():
	for location in core.CONFIGLOCATIONS:
		try:
			cfgfile=location+core.CONFIGFILE
			log.edebug("Attempting to load config from %s", cfgfile)
			loadFile(cfgfile)
			return
		except IOError as e:
			log.edebug("Failed! %s", str(e))
	raise ConfigError("Failed to load any valid config files!")
Exemplo n.º 2
0
	def send(self, data):
		if self.sock is None: return False
		log.edebug("[>>>%s] %s", self.name, data.strip())
		return self.sock.send(data)
Exemplo n.º 3
0
	def lostConnection(self, reason):
		log.edebug("%s: Lost connection: %s", self.name, reason)
		event.trigger('Server/Disconnect/'+self.name, net=self, reason=reason)
		self.disconnect()