1LOG_CUSTOM(7ctrlproxy)                                  LOG_CUSTOM(7ctrlproxy)
2
3
4

NAME

6       log_custom - Logging in a predefined format
7

DESCRIPTION

9       Module that writes logs to one or more files using a defined format.
10
11       This module may be used to write out log files that can be parsed by
12       scripts or bots or logs in the same format as your favorite IRC client.
13

SUBSTITUTES

15       The configuration values define the syntax that is used to write out
16       log file lines. In these configuration values, values beginning with a
17       '%' can be substituted.
18
19       The following characters are allowed after a percent sign for all types
20       of lines:
21
22       h      Current time of day, hours field.
23
24       M      Current time of day, number of minutes.
25
26       s      Current time of day, number of seconds.
27
28       n      Nick originating the line (saying the message, doing the kick,
29              quitting, joining, etc).
30
31       u      Hostmask of the user originating the line.
32
33       N      Name of the current IRC network.
34
35       S      Name of the server (as set by the transport).
36
37       %      Percent sign
38
39       0,1,2,3,4,5,6,7,8,9
40              Substituted with the respective argument in the IRC line.
41
42       @      Replaced by channel name if the message is directed to a
43              channel, the nick name to which the message is being sent, or
44              the name of the sender of the message when the receiver is the
45              user running ctrlproxy.
46
47              This substitute will be the name of the first channel on which
48              the user is active if the line type is NICK or QUIT.
49
50       Each type of line also has some variables of it's own that it
51       substitutes.
52
53   join
54       %c     Name of the channel the user joins.
55
56   part
57       %c     Name of the channel the user is leaving.
58
59       %m     Comment
60
61   kick
62       %t     Nick of the user that is being kicked.
63
64       %c     Channel the user is being kicked from.
65
66       %r     Reason the user is being kicked.
67
68   quit
69       %m     Comment.
70
71   topic/notopic
72       %c     Name of the channel of which the topic is being changed.
73
74       %t     The new topic. Only set for 'topic', not for 'notopic'.
75
76   mode
77       %c     Name of user or channel of which the mode is being changed.
78
79       %p     Change in the mode, e.g.  +oie
80
81       %t     Target of which the mode is being changed.
82
83       To retrieve any additional arguments for a MODE command, use %1, %2,
84       etc.
85
86   notice/privmsg/action
87       %t     Name of channel or nickname of user to which the notice/privmsg/
88              or action is being sent.
89
90       %m     Message that is being sent.
91
92   nick
93       %r     New nickname the user is changing his/her name to.
94

CONFIGURATION

96       The following XML elements are supported:
97
98       logfile
99              Path to the logfile that will be written. Supports substitution
100              depending on the type of line that is being parsed.
101
102       join   Format to use for lines where a user joins a channel.
103
104       part   Format to use for lines where a user leaves a channel.
105
106       msg    Format to use for 'regular' messages - when a user says
107              something.
108
109       notice Format to use for notices.
110
111       action Format to use for CTCP actions (e.g. /me ...)
112
113       mode   Format to use for MODE changes (including bans)
114
115       quit   Format to use for quit lines.
116
117       kick   Format to use for kicks.
118
119       topic  Format to use for topic changes to a valid topic
120
121       notopic
122              Format to use when the topic is unset.
123
124       nickchange
125              Format to use when a user changes his/her nick name.
126

EXAMPLE

128
129                 <ctrlproxy>
130                      <plugins>
131                           <plugin autoload="1" file="log_custom">
132                                <logfile>/home/jelmer/log/ctrlproxy/%@</logfile>
133                                <join>%h%M%s -!- User %n [%u] has joined %c</join>
134                                <part>%h%M%s -!- User %n [%u] has left %c [%m]</part>
135                                <quit>%h%M%s -!- User %n [%u] has quit [%m]</quit>
136                                <action>%h%M%s * %n %m</action>
137                           </plugin>
138                           <plugin autoload="1" file="socket"/>
139                      </plugins>
140
141                      <networks>
142                           <network name="OFTC">
143                                <servers><ipv4 host="irc.oftc.net"/></servers>
144                                <channel name="#flood"/>
145                           </network>
146                      </networks>
147                 </ctrlproxy>
148
149
150

VERSION

152       This man page is valid for version 0.1 of the plugin.
153

SEE ALSO

155       ctrlproxyrc(5), ctrlproxy(1), [1]http://ctrlproxy.vernstok.nl/,
156       [2]http://jelmer.vernstok.nl/ctrlproxy/
157

AUTHOR

159       [3]Jelmer Vernooij
160

REFERENCES

162       1. http://ctrlproxy.vernstok.nl/
163          http://ctrlproxy.vernstok.nl/
164
165       2. http://jelmer.vernstok.nl/ctrlproxy/
166          http://jelmer.vernstok.nl/ctrlproxy/
167
168       3. Jelmer Vernooij
169          mailto:
170
171
172
173                                  08/27/2006            LOG_CUSTOM(7ctrlproxy)
Impressum