Difference between revisions of "$strip"
From Scriptwiki
(added the function of 'reverse' control code) |
m |
||
(3 intermediate revisions by one other user not shown) | |||
Line 20: | Line 20: | ||
== Example == | == Example == | ||
− | on ^*:TEXT:*:?:{ | + | [[On_text|on ^*:TEXT:]]*:?:{ |
− | [[echo]] -t [[$nick]] < $+ [[$nick]] $+ > $strip($1-,m) | + | [[echo]] -t [[$nick]] < [[DollarPlus|$+]] [[$nick]] [[DollarPlus|$+]] > $strip([[$1-]],m) |
[[haltdef]] | [[haltdef]] | ||
} | } | ||
The above little script would strip control codes from private messages as they are specified in Options=>IRC=>Messages. | The above little script would strip control codes from private messages as they are specified in Options=>IRC=>Messages. | ||
− | == Also | + | == See Also == |
− | * [[$stripped]] | + | * [[$stripped]] to returns the number of control codes stripped by $strip. |
[[Category:Text_and_Number_Identifiers]] | [[Category:Text_and_Number_Identifiers]] |
Latest revision as of 10:08, 2 July 2007
Returns text with control codes stripped out.
$strip(text[,burcmo])
The first parameter is the text you want to strip the control codes from. The second parameter is optional and specifies which control codes are stripped.
Switch | Meaning |
b | The b switch strips all bold control codes. |
u | The u switch strips all underline control codes. |
r | The r switch strips all reverse control codes. This control code reverses the background and text color as specified in the Colors... dialog. |
c | The c switch strips all color control codes. |
m | The m switch strips all control codes as specified in Options=>IRC=>Messages, not including the Only if... option. |
o | The o switch applies the Only if... setting in Options=>IRC=>Messages. |
Example
on ^*:TEXT:*:?:{ echo -t $nick < $+ $nick $+ > $strip($1-,m) haltdef }
The above little script would strip control codes from private messages as they are specified in Options=>IRC=>Messages.
See Also
- $stripped to returns the number of control codes stripped by $strip.