C# Class Schumix.Irc.Util.Rfc2812Util

RFC 2812 Utility methods.
ファイルを表示 Open project: Schumix/Schumix2

Public Methods

Method Description
ChannelModeToChar ( ChannelMode mode ) : char

Converts a ChannelMode into its RFC2812 character.

ChannelModesToArray ( IEnumerable modes ) : ChannelMode[]

Convert a string of ChannelModes characters to an array of ChannelMode enums.

CharToChannelMode ( char mode ) : ChannelMode

Converts the char recived from the IRC server into its enum equivalent.

CharToModeAction ( char action ) : ModeAction

Converts the char received from the IRC server into its enum equivalent.

CharToStatsQuery ( char queryType ) : StatsQuery

Converts the char recived from the IRC server into its enum equivalent.

CharToUserMode ( char mode ) : UserMode

Converts the char recived from the IRC server into its enum equivalent.

GetAction ( string message ) : string
GetCtcp ( string message ) : string
IsAction ( string message ) : bool
IsCtcp ( string message ) : bool
IsServ ( this Value ) : bool
IsServ ( this Value, Serv serv ) : bool
IsServInLower ( this Value ) : bool
IsValidChannelList ( string channels ) : bool

Using the rules set forth in RFC 2812 determine if an array of channel names is valid.

IsValidChannelName ( string channel ) : bool

Using the rules set forth in RFC 2812 determine if the channel name is valid.

IsValidEmailAddress ( string email ) : bool

Check if whether the provided e-mail address is considered valid.

IsValidNick ( string nick ) : bool

Using the rules set forth in RFC 2812 determine if the nickname is valid.

IsValidNickList ( string nicks ) : bool

Using the rules set forth in RFC 2812 determine if an array of nicknames names is valid.

ModeActionToChar ( ModeAction action ) : char

Convert a ModeAction into its RFC2812 character.

ParseUserInfoLine ( string fullUserName ) : string[]

Break up an IRC user string into its component parts.

SetMessageType ( this sIRCMessage ) : void
SetMessageType ( this sIRCMessage, string type ) : void
StatsQueryToChar ( StatsQuery query ) : char

Converts a StatQuery enum value to its RFC2812 character.

UserInfoFromString ( string fullUserName ) : UserInfo

Converts the user string sent by the IRC server into a UserInfo object.

UserModeToChar ( UserMode mode ) : char

Converts a UserMode into its RFC2812 character.

UserModesToArray ( IEnumerable modes ) : UserMode[]

Convert a string of UserModes characters to an array of UserMode enums.

Private Methods

Method Description
ContainsSpace ( string text ) : bool
IsValidModeChar ( char c, string validList ) : bool
Rfc2812Util ( ) : System

Static initializer

Method Details

ChannelModeToChar() public static method

Converts a ChannelMode into its RFC2812 character.
public static ChannelModeToChar ( ChannelMode mode ) : char
mode ChannelMode The mode enum.
return char

ChannelModesToArray() public static method

Convert a string of ChannelModes characters to an array of ChannelMode enums.
public static ChannelModesToArray ( IEnumerable modes ) : ChannelMode[]
modes IEnumerable A string of ChannelMode chars from the IRC server.
return ChannelMode[]

CharToChannelMode() public static method

Converts the char recived from the IRC server into its enum equivalent.
public static CharToChannelMode ( char mode ) : ChannelMode
mode char One of the IRC mode characters, e.g. 'O','i', etc...
return ChannelMode

CharToModeAction() public static method

Converts the char received from the IRC server into its enum equivalent.
public static CharToModeAction ( char action ) : ModeAction
action char Either '+' or '-'.
return ModeAction

CharToStatsQuery() public static method

Converts the char recived from the IRC server into its enum equivalent.
public static CharToStatsQuery ( char queryType ) : StatsQuery
queryType char One of the IRC stats query characters, e.g. 'u','l', etc...
return StatsQuery

CharToUserMode() public static method

Converts the char recived from the IRC server into its enum equivalent.
public static CharToUserMode ( char mode ) : UserMode
mode char One of the IRC mode characters, e.g. 'a','i', etc...
return UserMode

GetAction() public static method

public static GetAction ( string message ) : string
message string
return string

GetCtcp() public static method

public static GetCtcp ( string message ) : string
message string
return string

IsAction() public static method

public static IsAction ( string message ) : bool
message string
return bool

IsCtcp() public static method

public static IsCtcp ( string message ) : bool
message string
return bool

IsServ() public static method

public static IsServ ( this Value ) : bool
Value this
return bool

IsServ() public static method

public static IsServ ( this Value, Serv serv ) : bool
Value this
serv Serv
return bool

IsServInLower() public static method

public static IsServInLower ( this Value ) : bool
Value this
return bool

IsValidChannelList() public static method

Using the rules set forth in RFC 2812 determine if an array of channel names is valid.
public static IsValidChannelList ( string channels ) : bool
channels string
return bool

IsValidChannelName() public static method

Using the rules set forth in RFC 2812 determine if the channel name is valid.
public static IsValidChannelName ( string channel ) : bool
channel string
return bool

IsValidEmailAddress() public static method

Check if whether the provided e-mail address is considered valid.
public static IsValidEmailAddress ( string email ) : bool
email string /// The e-mail address to check. ///
return bool

IsValidNick() public static method

Using the rules set forth in RFC 2812 determine if the nickname is valid.
public static IsValidNick ( string nick ) : bool
nick string
return bool

IsValidNickList() public static method

Using the rules set forth in RFC 2812 determine if an array of nicknames names is valid.
public static IsValidNickList ( string nicks ) : bool
nicks string
return bool

ModeActionToChar() public static method

Convert a ModeAction into its RFC2812 character.
public static ModeActionToChar ( ModeAction action ) : char
action ModeAction The action enum.
return char

ParseUserInfoLine() public static method

Break up an IRC user string into its component parts.
public static ParseUserInfoLine ( string fullUserName ) : string[]
fullUserName string The user in nick!user@host form
return string[]

SetMessageType() public static method

public static SetMessageType ( this sIRCMessage ) : void
sIRCMessage this
return void

SetMessageType() public static method

public static SetMessageType ( this sIRCMessage, string type ) : void
sIRCMessage this
type string
return void

StatsQueryToChar() public static method

Converts a StatQuery enum value to its RFC2812 character.
public static StatsQueryToChar ( StatsQuery query ) : char
query StatsQuery The query enum.
return char

UserInfoFromString() public static method

Converts the user string sent by the IRC server into a UserInfo object.
public static UserInfoFromString ( string fullUserName ) : UserInfo
fullUserName string The user in nick!user@host form.
return UserInfo

UserModeToChar() public static method

Converts a UserMode into its RFC2812 character.
public static UserModeToChar ( UserMode mode ) : char
mode UserMode The mode enum.
return char

UserModesToArray() public static method

Convert a string of UserModes characters to an array of UserMode enums.
public static UserModesToArray ( IEnumerable modes ) : UserMode[]
modes IEnumerable A string of UserMode chars from the IRC server.
return UserMode[]