The "showfile" Module (v4)

Description

This module adds support for showing the contents of files to users when they execute a command.

Configuration

To load this module use the following <module> tag:

<module name="showfile">

<showfile>

The <showfile> tag defines a command to show the contents of a file. This tag can be defined as many times as required.

Name Type Default Value Description
name Text None Required! The name of the command that users should execute to receive this file.
file Text None Required! The file path or name of the field in <files> / <execfiles> to use when reading the file.
method Text numeric The method to use to send the message to the user.
endnumeric Number 309 If the method field is set to numeric then the numeric to use to stop the response.
endtext Text End of COMMAND If the method field is set to numeric then the message to use in the stopping numeric.
intronumeric Number 308 If the method field is set to numeric then the numeric to use to start the response.
introtext Text Showing COMMAND If the method field is set to numeric then the message to use in the starting numeric.
textnumeric Number 232 If the method field is set to numeric then the numeric to use to show the response.

The file specified in the file field can contain the following formatting codes:

Escape Example (raw) Example (formatted) Description
\b foo \bbar\b baz foo bar baz Toggles whether text should be bold.
\c<fg>[,<bg>] foo \c03bar\c baz
foo \c11,04bar\c baz
foo bar baz
foo bar baz
Toggles the foreground and/or background color of text.
\c{<fg>[,<bg>]} foo \c{green}bar\c baz
foo \c{cyan,red}bar\c baz
foo bar baz
foo bar baz
New in v4.3.0! Toggles the foreground and/or background color of text using color names (see below).
\h<fg>[,<bg>] foo \hea74dcbar\h baz
foo \h613583,2ec27ebar\h baz
foo bar baz
foo bar baz
Toggles the foreground and/or background color of text using hex colors (not widely supported).
\i foo \ibar\i baz foo bar baz Toggles whether text should be italicised.
\m foo \mbar\m baz foo bar baz Toggles whether text should be monospace (not widely supported).
\r foo \c{blue,orange}bar\r baz foo bar baz Swaps the foreground and background color.
\s foo \sbar\s baz foo bar baz Toggles whether text should be struckthrough (not widely supported).
\u foo \ubar\u baz foo bar baz Toggles whether text should be underlined.
\x foo \b\ibar\x baz foo bar baz Terminates any previously specified formatting.

If using named colors they are converted to raw color codes as follows:

Code Name Example
00 white
 
01 black
 
02 blue
 
03 green
 
04 red
 
05 brown
 
06 magenta
 
07 orange
 
08 yellow
 
09 light green
 
10 cyan
 
11 light cyan
 
12 light blue
 
13 pink
 
14 grey
 
15 light grey
 
99 default Depends on client theme

Colors in the range 16-98 are not widely supported and do not have names. See ircdocs for more information.

The method field should be set to one of the following values:

Value Description
numeric Send the message using the specified numerics.
msg Send the message using PRIVMSG.
notice Send the message using NOTICE.
Example Usage
<showfile name="RULES"
          file="rules.txt"
          introtext="Server rules:"
          endtext="End of server rules.">