]> jfr.im git - erebus.git/blobdiff - modlib.py
add avweather module to pull METAR from aviationweather.gov
[erebus.git] / modlib.py
index a04dd7878e22898f222cb06318ddcf6569b7e502..91e05843dd306a49adc15596806d6d2ed3aa5d51 100644 (file)
--- a/modlib.py
+++ b/modlib.py
@@ -50,11 +50,11 @@ class modlib(object):
        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."
@@ -258,8 +258,7 @@ class _ListenSocket(object):
 
        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:
@@ -274,7 +273,7 @@ class _ListenSocket(object):
                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 []