Add files via upload

This commit is contained in:
Vortex 2024-02-29 09:49:51 +05:30 committed by GitHub
parent 0762969c1c
commit fb73b5e1ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@ from .commands import Fun
from .commands import Cheats from .commands import Cheats
from .commands import NewCmds from .commands import NewCmds
from .commands import CoinCmds from .commands import CoinCmds
from chatHandle.ChatCommands.commands.Handlers import send
from .Handlers import clientid_to_accountid from .Handlers import clientid_to_accountid
from .Handlers import check_permissions from .Handlers import check_permissions
from chatHandle.chatFilter import ChatFilter from chatHandle.chatFilter import ChatFilter
@ -68,16 +68,20 @@ def Command(msg, clientid):
role = return_role(accountid) role = return_role(accountid)
if role == 'owner': if role == 'owner':
reply = '\ue049|| \ue00cCOMMAND ACCEPTED OWNER\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED OWNER\ue00c ||\ue049'
elif role in ['co-owner', 'coowner']:
reply = '\ue049|| \ue00cCOMMAND ACCEPTED CO-OWNER\ue00c ||\ue049'
elif role == 'admin': elif role == 'admin':
reply = '\ue049|| \ue00cCOMMAND ACCEPTED ADMIN\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED ADMIN\ue00c ||\ue049'
elif role == 'vip': elif role == 'vip':
reply = '\ue049|| \ue00cCOMMAND ACCEPTED VIP\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED VIP\ue00c ||\ue049'
elif role == 'moderator': elif role == 'moderator':
reply = '\ue049|| \ue00cCOMMAND ACCEPTED MODERATOR\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED MODERATOR\ue00c ||\ue049'
elif role == 'leadstaff': elif role in ['leadstaff', 'lead-staff']:
reply = '\ue049|| \ue00cCOMMAND ACCEPTED LEAD-STAFF\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED LEAD-STAFF\ue00c ||\ue049'
elif role == 'staff': elif role == 'tcs':
reply = '\ue049|| \ue00cCOMMAND ACCEPTED STAFF\ue00c ||\ue049' reply = '\ue049|| \ue00cCOMMAND ACCEPTED T-CS\ue00c ||\ue049'
elif role in ['cs', 'staff']:
reply = '\ue049|| \ue00cCOMMAND ACCEPTED CS\ue00c ||\ue049'
else: else:
reply = '\ue043|| PLAYER COMMAND ACCEPTED ||\ue043' reply = '\ue043|| PLAYER COMMAND ACCEPTED ||\ue043'
@ -117,7 +121,7 @@ def Command(msg, clientid):
elif command_type(command) == "NewCmd": elif command_type(command) == "NewCmd":
if check_permissions(accountid, command): if check_permissions(accountid, command):
NewCmds.NewCommands(command, arguments, clientid, accountid, ARGUMENTS) NewCmds.NewCommands(command, arguments, clientid, accountid)
_ba.screenmessage(reply, color=(0,1,0), transient=True) _ba.screenmessage(reply, color=(0,1,0), transient=True)
else: else:
_ba.screenmessage(u"\ue049|| \ue00cCOMMAND NOT FOR KIDS\ue00c ||\ue049", color=(1, 0, 0), transient=True, _ba.screenmessage(u"\ue049|| \ue00cCOMMAND NOT FOR KIDS\ue00c ||\ue049", color=(1, 0, 0), transient=True,
@ -149,26 +153,6 @@ def QuickAccess(msg, client_id):
_ba.screenmessage(name + ":" + msg[1:], clients=[i.inputdevice.client_id], _ba.screenmessage(name + ":" + msg[1:], clients=[i.inputdevice.client_id],
color=(0.3, 0.6, 0.3), transient=True) color=(0.3, 0.6, 0.3), transient=True)
return None
elif msg.startswith("/dm"):
name = ""
a = msg.lower().split()[1:]
if len(a) < 2: # Check if there are enough arguments
send(f"Usage: /dm [clientid] [message]", client_id)
else:
clientid = int(a[0])
message = ' '.join(a[1:]) # Join the message list into a single string
for i in ba.internal.get_foreground_host_session().sessionplayers:
if i.inputdevice.client_id == client_id:
name = i.getname(full=True, icon=True)
if i.inputdevice.client_id == clientid:
pbid = i.get_v1_account_id()
if pbid:
send(f"{name}: {message}", clientid)
send(f"dm sent successfully", client_id)
else:
send(f"player not found", client_id)
return None return None
elif msg.startswith("."): elif msg.startswith("."):
msg = msg[1:] msg = msg[1:]