summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-12-03 14:31:01 +1030
committerdaniel-Jones <daniel@danieljon.es>2017-12-03 14:31:01 +1030
commit4eaba9e9a754213f52d15787f1fe334b5d8d6361 (patch)
treee5ab00f1b82beb858694b5933ca5bcfb292406b2 /miniircd
parent7a863708016e4dcc7f35d6aaaee59c544140d646 (diff)
downloadminiircd-4eaba9e9a754213f52d15787f1fe334b5d8d6361.tar.gz
miniircd-4eaba9e9a754213f52d15787f1fe334b5d8d6361.zip
fixed host leak in /who
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd10
1 files changed, 1 insertions, 9 deletions
diff --git a/miniircd b/miniircd
index c7b07ec..6860f29 100755
--- a/miniircd
+++ b/miniircd
@@ -35,7 +35,6 @@ from optparse import OptionParser
VERSION = "1.2.1"
-
PY3 = sys.version_info[0] >= 3
if PY3:
@@ -51,12 +50,10 @@ else:
def socket_to_buffer(buf):
return buf
-
def create_directory(path):
if not os.path.isdir(path):
os.makedirs(path)
-
class Channel(object):
def __init__(self, server, name):
self.server = server
@@ -119,7 +116,6 @@ class Channel(object):
fp.close()
os.rename(path, self._state_path)
-
class Client(object):
__linesep_regexp = re.compile(r"\r?\n")
# The RFC limit for nicknames is 9 characters, but what the heck.
@@ -532,7 +528,7 @@ class Client(object):
for member in channel.members:
self.reply("352 %s %s %s %s %s %s H :0 %s"
% (self.nickname, targetname, member.user,
- member.host, server.name, member.nickname,
+ "hidden", server.name, member.nickname,
member.realname))
self.reply("315 %s %s :End of WHO list"
% (self.nickname, targetname))
@@ -680,7 +676,6 @@ class Client(object):
else:
self.reply("422 %s :MOTD File is missing" % self.nickname)
-
class Server(object):
def __init__(self, options):
self.ports = options.ports
@@ -928,11 +923,9 @@ _ircstring_translation = _maketrans(
string.ascii_lowercase.upper() + "[]\\^",
string.ascii_lowercase + "{}|~")
-
def irc_lower(s):
return s.translate(_ircstring_translation)
-
def main(argv):
op = OptionParser(
version=VERSION,
@@ -1067,5 +1060,4 @@ def main(argv):
except KeyboardInterrupt:
server.print_error("Interrupted.")
-
main(sys.argv)