Skip to content

Commit

Permalink
remove even more unused IRC stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Oct 15, 2020
1 parent 2c5ab88 commit 32f7656
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 504 deletions.
1 change: 0 additions & 1 deletion MCGalaxy/MCGalaxy_.csproj
Expand Up @@ -668,7 +668,6 @@
<Compile Include="sharkbite.thresher\Rfc2812Util.cs" />
<Compile Include="sharkbite.thresher\Sender.cs" />
<Compile Include="sharkbite.thresher\ServerProperties.cs" />
<Compile Include="sharkbite.thresher\TextColor.cs" />
<Compile Include="sharkbite.thresher\UserInfo.cs" />
<Compile Include="sharkbite.thresher\WhoisInfo.cs" />
<Compile Include="util\ExtrasCollection.cs" />
Expand Down
24 changes: 0 additions & 24 deletions MCGalaxy/sharkbite.thresher/Enums.cs
Expand Up @@ -272,28 +272,4 @@ public enum StatsQuery: int
/// </summary>
Uptime = 117, //u
};

/// <summary>
/// All recognized mIRC colors.
/// </summary>
public enum MircColor
{
White = 0,
Black = 1,
Blue = 2,
Green = 3,
LightRed = 4,
Brown = 5,
Purple = 6,
Orange = 7,
Yellow = 8,
LightGreen = 9,
Cyan = 10,
LightCyan = 11,
LightBlue = 12,
Pink = 13,
Grey = 14,
LightGrey = 15,
Transparent = 99
};
}
7 changes: 0 additions & 7 deletions MCGalaxy/sharkbite.thresher/Rfc2812Util.cs
Expand Up @@ -244,13 +244,6 @@ public static bool IsValidNicklList( string[] nicks )
return (char)((byte)mode);
}

/// <summary> Converts a StatQuery enum value to its RFC2812 character. </summary>
/// <param name="query">The query enum.</param>
/// <returns>The corresponding char.</returns>
public static char StatsQueryToChar( StatsQuery query ) {
return (char)((byte)query);
}

/// <summary> Converts the char recived from the IRC server into its enum equivalent. </summary>
/// <param name="queryType">One of the IRC stats query characters, e.g. 'u','l', etc...</param>
/// <returns>An StatsQuery enum.</returns>
Expand Down
322 changes: 0 additions & 322 deletions MCGalaxy/sharkbite.thresher/Sender.cs
Expand Up @@ -1559,328 +1559,6 @@ public void Time( string targetServer )
Connection.SendCommand( Buffer );
}
}
/// <summary>
/// Send a message to all users who have the 'w' user mode set.</summary>
/// <remarks>
/// This will likely be forbidden to all but IRC
/// OPS.
/// </remarks>
/// <param name="message">Any text message.</param>
/// <exception cref="ArgumentException">If the message is empty or null.</exception>
public void Wallops( string message )
{
lock( this )
{
if ( IsEmpty( message ) )
{
ClearBuffer();
throw new ArgumentException("Wallops message cannot be null or empty.");
}
Buffer.Append("WALLOPS");
// 11 is WALLOPS + 1 x Spaces + CR + LF
message = Truncate( message, 10 );
Buffer.Append( SPACE );
Buffer.Append( message );
Connection.SendCommand( Buffer );
}
}
/// <summary>
/// Request information about the software
/// of the current IRC server.
/// </summary>
/// <remarks>
/// This returns information describing the
/// server: its version, when it was compiled, the patchlevel, when it
/// was started, and any other miscellaneous information which may be
/// considered relevant.
/// </remarks>
/// <seealso cref="Listener.OnInfo"/>
public void Info()
{
Info( null );
}
/// <summary>
/// Request information about the software
/// of the target IRC server.
/// </summary>
/// <remarks>
/// <para>This returns information describing the
/// server: its version, when it was compiled, the patchlevel, when it
/// was started, and any other miscellaneous information which may be
/// considered relevant.</para>
///
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="target">Either a user nickname or a specific IRC server connected
/// to the current network. If it is a nickname then return the information about
/// the server to which 'nick' is connected. Can include wildcards.</param>
/// <example><code>
/// //Query a specific server
/// connection.Sender.Info( "sunray.sharkbite.org" );
/// //Query the server Bob is connected to
/// connection.Sender.Info("Bob");
/// </code></example>
/// <seealso cref="Listener.OnInfo"/>
public void Info( string target )
{
lock( this )
{
Buffer.Append("INFO");
if ( !IsEmpty(target) )
{
//7 is INFO + 1 x Spaces + CR + LF
target = Truncate( target, 7);
Buffer.Append( SPACE );
Buffer.Append( target );
}
Connection.SendCommand( Buffer );
}
}
/// <summary>
/// Request information about the administrator
/// of the current IRC server.
/// </summary>
/// <remarks>
/// This returns information such as the administrator's
/// email address, geographical location and whatever else
/// the IRC is configured to send as a response.
/// </remarks>
/// <seealso cref="Listener.OnAdmin"/>
public void Admin()
{
Admin( null );
}
/// <summary>
/// Request information about the administrator
/// of the target IRC server.
/// </summary>
/// <remarks>
/// <para> This returns information such as the administrator's
/// email address, geographical location and whatever else
/// the IRC is configured to send as a response.
/// </para>
///
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="target">Either a user nickname or a specific IRC server connected
/// to the current network. If it is a nickname then return the information about
/// the server to which 'nick' is connected. Can include wildcards.</param>
/// <example><code>
/// //Request info about the administrator of the specified server
/// connection.Sender.Admin( "sunray.sharkbite.org" );
/// //Request info about the administrator of the server Bob is connected to
/// connection.Sender.Admin("Bob");
/// </code></example>
/// <seealso cref="Listener.OnAdmin"/>
public void Admin( string target )
{
lock( this )
{
Buffer.Append("ADMIN");
if ( !IsEmpty(target) )
{
//8 is INFO + 1 x Spaces + CR + LF
target = Truncate( target, 8);
Buffer.Append( SPACE );
Buffer.Append( target );
}
Connection.SendCommand( Buffer );
}
}

