annotate config.urllog.example @ 300:2a9ee3f68225

urllog: Make TLD check configurable.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 27 Jan 2015 08:23:22 +0200
parents 1ff281e821a3
children 916618770490
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 ##########################################################################
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 # URLLog script configuration
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 ##########################################################################
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 ### HTTP options
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 # Set to 1 if you want to enable use of HTTP proxy.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 # If you do, you MUST set the proxy settings below too.
264
d2f65cd528c6 urllog: Change 'http_proxy' variable to 'http_use_proxy'
Matti Hamalainen <ccr@tnsp.org>
parents: 263
diff changeset
12 set http_use_proxy 0
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 # Proxy host and port number (only used if enabled above)
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 set http_proxy_host ""
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 set http_proxy_port 8080
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 # Enable _experimental_ TLS/SSL support. This may not work at all.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 # If unsure, leave this option disabled (0).
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 set http_tls_support 1
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 set http_tls_cadir "/usr/share/ca-certificates/mozilla"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
269
d62280f2a9c7 urllog: Make user agent string configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 267
diff changeset
24 # Set 'user agent' string for HTTP. If empty or not set, default will be used.
d62280f2a9c7 urllog: Make user agent string configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 267
diff changeset
25 set http_user_agent ""
d62280f2a9c7 urllog: Make user agent string configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 267
diff changeset
26
d62280f2a9c7 urllog: Make user agent string configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 267
diff changeset
27
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 ### General options
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 # Channels where URLLog records links/URLs
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 # set urllog_log_channels "#foobar;#baz"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 # You can use * to match substrings or everything
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 set urllog_log_channels "#tnsp;#fireball;#mazmlame"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 # Filename of the SQLite URL database file
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 set urllog_db_file "urllog.sqlite"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 # 1 = Verbose: Say messages when URL is OK, bad, etc.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 # 0 = Quiet : Be quiet (only speak if asked with !urlfind, etc)
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 set urllog_verbose 1
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 # 1 = Enable logging of various script actions into bot's log
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 # 0 = Don't.
267
da239a953e24 urllog: Change some setting names, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 264
diff changeset
50 set urllog_log_enable 1
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 # 1 = Check URLs for validity and existence before adding.
267
da239a953e24 urllog: Change some setting names, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 264
diff changeset
54 # 0 = No checks. Add almost _anything_ that looks like an URL to the database.
da239a953e24 urllog: Change some setting names, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 264
diff changeset
55 # (You probably want this enabled.)
da239a953e24 urllog: Change some setting names, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 264
diff changeset
56 set urllog_extra_checks 1
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57
300
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
58 ### Check if the TLD (top level domain) looks sane
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
59 set urllog_check_tld 1
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
60
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
61 # The valid known Top Level Domains (TLDs), but not the country code TLDs
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
62 set urllog_tld_list "org,com,net,mil,gov,biz,edu,coop,aero,info,museum,name,pro,int,xxx"
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
63
2a9ee3f68225 urllog: Make TLD check configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 299
diff changeset
64
299
1ff281e821a3 urllog: Make rasiatube hack configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 277
diff changeset
65 ### Enable "rasiatube" hack that de-mangles rasiatube links
1ff281e821a3 urllog: Make rasiatube hack configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 277
diff changeset
66 set urllog_rasiatube_hack 1
1ff281e821a3 urllog: Make rasiatube hack configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 277
diff changeset
67
1ff281e821a3 urllog: Make rasiatube hack configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 277
diff changeset
68
263
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 ### Search related settings
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 # Channels where !urlfind and other commands can be used.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 # By default this is set to be the same as urllog_log_channels
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 set urllog_search_channels $urllog_log_channels
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 # Limit how many URLs should the "!urlfind" command show at most.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 set urllog_showmax_pub 3
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 # Same as above, but for private message search.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 set urllog_showmax_priv 6
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 ### ShortURL-settings
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 # To enable ShortURL functionality, you need to set up the
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 # URL redirector PHP script (urlredirect.php) correctly, and
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 # enable change the settings in it and below appropriately.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 # See urlredirect.php.txt for more information.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 #
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 # You will also need SQLite3 support for PHP and access to
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 # change .htaccess file(s) on your web server. The PHP
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 # script will also need access to the SQLite3 database this
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 # script uses.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 #
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 # 1 = Enable showing of ShortURLs
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 # 0 = ShortURLs not shown in any bot actions
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 set urllog_shorturl 1
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 # Max length of original URL to be shown, rest is chopped
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 # off if the URL is longer than the specified amount.
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 set urllog_shorturl_orig 30
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 # Web server URL that handles redirects of ShortURLs
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 set urllog_shorturl_prefix "http://tnsp.org/u/"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 ### Message texts (informal, errors, etc.)
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 # No such host was found
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 set urlmsg_nosuchhost "ei tommosta oo!"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 # Could not connect host (I/O errors etc)
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 set urlmsg_ioerror "kraak, virhe yhdynnässä."
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 # HTTP timeout
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 set urlmsg_timeout "ei jaksa ootella"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 # No such document was found
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 set urlmsg_errorgettingdoc "siitosvirhe"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 # URL was already known (was in database)
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 set urlmsg_alreadyknown "wanha!"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 #set urlmsg_alreadyknown "Empiiristen havaintojen perusteella ja tällä sovellutusalueella esiintyneisiin aikaisempiin kontekstuaalisiin ilmaisuihin viitaten uskallan todeta, että sovellukseen ilmoittamasi tietoverkko-osoite oli kronologisti ajatellen varsin postpresentuaalisesti sopimaton ja ennestään hyvin tunnettu."
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 # No match was found when searched with !urlfind or other command
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 set urlmsg_nomatch "Ei osumia."
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 ### Things that you usually don't need to touch ...
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 ###
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139 # What IRC "command" should we use to send messages:
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 # (Valid alternatives are "PRIVMSG" and "NOTICE")
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 set urllog_preferredmsg "PRIVMSG"
f01d60175c44 urllog: Move configuration to external file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142