mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix typo when messages from players are written
This commit is contained in:
parent
51a07a1f0d
commit
d1db65dc9c
@ -46,6 +46,10 @@ class ServerOutBuf:
|
|||||||
ServerOutBuf.lines[self.server_id] = []
|
ServerOutBuf.lines[self.server_id] = []
|
||||||
self.lsi = 0
|
self.lsi = 0
|
||||||
|
|
||||||
|
def clear_term(self):
|
||||||
|
self.line_buffer = ''
|
||||||
|
ServerOutBuf.lines[self.server_id] = []
|
||||||
|
|
||||||
def process_byte(self, char):
|
def process_byte(self, char):
|
||||||
if char == os.linesep[self.lsi]:
|
if char == os.linesep[self.lsi]:
|
||||||
self.lsi += 1
|
self.lsi += 1
|
||||||
@ -76,7 +80,7 @@ class ServerOutBuf:
|
|||||||
break
|
break
|
||||||
|
|
||||||
def new_line_handler(self, new_line):
|
def new_line_handler(self, new_line):
|
||||||
new_line = re.sub('(\033\\[(0;)?[0-9]*[A-z]?(;[0-9])?m?)|(> )', '', new_line)
|
new_line = re.sub('(\033\\[(0;)?[0-9]*[A-z]?(;[0-9])?m?)', ' ', new_line)
|
||||||
new_line = re.sub('[A-z]{2}\b\b', '', new_line)
|
new_line = re.sub('[A-z]{2}\b\b', '', new_line)
|
||||||
highlighted = helper.log_colors(html.escape(new_line))
|
highlighted = helper.log_colors(html.escape(new_line))
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ from tornado.ioloop import IOLoop
|
|||||||
#TZLocal is set as a hidden import on win pipeline
|
#TZLocal is set as a hidden import on win pipeline
|
||||||
from tzlocal import get_localzone
|
from tzlocal import get_localzone
|
||||||
from cron_validator import CronValidator
|
from cron_validator import CronValidator
|
||||||
|
from app.classes.controllers.servers_controller import Servers_Controller
|
||||||
|
|
||||||
from app.classes.models.server_permissions import Enum_Permissions_Server
|
from app.classes.models.server_permissions import Enum_Permissions_Server
|
||||||
from app.classes.models.crafty_permissions import Enum_Permissions_Crafty
|
from app.classes.models.crafty_permissions import Enum_Permissions_Crafty
|
||||||
@ -357,6 +358,9 @@ class PanelHandler(BaseHandler):
|
|||||||
if not superuser:
|
if not superuser:
|
||||||
self.redirect("/panel/error?error=Unauthorized access to Terminal")
|
self.redirect("/panel/error?error=Unauthorized access to Terminal")
|
||||||
return
|
return
|
||||||
|
server_obj = Servers_Controller.get_server_obj(server_id)
|
||||||
|
if page_data['server_stats']['running']:
|
||||||
|
server_obj.clear_term()
|
||||||
|
|
||||||
if subpage == 'logs':
|
if subpage == 'logs':
|
||||||
if not page_data['permissions']['Logs'] in page_data['user_permissions']:
|
if not page_data['permissions']['Logs'] in page_data['user_permissions']:
|
||||||
|
Loading…
Reference in New Issue
Block a user