New configuration attribute: allowall: all receive message are treated
This commit is contained in:
parent
5d2d218708
commit
c4e2c0b66c
@ -74,6 +74,10 @@ class Server(threading.Thread):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def allow_all(self):
|
||||||
|
return self.node.hasAttribute("allowall") and self.node["allowall"] == "true"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ip(self):
|
def ip(self):
|
||||||
"""Convert common IP representation to little-endian integer representation"""
|
"""Convert common IP representation to little-endian integer representation"""
|
||||||
@ -184,7 +188,9 @@ class Server(threading.Thread):
|
|||||||
|
|
||||||
def accepted_channel(self, chan, sender = None):
|
def accepted_channel(self, chan, sender = None):
|
||||||
"""Return True if the channel (or the user) is authorized"""
|
"""Return True if the channel (or the user) is authorized"""
|
||||||
if self.listen_nick:
|
if self.allow_all:
|
||||||
|
return True
|
||||||
|
elif self.listen_nick:
|
||||||
return (chan in self.channels and (sender is None or sender in
|
return (chan in self.channels and (sender is None or sender in
|
||||||
self.channels[chan].people)
|
self.channels[chan].people)
|
||||||
) or chan == self.nick
|
) or chan == self.nick
|
||||||
|
Loading…
Reference in New Issue
Block a user