Ejemplo n.º 1
0
	def verifyConfig(self, config):
		if "client_join_on_connect" in config:
			if not isinstance(config["client_join_on_connect"], list):
				raise ConfigValidationError("client_join_on_connect", "value must be a list")
			for chanName in config["client_join_on_connect"]:
				if chanName[0] != "#":
					chanName = "#{}".format(chanName)
				if not isValidChannelName(chanName):
					raise ConfigValidationError("client_join_on_connect", "\"{}\" is an invalid channel name".format(chanName))
Ejemplo n.º 2
0
 def verifyConfig(self, config):
     if "client_join_on_connect" in config:
         if not isinstance(config["client_join_on_connect"], list):
             raise ConfigValidationError("client_join_on_connect",
                                         "value must be a list")
         for chanName in config["client_join_on_connect"]:
             if chanName[0] != "#":
                 chanName = "#{}".format(chanName)
             if not isValidChannelName(chanName):
                 raise ConfigValidationError(
                     "client_join_on_connect",
                     "\"{}\" is an invalid channel name".format(chanName))
Ejemplo n.º 3
0
	def __init__(self, ircd, name):
		if not isValidChannelName(name):
			raise InvalidChannelNameError
		self.ircd = ircd
		self.name = name[:self.ircd.config.get("channel_name_length", 64)]
		self.users = WeakKeyDictionary()
		self.modes = {}
		self.existedSince = now()
		self.topic = ""
		self.topicSetter = ""
		self.topicTime = now()
		self._metadata = CaseInsensitiveDictionary()
		self.cache = {}
Ejemplo n.º 4
0
 def __init__(self, ircd, name):
     if not isValidChannelName(name):
         raise InvalidChannelNameError
     self.ircd = ircd
     self.name = name[:self.ircd.config.get("channel_name_length", 64)]
     self.users = WeakKeyDictionary()
     self.modes = {}
     self.existedSince = now()
     self.topic = ""
     self.topicSetter = ""
     self.topicTime = now()
     self._metadata = CaseInsensitiveDictionary()
     self.cache = {}