From WikiChip
$strip Identifier - mIRC
< mirc‎ | identifiers
Revision as of 19:34, 19 June 2017 by Maroonbells (talk | contribs) (Add content for empty page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The $strip identifier Removes colors and/or other control-code formatting from text.

Synopsis

$strip( <text> [,burcimo] )

Parameters

TextText string from which to remove colors or control codes.
Optional types to strip from text. Default is $strip(text,burci)
b Bold $chr(2)
u Underline $chr(31)
r Reverse Colors $chr(22)
c Colors $chr(3) followed by N[,N]
i Italics $chr(29)
m The Color/Other settings from mIRC-OptionsIRC//Messages
o The Only-If settings from mIRC-OptionsIRC//Messages/If-more-than

Note from the above that the control-code entered at the keyboard is not always the same one sent. For example, you press Control-K to precede numbers in colors, which is also $chr(11), but it actually sends $chr(3) which is same as Ctrl-C. Same goes for entering Ctrl-I for Italics but the text actually contains $chr(29).

Example

Two consecutive ^B's used within a bad word does not alter the display, but prevents a match against the badword list unless $strip is first used on the text
on *:TEXT:*:#channelname:{
  var %i $CheckForBadWords($strip($1-))
  ; Using Strip to find 'bad words' that could have been disguised by colors and control-codes
}

Compatibility

Added: mIRC v4.7
Added on: 09 Dec 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also