Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Add authentication notification packet (#164)
Browse files Browse the repository at this point in the history
Co-authored-by: oldmud0 <[email protected]>
  • Loading branch information
in1tiate and oldmud0 authored May 12, 2021
1 parent 62f6f9f commit 1166147
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions server/commands/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,13 @@ def ooc_cmd_login(client, arg):
try:
login_name = client.auth_mod(arg)
except ClientError:
client.send_command('AUTH', '0')
database.log_misc('login.invalid', client)
raise
if client.area.evidence_mod == 'HiddenCM':
client.area.broadcast_evidence_list()
client.send_ooc('Logged in as a moderator.')
client.send_command('AUTH', '1')
database.log_misc('login', client, data={'profile': login_name})


Expand Down Expand Up @@ -358,6 +360,7 @@ def ooc_cmd_unmod(client, arg):
if client.area.evidence_mod == 'HiddenCM':
client.area.broadcast_evidence_list()
client.send_ooc('you\'re not a mod now')
client.send_command('AUTH', '-1')


@mod_only()
Expand Down
2 changes: 1 addition & 1 deletion server/network/aoprotocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def net_cmd_id(self, args):
'deskmod', 'evidence', 'modcall_reason',
'cccc_ic_support', 'arup', 'casing_alerts',
'prezoom', 'looping_sfx', 'additive', 'effects',
'y_offset', 'expanded_desk_mods')
'y_offset', 'expanded_desk_mods', 'auth_packet')
# Send Asset packet if asset_url is defined
if self.server.config['asset_url'] != '':
self.client.send_command('ASS', self.server.config['asset_url'])
Expand Down
1 change: 1 addition & 0 deletions server/tsuserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ def refresh(self):
database.log_misc('unmod.modpass', client)
client.send_ooc(
'Your moderator credentials have been revoked.')
client.send_command('AUTH', '-1')
self.config['modpass'] = cfg_yaml['modpass']

self.load_characters()
Expand Down

0 comments on commit 1166147

Please sign in to comment.