Show / Hide Table of Contents

Interface IChatClient

The interface that something needs to implement in order to perform chat commands. Used by User and RCON currently. Chat commands can accept either a User or an IChatClient

Difference between using User vs. IChatClient as the first argument include:

  • If they accept a User, they are allowed to have full access to that User's interface, but those chat commands cant be called by headless clients like RCON
  • If they accept an IChatClient, they have a limited set of properties (below) which they can access from the chatClient, but both Users in game and headless clients such as RCON can call these functions.

Generally if you only need to issue return displays and make modifications to the world, you should make the chat command accept IChatClient, so headless clients like RCON can call it.

Inherited Members
INotificationReceiver.ErrorLoc(FormattableString)
INotificationReceiver.Error(LocString)
INotificationReceiver.ErrorLocStr(String)
INotificationReceiver.MsgLoc(FormattableString, NotificationStyle)
INotificationReceiver.Msg(LocString, NotificationStyle)
INotificationReceiver.MsgLocStr(String, NotificationStyle)
INotificationReceiver.OkBoxLoc(FormattableString)
INotificationReceiver.OkBox(LocString)
INotificationReceiver.OkBoxLocStr(String)
Namespace: Eco.Gameplay.Systems.Chat
Assembly: Eco.Gameplay.dll
Syntax
public interface IChatClient : INotificationReceiver

Properties

ImplementationName

Represents the internal name of this implementation. Used in things suchas error messages

Declaration
string ImplementationName { get; }
Property Value
Type Description
System.String

MarkedUpName

Represents the markup display name of this IChatClient instance

Declaration
LocString MarkedUpName { get; }
Property Value
Type Description
LocString

Name

Represents the display name of this IChatClient instance

Declaration
string Name { get; }
Property Value
Type Description
System.String

Methods

GetChatAuthLevel()

Returns this Invoker's ChatAuthorizationLevel value for use in command permission checks

Declaration
ChatAuthorizationLevel GetChatAuthLevel()
Returns
Type Description
ChatAuthorizationLevel

ChatAuthorizationLevel if the Invoker

TempServerMessage(LocString, NotificationCategory, NotificationStyle)

Sends a message to the command invoker that is intended to be temporary. This method may not be supported by all command invokers. If the method is not supported these messages should be routed to a normal message call.

Declaration
void TempServerMessage(LocString message, NotificationCategory category, NotificationStyle style)
Parameters
Type Name Description
LocString message

Message to send to the invoker from a chat command

NotificationCategory category

NotificationCategoryThe chat tags associated with this message

NotificationStyle style

NotificationStyle of the message to be sent

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TestUtils.UserOrTestUser(IChatClient)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