/// <summary>
/// Request statistics about the size of the IRC network.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <seealso cref="Listener.OnLusers"/>
public void Lusers()
{
Lusers( null, null );
}

/// <summary>
/// Request statistics about the size of the IRC network.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="hostMask">Limits the kinds of servers included in the response by
/// specifiying a hostname string. Can include wildcards.</param>
/// <param name="targetServer">Specifies the server that should process the request. Can be null
/// to indicate that the current server should handle the request. Can include wildcards.</param>
/// <example><code>
/// //Request stats from the current server
/// connection.Sender.Lusers();
/// //Request stats about all servers ending in '.net' from the current server
/// connection.Sender.Lusers("*.net", null );
/// //Request stats about all servers ending in '.net' from 'west.gamesnet.net'
/// connection.Sender.Lusers("*.net", "west.gamesnet.net");
/// </code></example>
/// <exception cref="ArgumentException">If the host mask and server names are too long.</exception>
/// <seealso cref="Listener.OnLusers"/>
public void Lusers( string hostMask, string targetServer )
{
lock( this )
{
Buffer.Append("LUSERS");
if ( !IsEmpty(hostMask) )
{
Buffer.Append( SPACE );
Buffer.Append( hostMask );
}
if( !IsEmpty(targetServer) )
{
Buffer.Append( SPACE );
Buffer.Append( targetServer );
}

if( TooLong( Buffer ) )
{
ClearBuffer();
throw new ArgumentException("Hostmask and TargetServer are too long.");
}

Connection.SendCommand( Buffer );
}
}

/// <summary>
/// Request all server names which are known by the current server.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <seealso cref="Listener.OnLinks"/>
public void Links()
{
Links( null );
}

/// <summary>
/// Request all server names which are known by the target server
/// and which match a given host mask.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="masks">Either a single string which acts as a host
/// mask filter for the query. Or two strings with the first as host mask
/// and the second a target server. Any other arguments will be ignored.</param>
/// <example><code>
/// //Request names from the current server
/// connection.Sender.Links();
/// //Request names of all servers ending in '.net' from the current server
/// connection.Sender.Links("*.edu" );
/// //Request names of all servers ending in '.edu' from '*.gnome.org' servers
/// connection.Sender.Links("*.edu", "*.gnome.org");
/// </code></example>
/// <exception cref="ArgumentException">If the masks are too long.</exception>
/// <seealso cref="Listener.OnLinks"/>
public void Links( params string[] masks )
{
lock( this )
{
Buffer.Append("LINKS");
if( masks != null )
{
Buffer.Append( SPACE );
Buffer.Append( masks[0] );

if( masks.Length >= 2 )
{
Buffer.Append( SPACE );
Buffer.Append( masks[1] );
}
}

if( TooLong( Buffer ) )
{
ClearBuffer();
throw new ArgumentException("Masks are too long.");
}
Connection.SendCommand( Buffer );
}
}


/// <summary>
/// Request certain kinds of statistics about the current server.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="query">The type of query to send. See <see cref="StatsQuery"/> for choice.</param>
/// <example><code>
/// //Request server link stats
/// connection.Sender.Stats( StatsQuery.Connections );
/// </code></example>
/// <seealso cref="Listener.OnStats"/>
public void Stats( StatsQuery query )
{
Stats( query, null );
}

/// <summary>
/// Request certain kinds of statistics about the current server.
/// </summary>
/// <remarks>
/// Possible Errors
/// <list type="bullet">
/// <item><description>ERR_NOSUCHSERVER</description></item>
/// </list>
/// </remarks>
/// <param name="query">The type of query to send. See <see cref="StatsQuery"/> for choice.</param>
/// <param name="targetServer">Specifies the server that should process the request. Can include wildcards.</param>
/// <example><code>
/// //Request list of Operators from the server 'irc.gnome.org'
/// connection.Sender.Stats( StatsQuery.Operators, "irc.gnome.org" );
/// </code></example>
/// <exception cref="ArgumentException">If the target server name is too long.</exception>
/// <seealso cref="Listener.OnStats"/>
public void Stats( StatsQuery query, string targetServer )
{
lock( this )
{
Buffer.Append("STATS");
Buffer.Append( SPACE );
Buffer.Append( Rfc2812Util.StatsQueryToChar( query ) );
if( targetServer != null )
{
Buffer.Append( SPACE );
Buffer.Append( targetServer );
}
if( TooLong( Buffer ) )
{
ClearBuffer();
throw new ArgumentException("Target server name is too long.");
}
Connection.SendCommand( Buffer );
}
}

/// <summary>
/// Forcefully disconnect a user form the IRC server. This can only be used
/// by Operators.
Expand Down

0 comments on commit 32f7656

Please sign in to comment.