public
imalexnord
read
Discord-Hetzner-Bot
No description yet
Languages
Repository composition by tracked source files.
Python
100%
Create file
Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/discord-hetzner-bot.git
ssh://[email protected]:2222/user/imalexnord/discord-hetzner-bot.git
Trace
game.py
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
game.py
on main
Author
Date
Commit
Line
Code
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 1
from hcloud import Client
from hcloud import Client
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 2
from hcloud.images.domain import Image
from hcloud.images.domain import Image
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 3
from hcloud.servers.domain import Server
from hcloud.servers.domain import Server
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 4
from hcloud.server_types.domain import ServerType
from hcloud.server_types.domain import ServerType
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 5
from hcloud.volumes.domain import Volume
from hcloud.volumes.domain import Volume
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 6
from hcloud.locations.domain import Location
from hcloud.locations.domain import Location
same change
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 7
import asyncio
import asyncio
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 8
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 9
class GameData:
class GameData:
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 10
running = False
running = False
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 11
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 12
def __init__(self, token, name, servertype, snapshot, location, volume):
def __init__(self, token, name, servertype, snapshot, location, volume):
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 13
self.name = name
self.name = name
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 14
self.servertype = servertype.strip() if isinstance(servertype, str) else servertype
self.servertype = servertype.strip() if isinstance(servertype, str) else servertype
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 15
self.client = Client(token=token)
self.client = Client(token=token)
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 16
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 17
# --- snapshot/image (optional) ---
# --- snapshot/image (optional) ---
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 18
# If snapshot is None => we'll fall back to Ubuntu 24.04 in start()
# If snapshot is None => we'll fall back to Ubuntu 24.04 in start()
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 19
self.snapshot = None
self.snapshot = None
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 20
if snapshot is not None:
if snapshot is not None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 21
images = self.client.images.get_all()
images = self.client.images.get_all()
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 22
for img in images:
for img in images:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 23
# support matching by description OR name
# support matching by description OR name
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 24
if img.data_model.description == snapshot or img.data_model.name == snapshot:
if img.data_model.description == snapshot or img.data_model.name == snapshot:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 25
self.snapshot = img.data_model.id
self.snapshot = img.data_model.id
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 26
break
break
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 27
if self.snapshot is None:
if self.snapshot is None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 28
raise ValueError(f"Snapshot/Image not found: {snapshot}")
raise ValueError(f"Snapshot/Image not found: {snapshot}")
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 29
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 30
# --- location (required) ---
# --- location (required) ---
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 31
self.location = None
self.location = None
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 32
locations = self.client.locations.get_all()
locations = self.client.locations.get_all()
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 33
for loc in locations:
for loc in locations:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 34
if loc.data_model.name == location:
if loc.data_model.name == location:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 35
self.location = loc.data_model.id
self.location = loc.data_model.id
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 36
break
break
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 37
if self.location is None:
if self.location is None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 38
raise ValueError(f"Location not found: {location}")
raise ValueError(f"Location not found: {location}")
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 39
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 40
# --- volume (optional) ---
# --- volume (optional) ---
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 41
self.volume = None
self.volume = None
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 42
if volume is not None:
if volume is not None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 43
volumes = self.client.volumes.get_all()
volumes = self.client.volumes.get_all()
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 44
for vol in volumes:
for vol in volumes:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 45
if vol.data_model.name == volume and vol.data_model.location.data_model.id == self.location:
if vol.data_model.name == volume and vol.data_model.location.data_model.id == self.location:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 46
self.volume = vol.data_model.id
self.volume = vol.data_model.id
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 47
break
break
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 48
if self.volume is None:
if self.volume is None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 49
raise ValueError(f"Volume not found in location {location}: {volume}")
raise ValueError(f"Volume not found in location {location}: {volume}")
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 50
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 51
# --- check for existing server by name ---
# --- check for existing server by name ---
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 52
servers = self.client.servers.get_all()
servers = self.client.servers.get_all()
err0x5dd
over 7 years ago
94306f0
Fixed different indent
- Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 53
self.server = None
self.server = None
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 54
for s in servers:
for s in servers:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 55
if s.data_model.name == name:
if s.data_model.name == name:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 56
self.server = s # keep the Server object
self.server = s # keep the Server object
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 57
self.running = True
self.running = True
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 58
print("existing server " + self.server.status)
print("existing server " + self.server.status)
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 59
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 60
async def start(self):
async def start(self):
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 61
if not self.running:
if not self.running:
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 62
print("Starting " + self.name)
print("Starting " + self.name)
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 63
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 64
# Choose image:
# Choose image:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 65
# - if snapshot provided => use that snapshot image id
# - if snapshot provided => use that snapshot image id
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 66
# - else => boot from Ubuntu 24.04 (Hetzner public image name)
# - else => boot from Ubuntu 24.04 (Hetzner public image name)
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 67
image = Image(self.snapshot) if self.snapshot is not None else "ubuntu-24.04"
image = Image(self.snapshot) if self.snapshot is not None else "ubuntu-24.04"
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 68
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 69
# Attach volume only if configured
# Attach volume only if configured
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 70
volumes = [Volume(self.volume)] if self.volume is not None else None
volumes = [Volume(self.volume)] if self.volume is not None else None
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 71
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 72
response = self.client.servers.create(
response = self.client.servers.create(
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 73
name=self.name,
name=self.name,
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 74
server_type=ServerType(name=self.servertype),
server_type=ServerType(name=self.servertype),
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 75
image=image,
image=image,
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 76
location=Location(self.location),
location=Location(self.location),
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 77
volumes=volumes
volumes=volumes
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 78
)
)
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 79
self.server = response.server
self.server = response.server
err0x5dd
over 7 years ago
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 80
self.running = True
self.running = True
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 81
else:
else:
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 82
print(self.name + " is already running")
print(self.name + " is already running")
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 83
err0x5dd
about 7 years ago
4a1e1f5
Added location infos and possibly fixed some bugs
- Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477- Author
- err0x5dd <[email protected]>
- Date
- about 7 years ago
- Selected line
- 84
async def stop(self):
async def stop(self):
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 85
if self.running:
if self.running:
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 86
print("Stopping " + self.name)
print("Stopping " + self.name)
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 87
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 88
self.client.servers.shutdown(self.server)
self.client.servers.shutdown(self.server)
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 89
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 90
# Give it time to begin shutdown, then poll status
# Give it time to begin shutdown, then poll status
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 91
await asyncio.sleep(5)
await asyncio.sleep(5)
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 92
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 93
while True:
while True:
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 94
serv = self.client.servers.get_by_id(self.server.id)
serv = self.client.servers.get_by_id(self.server.id)
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 95
self.server = serv
self.server = serv
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 96
print(self.server.status)
print(self.server.status)
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 97
if self.server.status == Server.STATUS_OFF:
if self.server.status == Server.STATUS_OFF:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 98
break
break
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 99
await asyncio.sleep(5)
await asyncio.sleep(5)
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 100
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 101
print("Server is now stopped")
print("Server is now stopped")
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 102
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 103
# Detach volume only if configured
# Detach volume only if configured
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 104
if self.volume is not None:
if self.volume is not None:
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 105
self.client.volumes.detach(Volume(self.volume))
self.client.volumes.detach(Volume(self.volume))
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 106
await asyncio.sleep(1)
await asyncio.sleep(1)
same change
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 107
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 108
self.client.servers.delete(self.server)
self.client.servers.delete(self.server)
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 109
self.running = False
self.running = False
err0x5dd
over 7 years ago
94306f0
Fixed different indent
- Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 110
self.server = None
self.server = None
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 111
else:
else:
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 112
print(self.name + " isn't running")
print(self.name + " isn't running")
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 113
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 114
def status(self):
def status(self):
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 115
msg = self.name
msg = self.name
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 116
if self.server is None:
if self.server is None:
err0x5dd
over 7 years ago
94306f0
Fixed different indent
- Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 117
msg += " isn't running"
msg += " isn't running"
err0x5dd
over 7 years ago
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 118
else:
else:
same change
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 119
self.server = self.client.servers.get_by_id(self.server.id)
self.server = self.client.servers.get_by_id(self.server.id)
same change
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 120
msg += " is in status "
msg += " is in status "
same change
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 121
msg += self.server.status
msg += self.server.status
same change
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 122
msg += "\n"
msg += "\n"
same change
f53003d
Fixed some error to hopefully prevent a crash
- Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 123
msg += "and has the IP:\n"
msg += "and has the IP:\n"
err0x5dd
over 7 years ago
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 124
ip = self.server.public_net.ipv4.ip
ip = self.server.public_net.ipv4.ip
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 125
msg += ip + "\n"
msg += ip + "\n"
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 126
return msg
return msg
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 127
same change
d21b0dd
Fuck Windows line seperator
- Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede- Author
- err0x5dd <[email protected]>
- Date
- over 7 years ago
- Selected line
- 128
def isRunning(self):
def isRunning(self):
Alex Carrington
7 months ago
25636c1
Refactor game and Discord bot logic, remove samples
- Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e- Author
- Alex Carrington <[email protected]>
- Date
- 7 months ago
- Selected line
- 129
return self.running
return self.running