-
Notifications
You must be signed in to change notification settings - Fork 0
/
urlmagic.conf.example
103 lines (81 loc) · 4.67 KB
/
urlmagic.conf.example
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#! tclsh
################################################################################
# Start of user variables, copy things below this line into #
# URLMAGIC_BASEDIR/urlmagic.conf #
# e.g. by executing cat urlmagic.conf.example > urlmagic.conf #
################################################################################
namespace eval ::urlmagic {
# links posted by users with these flags are ignored
set settings(ignore-flags) bdkqr|dkqr
# stop listening for this many seconds after processing an address
set settings(seconds-between) 10
# stop listening to a user for this many seconds after they mentioned an URL
set settings(seconds-between-user) 2
# wait this many milliseconds for a web server to respond
set settings(timeout) 10000
# do not download pages larger than this many bytes (default: 1 MiB = 1*1024*1024 byte)
set settings(max-download) [expr 1*1024*1024]
# if cookie shelf life > this many minutes, eat it sooner
set settings(max-cookie-age) 2880
# HTTP User-Agent which will be sent with each request
set settings(user-agent) "Mozilla/5.0 (compatible; TCL [info patchlevel] HTTP library) 20110501"
# this regular expression is used to detect URLs. URLs which do not contain
# "://" will be extended to assume a default protocol of "http://"
set settings(url-regex) {(https?://|www\.|[a-z0-9\-]+\.[a-z]{2,4}/)[^[:cntrl:][:space:]<>]+}
# After someone posted an URL, ignore them for this many seconds. Set to 0 to disable
set settings(seconds-between-user) 1
# Penalize users flooding URLs for this many seconds
set settings(url-flooding-penalty) 3
# Ignore URLs on a busy channel for this many seconds
set settings(seconds-between-channel) 1
# Add headers you want to send on requests. Accept-Language tells the server
# that you prefer english versions of any document over any other language,
# even if your IP is not geographically located in an English-speaking country.
# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
set settings(default-headers) {"Accept-Language: en, *;q=0.9"}
# What format should be used for the nickname part of the url info that's sent
# to the channel? %s is replaced by the nickname. To insert a literal %, you
# need to use %%. If you don't want the nickname to be inserted, you can set
# this to "". You can also add things like colors and bold here (see the
# eggdrop documentation for the codes).
set settings(nick-format) "<%s>"
# What format should be used for the URL title? %s is replaced by the link
# title or the content type in case a title isn't available (for instance,
# because the link does not point to a website but an image).
# As always with IRC messages, \002 is bold. First \002 turns bold text on, the
# second one turns it off again.
set settings(title-format) "\002%s\002"
# Set this if you don't want the titles to be printed to the channel for some
# reason, for instance because you only want to tweet them or log them to
# sqlite. There's also an udef flag (.chanset #channel +urlmagic-silent) you
# can set if you want to silence the title announcements only on a particular
# channel.
set settings(global-silent) no
# Uncomment either of the following lines, gumbo is recommended but will
# require you to install the Google gumbo library and to compile a Tcl module
# in the subdirectory "htmltitle_gumbo". arabica is another such module using
# the arabica HTML/tagsoup parser. Finally, "dumb" is an implementation written
# in Tcl, which uses a simple regex. This doesn't always work, but should be
# okay most of the time. Use this if you can't compile code for some reason.
# Currently, best results are achieved by using the gumbo library, which is the
# default for that reason. However, it is not packaged on most Linux
# distributions as of mid 2014. A workaround is to use the implementation in
# perl (which has additional dependencies, see below as well as the README)
set settings(htmltitle) "gumbo"
#set settings(htmltitle) "arabica"
#set settings(htmltitle) "dumb"
#set settings(htmltitle) "perl" ;# see below
# Here you can change the perl interpreter which is used by the title parser.
# The default should probably work on most systems.
set settings(perl-interpreter) "/usr/bin/env perl"
# Here you can specify which plugins to load. See the plugins directory for a
# list of plugins. They each have a description and maybe settings which you
# should also copy-paste to this config file. The list items are separated by
# space.
#
# Default: no plugins are enabled.
set settings(plugins) {}
# Example (contains all plugins which currently exist, pick any that you like):
#
#set settings(plugins) {nsfw size sqlite tinyurl twitter}
}