This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.php.example
197 lines (151 loc) · 5.25 KB
/
config.php.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?php
use Chrismou\Phergie\Plugin\Audioscrobbler\Plugin as AudioscrobblerPlugin;
use Chrismou\Phergie\Plugin\Dice\Plugin as DicePlugin;
use Chrismou\Phergie\Plugin\Google\Plugin as GooglePlugin;
use Chrismou\Phergie\Plugin\PingPong\Plugin as PingPongPlugin;
use Chrismou\Phergie\Plugin\Weather\Plugin as WeatherPlugin;
use Phergie\Irc\Connection;
use Phergie\Irc\Plugin\React\AutoJoin\Plugin as AutoJoinPlugin;
use Phergie\Irc\Plugin\React\BOFH\Plugin as BofhPlugin;
use Phergie\Irc\Plugin\React\Command\Plugin as CommandPlugin;
use Phergie\Irc\Plugin\React\CommandHelp\Plugin as CommandHelpPlugin;
use Phergie\Irc\Plugin\React\Daddy\Plugin as DaddyPlugin;
use Phergie\Irc\Plugin\React\EventFilter\Plugin as EventFilterPlugin;
use Phergie\Irc\Plugin\React\EventFilter\UserFilter;
use Phergie\Irc\Plugin\React\EventFilter\UserModeFilter;
use Phergie\Irc\Plugin\React\JoinPart\Plugin as JoinPartPlugin;
use Phergie\Irc\Plugin\React\MagicEightBall\Plugin as MagicEightBallPlugin;
use Phergie\Irc\Plugin\React\NickServ\Plugin as NickServPlugin;
use Phergie\Irc\Plugin\React\Quit\Plugin as QuitPlugin;
use Phergie\Irc\Plugin\React\TableFlip\Plugin as TableFlipPlugin;
use Phergie\Irc\Plugin\React\Url\DefaultUrlHandler;
use Phergie\Irc\Plugin\React\Url\Mime as MimeHandlers;
use Phergie\Irc\Plugin\React\Url\Plugin as UrlPlugin;
use Phergie\Irc\Plugin\React\UserMode\Plugin as UserModePlugin;
use Phergie\Irc\Plugin\React\YouTube\Plugin as YouTubePlugin;
use Phergie\Plugin\Dns\Plugin as DnsPlugin;
use Phergie\Plugin\Http\Plugin as HttpPlugin;
use PSchwisow\Phergie\Plugin\UrlShorten\Plugin as UrlShortenPlugin;
use PSchwisow\Phergie\Plugin\Puppet\Plugin as PuppetPlugin;
use Renegade334\Phergie\Plugin\React\Ping\Plugin as PingPlugin;
use Shutterstock\Phergie\Plugin\Bigstock\Plugin as BigstockPlugin;
$dotenv = new Dotenv\Dotenv(__DIR__);
$dotenv->load();
$audioscrobbler = new AudioscrobblerPlugin([
'lastfm' => getenv('LASTFM_API_KEY'),
]);
$bigstock = new BigstockPlugin([
// REQUIRED: The API account ID associated with your Bigstock account
'accountId' => getenv('BIGSTOCK_ACCOUNT_ID'),
// OPTIONAL: The formatter used for output (default value is shown)
'formatter' => new \Shutterstock\Phergie\Plugin\Bigstock\DefaultFormatter(
'%title% - %url_short% < %large_thumb% >'
),
// OPTIONAL: How long to wait for URL shortener before skipping it (default value is shown)
'shortenTimeout' => 15,
]);
$bofh = new BofhPlugin([]);
$dice = new DicePlugin;
$google = new GooglePlugin;
$joinpart = new JoinPartPlugin;
$puppet = new PuppetPlugin;
$table_flip = new TableFlipPlugin;
$usermode = new UserModePlugin;
$weather = new WeatherPlugin([
'config' => [
'appId' => getenv('WEATHER_APP_ID'),
],
]);
$quit = new QuitPlugin;
return [
'plugins' => [
$audioscrobbler,
new AutoJoinPlugin([
'channels' => [
'##phergie-testing'
],
'wait-for-nickserv' => true,
]),
$bigstock,
$bofh,
new CommandHelpPlugin([
'plugins' => [
$audioscrobbler,
$bigstock,
$bofh,
$dice,
$google,
$joinpart,
$puppet,
$table_flip,
$weather,
$quit,
],
]),
new CommandPlugin([
'prefix' => '!',
]),
new DaddyPlugin,
$dice,
new DnsPlugin,
new EventFilterPlugin([
'plugins' => [
$puppet,
$quit,
],
'filter' => new UserFilter(['YOUR-NICK!*@*']), # CHANGE ME
]),
new EventFilterPlugin([
'plugins' => [
$joinpart,
],
'filter' => new UserModeFilter(
// Pre-configured instance of \Phergie\Irc\Plugin\React\UserMode\Plugin
$usermode,
// List of letters corresponding to user modes for which to allow events
array('o', 'v')
)
]),
$google,
new HttpPlugin,
$joinpart,
new MagicEightBallPlugin,
new NickServPlugin([
'password' => getenv('NICKSERV_PASSWORD'),
]),
new PingPlugin,
new PingPongPlugin([
'reply' => true,
]),
$table_flip,
$usermode,
new UrlPlugin([
'handler' => new DefaultUrlHandler(
'[%url-short%] %composed-title%',
[
new MimeHandlers\Html,
new MimeHandlers\Image,
]
),
]),
new UrlShortenPlugin,
$weather,
new YouTubePlugin([
'key' => getenv('YOUTUBE_KEY'),
'publishedFormat' => 'Y-m-d H:i',
'durationFormat' => '%hh%im%ss',
]),
],
'connections' => [
new Connection([
'serverHostname' => 'irc.freenode.net',
'serverPort' => 6697,
'username' => 'Your-Phergie', # CHANGE ME
'realname' => 'Your name', # CHANGE ME
'nickname' => 'Alt-Phergie', # CHANGE ME
'options' => [
'transport' => 'ssl',
],
]),
],
];