Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 7596a34

Browse files
author
Marv Cool
committed
dactivates Bouncer per default + message
1 parent 7eb812a commit 7596a34

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

plugins/bouncer_plugin/bouncer_plugin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class BouncerPlugin(BasePlugin):
77
Prohibits players with a UserLevel < REGISTRED from destructive actions.
88
"""
99
name = "bouncer"
10-
auto_activate = True
10+
auto_activate = False
1111

1212
def activate(self):
1313
super(BouncerPlugin, self).activate()
@@ -25,3 +25,8 @@ def activate(self):
2525
for n in ["on_" + n.lower() for n in bad_packets]:
2626
setattr(self, n,
2727
(lambda x: False if self.protocol.player.access_level < UserLevels.REGISTERED else True))
28+
29+
def after_connect_response(self, data):
30+
if self.protocol.player.access_level < UserLevels.REGISTERED:
31+
self.protocol.send_chat_message(
32+
"^#FF0000;This server is protected. You can't build or perform any destructive actions. Speak to an administrator about becoming a registered user.^#F7EB43;")

0 commit comments

Comments
 (0)