This file is indexed.

/usr/share/doc/kildclient/html/ch08s04.xhtml is in kildclient-doc 3.2.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>8.4. Gags</title><link rel="stylesheet" type="text/css" href="docbook.css"/><link rel="stylesheet" type="text/css" href="kildclient.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/><link rel="prev" href="sec_trigger_highlight.xhtml" title="8.3. Changing the Style of the Matched Text"/><link rel="next" href="sec_trigger_other.xhtml" title="8.5. Other trigger features"/></head><body><header><div class="navheader"><table style="width: 100%; "><tr><th style="text-align: center; " colspan="3">8.4. Gags</th></tr><tr><td style="width: 20%; text-align: left; "><a accesskey="p" href="sec_trigger_highlight.xhtml">Prev</a> </td><th style="width: 60%; text-align: center; ">Chapter 8. Triggers</th><td style="width: 20%; text-align: right; "> <a accesskey="n" href="sec_trigger_other.xhtml">Next</a></td></tr></table><hr/></div></header><section class="sect1" id="idm1215"><div class="titlepage"><div><div><h2 class="title" style="clear: both">8.4. Gags</h2></div></div></div><p>Now that the basic usage of triggers has been explained, let us
see some more advanced features.</p><p>In KildClient, gags are just a special kind of trigger with the
"gag" flag activated, and they behave just like other triggers, with
the exception that the line that matched the pattern does not get
printed in the screen. It is possible to have a gag that executes an
action when triggered, just like with non-gag triggers, or it can be a
simple gag, which prevents the line from being printed but does
nothing else.</p><p>To specify that a trigger is a gag when it is created, just
check the <span class="guilabel">Omit (gag) from output</span> checkbox when
creating the trigger.</p><p>Let's create a simple gag to omit all that is said by Joe, a
very silly and annoying player:</p><div class="example" id="ex_simple_gag"><div class="example-title">Example 8.5. A simple gag</div><div class="example-contents"><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Pattern: <code class="literal">^Joe chats</code></p></li><li class="listitem"><p>Action: <code class="literal">/$world-&gt;echonl("Joe said something silly here.")</code></p></li><li class="listitem"><p>Omit (gag) from output: Checked</p></li></ul></div></div></div><br class="example-break"/><p>This trigger is a gag, and whenever a line starting with
"<code class="literal">Joe chats</code>" is received, it will not be printed.
Instead, the code specified in the action will be executed, and that
code will print a message that tells you that Joe said something, but
does not tell what, so you do not need to worry.</p><p>That is good, but can get even better. We do not need to know
that Joe said something, it would be better if we could ignore him
altogether. And we can. It is not necessary to specify an action for a
gag trigger. In this case, nothing will be done, but the matched line
will not be printed. So our example becomes:</p><div class="example" id="idm1238"><div class="example-title">Example 8.6. A gag with no action</div><div class="example-contents"><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Pattern: <code class="literal">^Joe chats</code></p></li><li class="listitem"><p>Omit (gag) from output: Checked</p></li></ul></div></div></div><br class="example-break"/><p>The action has simply been omitted, but the check box that
specifies that we are creating a gag trigger remains,
naturally.</p><p>Sometimes you want to change the way a line is displayed, such
as rearranging the information so that it appears in another way. The
way to do that is with a gag, and an action that outputs the modified
line. Heres a simple example that changes the way a hypothetical chat
channel is displayed:</p><div class="example" id="idm1249"><div class="example-title">Example 8.7. Rewriting a line with gags</div><div class="example-contents"><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Pattern: <code class="literal">^(.*) chats, '(.*)'</code></p></li><li class="listitem"><p>Action: <code class="literal">/$world-&gt;echonl("[Chat] $_[1]: $_[2]")</code></p></li><li class="listitem"><p>Omit (gag) from output: Checked</p></li></ul></div></div></div><br class="example-break"/><p>The <span class="guilabel">Omit (gag) from output</span> check box only
controls whether the line is displayed in the screen or not. If you
have logging enabled (see <a class="xref" href="chap_logging.xhtml" title="Chapter 14. Logging the Output">Chapter 14, <em>Logging the Output</em></a>), a the line
that matched a trigger with that option checked will be written in the
log file normally. If you want the line to be omitted from the log
file, you must set also the <span class="guilabel">Omit (gag) from log
file</span> check box. If it is set, then the line will not be
written to the log file. Note that the two attributes are independent:
you can gag the line from the screen, from the log file, from both or
from neither.</p></section><footer><div class="navfooter"><hr/><table style="width: 100%; "><tr><td style="width: 40%; text-align: left; "><a accesskey="p" href="sec_trigger_highlight.xhtml">Prev</a> </td><td style="width: 20%; text-align: center; "><a accesskey="u" href="chap_triggers.xhtml">Up</a></td><td style="width: 40%; text-align: right; "> <a accesskey="n" href="sec_trigger_other.xhtml">Next</a></td></tr><tr><td style="width: 40%; text-align: left; vertical-align: top; ">8.3. Changing the Style of the Matched Text </td><td style="width: 20%; text-align: center; "><a accesskey="h" href="index.xhtml">Home</a></td><td style="width: 40%; text-align: right; vertical-align: top; "> 8.5. Other trigger features</td></tr></table></div></footer></body></html>