.BANCHO. Configurable IRC hostname
This commit is contained in:
		| @@ -57,6 +57,7 @@ class config: | ||||
|  | ||||
| 			self.config.get("irc","enable") | ||||
| 			self.config.get("irc","port") | ||||
| 			self.config.get("irc","hostname") | ||||
|  | ||||
| 			self.config.get("localize","enable") | ||||
| 			self.config.get("localize","ipapiurl") | ||||
| @@ -104,6 +105,7 @@ class config: | ||||
| 		self.config.add_section("irc") | ||||
| 		self.config.set("irc", "enable", "1") | ||||
| 		self.config.set("irc", "port", "6667") | ||||
| 		self.config.set("irc", "hostname", "ripple") | ||||
|  | ||||
| 		self.config.add_section("localize") | ||||
| 		self.config.set("localize", "enable", "1") | ||||
|   | ||||
| @@ -516,7 +516,8 @@ class Client: | ||||
|  | ||||
| class Server: | ||||
| 	def __init__(self, port): | ||||
| 		self.host = socket.getfqdn("127.0.0.1")[:63] | ||||
| 		#self.host = socket.getfqdn("127.0.0.1")[:63] | ||||
| 		self.host = glob.conf.config["irc"]["hostname"] | ||||
| 		self.port = port | ||||
| 		self.clients = {}  # Socket --> Client instance. | ||||
| 		self.motd = ["Welcome to pep.py's embedded IRC server!", "This is a VERY simple IRC server and it's still in beta.", "Expect things to crash and not work as expected :("] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user