.\" Text automatically generated by md2man .TH tmww-config 5 "November 28, 2014" "Linux" "Linux Reference Manual" .SH NAME \fBtmww \fP- config format documentation .PP .SH FORMAT Config consists of comments, options and sections. Comments start with #. .PP Options synthax: .PP .nf .fam C OPTIONNAME _whitespace_ unquoted_value OPTIONNAME _whitespace_ "double-quoted value" .fam T .fi .PP where OPTIONNAME is alphanumeric/underscore, unquoted value is single word, quoted values have no restriction. Unquoted options are evaluated as is (e.g. to expand path) so safety advice are same as to shell variables. Options are available inside script with TMWW_ prefix, e.g. LINK become TMWW_LINK. .PP Sections synthax: .PP .nf .fam C SECTIONNAME _whitespace_ { [sectionline]\.\.\. } .fam T .fi .PP Sections are not parsed automatically. Example of section parsed in tmww script is "event" section defining ring tone for event. .PP Sections may refer to lists, which are stored in $LISTPATH/$servername. .PP NOTE: lists purpose might be different from storing char names, so it's recommended for lists to skip unknown mappings ("key: value") .PP Configs allows INCLUDE special option to include other config. Only one config can be included, no recursive inclusions. .PP Some path variables should be quoted (they are expanded inside plugin). Consult respective plugin manuals. .PP .SH CONFIG .TP .B LINK : quoted : http://server.themanaworld.org/online.html html/txt online list link .TP .B LOCALLINK : string : \fIempty\fP local tmwa online list .TP .B SERVERNAME : string : server.themanaworld.org defines _$servername_; if skipped, \fI$servername\fP is cut from \fI$LINK\fP .TP .B ROLE : string : main role value for plugins making use of it .TP .B INSTANCE : string : common see instances explanation .TP .B DELTA : int : 16 delay in seconds from last download of online list allowed to skip update; see \fIInstances\fP for comment on running multiple instances .TP .B DRYRUN : yes/no : no see \fIDryrun\fP comment .TP .B CMDACTION : string : \fIempty\fP pass cmdline arguments to defined CMDACTION plugin and skip \fIactions\fP section .TP .B CMDPREFIX : string : \fIempty\fP prefix cmdline options passed to plugin called from commandline .TP .B VERBOSE : yes/no : no output executed plugins names and error codes .TP .B PLUGINPATH : string : ~/.config/tmww/plugins neat tmww features .TP .B UTILPATH : string : ~/.config/tmww/utils exterior applications/scripts used by plugins .TP .B TMP : string : /tmp see notes on TMP .TP .B PRIVTMP : string : ~/.tmp see notes on PRIVTMP .TP .B LOCK : string : /var/lock lock/PID files .TP .B LISTPATH : string : ~/.config/tmww/lists player lists with \fI$servername\fP subfolder .TP .B HIGHLIGHT : yes/no : no highlight service messages like 'fetching!', 'servertime' and such (works for 'watch' program) .TP .B ANSICAPABLE : yes/no : no see notes on colors .TP .B COLORS : yes/no : yes use colors .TP .B IPCPATH : string : $PRIVTMP/ipc miscellineous UDS/FIFO path (see plugins for details) .TP .B RING : yes/no : no play sound on "ring" action (and matched event) .TP .B PLAY : quoted : "play \fB-q\fP" binary to play sound .TP .B PLAYDEV : string : \fIempty\fP ALSA device pass with as environment variable to PLAY bin .TP .B RINGSOCKET : yes/no : no write mbuzzer events to socket instead of playing with \fIPLAY\fP .TP .B RINGSOCKETFILE : string : $IPCPATH/mbuzzer.socket mbuzzer UDS file .TP .B RINGPATH : string : ~/.sound/event default event sounds path RINGFESTLANG : string : "english" festival language LISTINSTALL : string : no default list action (compile if "no", install if "yes"; see \fBtmww-list\fP(7) ) .TP .B INCLUDE : string : \fIempty\fP include other config; see INCLUDE description .PP .SH SECTIONS .SS Section "actions" .nf .fam C _plugin/function_ [ arguments ] .fam T .fi .PP Actions to perform in order they listed with repective options after action name. Action which is not built-in tried as plugin. .PP built-in actions: .TP .B fetch download and process online list (see notes on dryrun in this document) .TP .B localfetch copy local tmwa online list and process it .TP .B servertime print servertime .TP .B summary print number of players online .TP .B loggedon print players logged on .TP .B loggedoff print players logged off .TP .B newline print newline .TP .B ring use default ring .TP .B trigger execute custom commands for logon/logoff events from "trigger" section .TP .B external special word forging action command line and passing it to external executable .TP .B event same as external but only when logon/logoff detected .TP .B script execute script embedded inside section .PP \fIring\fP calls \fIPLAY\fP command with argument from \fIevent\fP section on matched event. If \fIRINGSOCKET\fP set to "yes", tmww will send JSON line using mbuzzer util; see \fBtmww-mbuzzer\fP(1) . .PP \fIexternal\fP command passes arguments to external application. .PP Examples: .PP .nf .fam C external echo tmp: $TMWW_TMP external echo 123 | awk -- "{print \"a $servername b\",\$0,\"c\"}" external printf "some variable %s here\n" $TMWW_LINK external sleep 2 event printf "\a" .fam T .fi .PP \fIscript\fP executes shell code from defined section. All internal facilities available. See man section "Script". .SS Section "event" .nf .fam C all { on | off } { event | file | festival } STRING list LIST { on | off } { event | file | festival } STRING pattern REGEXP { on | off } { event | file | festival } STRING .fam T .fi .PP Rules for RING action. Only last matched event will be played. .PP Pattern match char names with extended regexp. Lists are taken from LISTPATH, see \fBtmww-list\fP(7) . "event" matters more with \fIRINGSOCKET\fP var set to "yes" (event sound symlinks are taken from \fIRINGPATH\fP ). "festival" will send following data as stdin for festival \fB--tts\fP. .PP Comments starting with "#" are allowed. This section is empty by default. .SS Section "trigger" .nf .fam C all { on | off } COMMAND list LIST { on | off } COMMAND pattern REGEXP { on | off } COMMAND .fam T .fi .PP Commands to be called on respective logon/logoff event; e.g. bot launcher commands (as simple monitor). All lines are checked (except commented lines). .PP Comments starting with "#" are allowed. This section is empty by default. .SS Section "overload" .nf .fam C lib substituted_libs+ .fam T .fi .PP This section is empty by default and used to overload libraries providing functions with colliding names. .PP .SH SCRIPT ACTION \fIscript\fP executes shell code from defined section. All internal facilities available. See man section "Script". .PP Parameters are taken from actions list. To restore parameters from command line, do: .PP .nf .fam C eval set -- "$prefixed_params" .fam T .fi .PP Section should be finished just as any other section with line containing only "}". Return from "script" action is done with "continue" statement. .PP NOTE: there are some troubles e.g. with escaping double quotes inside double quotes caused by executing from shell eval function, they are easily bypassed with single quotes or double/single quotes alteration. .PP See \fBtmww-plugin\fP(7) for description of tmww provided facilities. .PP .SH NOTES .SS Multiple users setup Script won't do your administrative tasks, so it's necessary that shared folders (like TMP) are manually created with chgrp and chmod 2770 (ug+rw and g+s); user umask should be 002 (if no other methods, should be added in ~/.profile), or better of all ACL set with .PP .nf .fam C setfacl -d -m group:yourgroup:rw shared/ .fam T .fi .PP There are two options to check: .IP 1) 4 directory with group write access so group members can remove files .IP 2) 4 files are g+w which most probably require setting up ACL .PP Operations on shared files require both things but online lists sharing ("fetch" action) will work even without ACL set just with files removed before write attempt. .PP .nf .fam C PLUGINPATH /shared/folder/plugins UTILPATH /shared/folder/utils LOCK /shared/folder/.tmp/lock TMP /shared/folder/.tmp .fam T .fi .PP .SH EXAMPLE See example_config.conf in distribution. .PP .SH COPYRIGHT This document is part of tmww - The Mana World Watcher scripts. .PP Licensed under terms of GNU General Public License version 3. For full text of license see COPYING file distributed with tmww. .PP .SH AUTHORS willee , 2012-2014 .PP .SH SEE ALSO \fBtmww\fP(1), \fBtmww-plugin\fP(7), \fBtmww-mbuzzer\fP(1)