-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun.php
More file actions
41 lines (30 loc) · 1005 Bytes
/
run.php
File metadata and controls
41 lines (30 loc) · 1005 Bytes
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
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use Spires\Irc\Client;
// Report all PHP errors.
error_reporting(E_ALL);
// Allow the script to hang around waiting for connections.
set_time_limit(0);
// Turn on implicit output flushing so we see what we're getting as it comes in.
ob_implicit_flush();
// Create new instance of the core
$core = new \Spires\Core\Core(realpath(__DIR__));
// Core providers
$core->register(\Spires\Irc\ServiceProvider::class, [
'connection.channel' => '##martinsbottesting',
'connection.server' => 'irc.freenode.com',
'connection.port' => 6667,
'user.nickname' => 'spires',
'user.username' => 'spiresbot',
'user.realname' => 'Spires ALPHA',
]);
$core->registerBaseServiceProviders();
// Additional providers
//$core->register(\YourNamespace\Spires\PluginName\ServiceProvider::class);
// Boot the providers
$core->boot();
$client = $core->make(Client::class);
$client->logCore($core);
$client->connect();
$client->run();