# Class IrcBroadcaster | EchoHub Documentation

# Class IrcBroadcaster

Namespace
  EchoHub.Server.Irc

Assembly
  EchoHub.Server.Irc.dll

    public class IrcBroadcaster : IChatBroadcaster

Inheritance
  object
  IrcBroadcaster

Implements
  IChatBroadcaster

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### IrcBroadcaster(IrcGatewayService, IMessageEncryptionService)

    public IrcBroadcaster(IrcGatewayService gateway, IMessageEncryptionService encryption)

#### Parameters

`gateway` IrcGatewayService
`encryption` IMessageEncryptionService

## Methods

### ForceDisconnectUserAsync(List<string>, string)

    public Task ForceDisconnectUserAsync(List<string> connectionIds, string reason)

#### Parameters

`connectionIds` List<string>
`reason` string

#### Returns

Task

### SendChannelDeletedAsync(string)

    public Task SendChannelDeletedAsync(string channelName)

#### Parameters

`channelName` string

#### Returns

Task

### SendChannelNukedAsync(string)

    public Task SendChannelNukedAsync(string channelName)

#### Parameters

`channelName` string

#### Returns

Task

### SendChannelUpdatedAsync(ChannelDto, string?)

    public Task SendChannelUpdatedAsync(ChannelDto channel, string? channelName = null)

#### Parameters

`channel` ChannelDto
`channelName` string

#### Returns

Task

### SendErrorAsync(string, string)

    public Task SendErrorAsync(string connectionId, string message)

#### Parameters

`connectionId` string
`message` string

#### Returns

Task

### SendMessageDeletedAsync(string, Guid)

    public Task SendMessageDeletedAsync(string channelName, Guid messageId)

#### Parameters

`channelName` string
`messageId` Guid

#### Returns

Task

### SendMessageToChannelAsync(string, MessageDto, string?)

Broadcast a chat message to a channel. `excludeConnectionId` is the connection the message originated from (IRC convention: never echo a message back to the connection that sent it — its client already displayed it locally). Other connections of the same user (e.g. an IRC session alongside a TUI session) still receive the message.

    public Task SendMessageToChannelAsync(string channelName, MessageDto message, string? excludeConnectionId = null)

#### Parameters

`channelName` string
`message` MessageDto
`excludeConnectionId` string

#### Returns

Task

### SendUserBannedAsync(string, string?)

    public Task SendUserBannedAsync(string username, string? reason)

#### Parameters

`username` string
`reason` string

#### Returns

Task

### SendUserJoinedAsync(string, string, UserPresenceDto?, string?)

    public Task SendUserJoinedAsync(string channelName, string username, UserPresenceDto? presence, string? excludeConnectionId = null)

#### Parameters

`channelName` string
`username` string
`presence` UserPresenceDto
`excludeConnectionId` string

#### Returns

Task

### SendUserKickedAsync(string, string, string?)

    public Task SendUserKickedAsync(string channelName, string username, string? reason)

#### Parameters

`channelName` string
`username` string
`reason` string

#### Returns

Task

### SendUserLeftAsync(string, string)

    public Task SendUserLeftAsync(string channelName, string username)

#### Parameters

`channelName` string
`username` string

#### Returns

Task

### SendUserStatusChangedAsync(List<string>, UserPresenceDto)

    public Task SendUserStatusChangedAsync(List<string> channelNames, UserPresenceDto presence)

#### Parameters

`channelNames` List<string>
`presence` UserPresenceDto

#### Returns

Task