mirror of
https://github.com/UOX3DevTeam/UOX3
synced 2026-08-13 12:27:04 -04:00
27 lines
777 B
JavaScript
27 lines
777 B
JavaScript
/// <reference path="../definitions.d.ts" />
|
|
// @ts-check
|
|
// This command can be used to toggle the the GM moderation mode for bulletin boards
|
|
|
|
function CommandRegistration()
|
|
{
|
|
RegisterCommand( "msgmod", 8, true );
|
|
}
|
|
|
|
/** @type { ( socket: Socket, cmdString: string ) => void } */
|
|
function command_MSGMOD( socket, cmdString )
|
|
{
|
|
var pUser = socket.currentChar;
|
|
var value = ( cmdString.toUpperCase() == "ON" );
|
|
var sysMessage;
|
|
|
|
pUser.SetTag( "modboards", value );
|
|
if( value )
|
|
{
|
|
sysMessage = GetDictionaryEntry( 2021, socket.language ); // MSGMOD enabled - bulletin boards can now be moderated.
|
|
}
|
|
else
|
|
{
|
|
sysMessage = GetDictionaryEntry( 2022, socket.language ); // MSGMOD disabled - bulletin boards can no longer be moderated.
|
|
}
|
|
socket.SysMessage( sysMessage );
|
|
}
|