MASTER = 4
OP = 3
VOICE = 2
- #KNOWN = 1 is set above by glevels
+ FRIEND = 1
PUBLIC = 0 # Anyone (use glevel to control whether auth is needed)
BANNED = -1 # The default reqclevel is PUBLIC, so any commands which needchan will be ignored from BANNED users unless the command reqclevel=-1
# [ 0 1 2 3 4 5 -1]
- clevs = [None, 'Friend', 'Voice', 'Op', 'Master', 'Owner', None]
+ clevs = [None, 'Friend', 'Voice', 'Op', 'Master', 'Owner', 'Banned']
# messages
WRONGARGS = "Wrong number of arguments."
def _make_closer(self, obj, client):
def close():
- print(repr(self), repr(obj))
- self.lib.parent.log(repr(self), '?', 'Closing child socket %d' % (client.fileno()))
+ self.lib.parent.log(repr(self), '?', 'Closing child socket #%d' % (client.fileno()))
try:
obj.closing()
except AttributeError:
client, addr = self.sock.accept()
obj = self.cls(client)
obj.close = self._make_closer(obj, client)
- self.lib.parent.log(repr(self), '?', 'New connection %d from %s' % (client.fileno(), addr))
+ self.lib.parent.log(repr(self), '?', 'New connection #%d from %s' % (client.fileno(), addr))
self.clients.append((client,obj))
self.lib.parent.newfd(obj, client.fileno())
return []