Skip to content
This repository was archived by the owner on Feb 21, 2018. It is now read-only.

Commit 9720e30

Browse files
committed
core: Add network name to version string
This is a really cheap way to ensure that clause 2 of the license will always be satisfied. You **MUST** set me::netname in your config.
1 parent 5307d22 commit 9720e30

File tree

3 files changed

+5
-44
lines changed

3 files changed

+5
-44
lines changed

doc/Configuration.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Basic configuration about Cod
2727
| `host` | vhost of pseudoclient | `blub.blub` | string |
2828
| `servicespass` | NickServ password of pesudoclient. Make this complicated and hard to guess | `"yoloswag420"` | string |
2929
| `prefix` | Channel command prefix, suggested to be `@` or `;`. Will not work if more than one character | `"@"` | string |
30+
| `netname` | The name of your network. | `ShadowNET` | string |
3031
| `motd` | MOTD message for a remote /MOTD | `"etc/cod.motd"` | string |
3132
| `dbpath` | path to the SQLite database that Cod uses internally | `"var/cod.db"` | string |
3233

etc/config.json.example

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"me": {
3-
"name": "ardreth.shadownet.int",
3+
"name": "cod.int",
44
"desc": "Cod fishy",
55
"nick": "Cod",
66
"user": "fish",
77
"host": "blub.blub",
88
"servicespass": "FsmaCapyRCfZzeRndmHBteGdm1jGpnOPmLNHMINiulmZTDDNDPEiJHajLEJFeeGbTcDNrGqsEEthkrJGTGEDF3pyjFgiYMxCJJeX",
99

1010
"prefix": "@",
11+
"netname": "ShadowNET",
1112

1213
"motd": "etc/cod.motd",
1314
"dbpath": "var/cod.db"
@@ -21,21 +22,6 @@
2122
"protocol": "elemental-ircd"
2223
},
2324

24-
"dns": {
25-
"pool": "irc.example.com",
26-
"name": "example.com",
27-
"nick": "DNSServ",
28-
"user": "DNSServ",
29-
"host": "services.example.com",
30-
"gecos": "DNS Services"
31-
},
32-
33-
"mpd": {
34-
"host": "127.0.0.1",
35-
"port": 6600,
36-
"channel": "#sparkleradio"
37-
},
38-
3925
"etc": {
4026
"debug": false,
4127
"production": true,
@@ -46,31 +32,4 @@
4632
"suffixfile": "etc/suffix.txt",
4733
"logfile": "var/cod.log"
4834
},
49-
50-
"faq": {
51-
"nick": "FAQServ",
52-
"user": "faq",
53-
"host": "services.example.com",
54-
"gecos": "FAQ Service"
55-
},
56-
57-
"tortoiselabs": {
58-
"username": "herpenderp",
59-
"apikey": "asdfasdf"
60-
},
61-
62-
"autocloak": {
63-
"nick": "Gatekeeper",
64-
"user": "cloakbot",
65-
"host": "services.example.com",
66-
"gecos": "Automatic cloaker",
67-
68-
"list": {
69-
"127.45.123.69": "bnc.example.com"
70-
}
71-
},
72-
73-
"apikeys": {
74-
"worldweatheronline": "asdfasdfasdfasdf"
75-
}
7635
}

src/cod.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def __init__(self, configpath):
5353
client tables, and other variables needed for Cod to work
5454
properly are initialized here.
5555
"""
56-
self.version = VERSION
5756

5857
self.link = socket.socket()
5958

@@ -80,6 +79,8 @@ def __init__(self, configpath):
8079
#Load config file
8180
self.config = config.Config(configpath).config
8281

82+
self.version = "%s-%s" % (VERSION, self.config["me"]["netname"])
83+
8384
#logger instance
8485
self.logger = log.Logger(self.config["etc"]["logfile"])
8586

0 commit comments

Comments
 (0)