forked from billyvg/piebot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.py.default
More file actions
72 lines (64 loc) · 2.27 KB
/
bootstrap.py.default
File metadata and controls
72 lines (64 loc) · 2.27 KB
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
from db import db
if db.configuration.find().count() == 0:
data = [{'key': 'network',
'value': 'localhost',
'description': 'The name of the network to connect to. (temp. )'},
{'key': 'port',
'value': '6667',
'description': 'The port of the IRC server.'},
{'key': 'nickname',
'value': 'ppbot',
'description': 'The nickname that the bot should use.'},
{'key': 'password',
'value': '',
'description': 'The password for a server if necessary'},
{'key': 'alt_nickname',
'value': 'ppbot_',
'description': 'An alternate nickname the bot should use if the primary is in use.'},
{'key': 'realname',
'value': 'Powered by billy',
'description': 'The "real name" field displayed on /whois.'},
{'key': 'me',
'value': 'billy',
'description': 'lol...'},
{'key': 'trigger',
'value': '.',
'description': 'The trigger that the bot should respond to.'}
]
db.configuration.insert(data)
if db.access_levels.find().count() == 0:
data = [{'level': 0,
'name': 'all'},
{'level': 20,
'name': 'guest'},
{'level': 40,
'name': 'user'},
{'level': 60,
'name': 'op'},
{'level': 80,
'name': 'master'},
{'level': 100,
'name': 'owner'}
]
db.access_levels.insert(data)
if db.networks.find().count() == 0:
data = [{'name': 'gamesurge'},
{'name': 'freenode'}]
db.networks.insert(data)
if db.servers.find().count() == 0:
data = [{'network': 'gamesurge',
'address': 'irc.gamesurge.net',
'port': 6667,
'nickname': 'ppbot',
'alt_nickname': 'ppbot'},
{'network': 'freenode',
'address': 'irc.freenode.org',
'port': 6667,
'nickname': 'ppbot',
'alt_nickname': 'ppbot'}]
db.servers.insert(data)
if db.channels.find().count() == 0:
data = [{'network': 'gamesurge',
'name': '#channel'},
{'network': 'freenode',
'name': '##channel'}]