Thresher 1.2 Class Documentation

Sender.ChangeChannelMode Method 

Change a channel's mode.

[Visual Basic]
Public Sub ChangeChannelMode( _
   ByVal channel As String, _
   ByVal action As ModeAction, _
   ByVal mode As ChannelMode, _
   ByVal param As String _
)
[C#]
public void ChangeChannelMode(
   string channel,
   ModeAction action,
   ChannelMode mode,
   string param
);

Parameters

channel
The target channel.
action
Add or remove.
mode
The target mode.
param
An optional parameter for certain modes. If the mode does not require one this should be null.

Remarks

Possible Errors

Exceptions

Exception TypeCondition
ArgumentExceptionIf the channel name is invalid.

Example

            //Give 'nick' the ability to talk on a moderated channel, i.e. add Voice
            connection.Sender.ChangeChannelMode("#thresher", ModeAction.Add, ChannelMode.Voice,"nick" );
            //Make a channel private
            connection.Sender.ChangeChannelMode( "#thresher", ModeAction.Add, ChannelMode.Private, null );
            

See Also

Sender Class | Sharkbite.Irc Namespace | OnChannelModeChange