Skip to content

Commit 20cce4a

Browse files
committed
Merge branch 'develop'
2 parents af8868a + 2bbac26 commit 20cce4a

File tree

6 files changed

+47
-8
lines changed

6 files changed

+47
-8
lines changed

Diff for: README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,29 @@ is being used for this one as well. Feel free to drop by.
1919
Installation
2020
============
2121
These instructions are for Debian 7 or 8 (use the latter if you can choose). For Ubuntu,
22-
it's pretty much the same except you add Ubuntu 15's package repository temporarily,
23-
since it has Python 3.5 in it. You're on your own for the time being on other distros,
22+
see the [wiki entry](https://github.com/MinoMino/minqlx/wiki/Ubuntu) for details.
23+
You're on your own for the time being on other distros,
2424
but feel free to add instructions to the [wiki](https://github.com/MinoMino/minqlx/wiki)
2525
if you want to help out.
2626

2727
- Install Python 3.5. At the time of writing, in Debian 7 or 8 you can install it by adding the `sid` repository to apt. This can be done by adding the line `deb http://ftp.debian.org/debian sid main` to
28-
`/etc/apt/sources.list`. We also use Redis and git for our standard plugins, so we install that as well:
28+
`/etc/apt/sources.list`. You can now go ahead and install it with the following:
2929

3030
```
3131
sudo apt-get update
3232
sudo apt-get -y install python3.5 python3.5-dev
33-
sudo apt-get -y install redis-server git
3433
```
3534

3635
- You should remove `sid` by commenting out or removing the line you added to `sources.list`
3736
earlier and then do `sudo apt-get update` again to make sure you don't install any unstable
3837
packages unintentionally later.
3938

39+
- Now you should get Redis and Git, which will be used by minqlx's plugins:
40+
41+
```
42+
sudo apt-get -y install redis-server git
43+
```
44+
4045
- Download one of the tarballs in [releases](https://github.com/MinoMino/minqlx/releases) and extract
4146
its contents into `steamcmd/steamapps/common/qlds`, or whatever other directory you might have put the
4247
files of your server in.
@@ -46,7 +51,7 @@ the directory with all the server files (and where you extracted the above files
4651

4752
```
4853
git clone https://github.com/MinoMino/minqlx-plugins.git
49-
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
54+
wget https://bootstrap.pypa.io/get-pip.py
5055
sudo python3.5 get-pip.py
5156
rm get-pip.py
5257
sudo apt-get -y install build-essential

Diff for: patterns.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#define MASK_COM_PRINTF "XXXXXXX----XXXXXX----XXXX----XXXX----XXXX----"
1313
#define PTRN_CMD_ADDCOMMAND "\x41\x55\x49\x89\xf5\x41\x54\x49\x89\xfc\x55\x53\x48\x83\xec\x00\x48\x8b\x1d\x00\x00\x00\x00\x48\x85\xdb\x75\x00\xeb\x00\x66\x90\x48\x8b\x1b\x48\x85\xdb\x74\x00\x48\x8b\x73\x00\x4c\x89\xe7"
1414
#define MASK_CMD_ADDCOMMAND "XXXXXXXXXXXXXXX-XXX----XXXX-X-XXXXXXXXX-XXX-XXX"
15-
#define PTRN_CMD_ARGS "\x8b\x05\x00\x00\x00\x00\xc6\x05\xa3\xc8\x43\x00\x00\x83\xf8\x00\x0f\x8e\x00\x00\x00\x00\x41\x54\x44\x8d\x60\x00\x83\xe8\x00\x55\x48\x8d\x68\x00\x53\x31\xdb\x66\x0f\x1f\x84\x00\x00\x00\x00\x00"
15+
#define PTRN_CMD_ARGS "\x8b\x05\x00\x00\x00\x00\xc6\x05\x73\xc8\x43\x00\x00\x83\xf8\x00\x0f\x8e\x00\x00\x00\x00\x41\x54\x44\x8d\x60\x00\x83\xe8\x00\x55\x48\x8d\x68\x00\x53\x31\xdb\x66\x0f\x1f\x84\x00\x00\x00\x00\x00"
1616
#define MASK_CMD_ARGS "XX----XXXXX-XXX-XX----XXXXX-XX-XXXX-XXXXXXX----X"
1717
#define PTRN_CMD_ARGV "\x3b\x3d\x00\x00\x00\x00\xb8\x00\x00\x00\x00\x73\x00\x48\x63\xff\x48\x8b\x04\xfd\x00\x00\x00\x00\xf3\xc3"
1818
#define MASK_CMD_ARGV "XX----X----X-XXXXXXX----XX"
1919
#define PTRN_CMD_ARGC "\x8b\x05\x00\x00\x00\x00\xc3"
2020
#define MASK_CMD_ARGC "XX----X"
21-
#define PTRN_CMD_TOKENIZESTRING "\x48\x85\xff\x53\xc7\x05\x42\x2f\x44\x00\x00\x00\x00\x00\x48\x89\xfb\x0f\x84\x00\x00\x00\x00\x48\x89\xfe\xba\x00\x00\x00\x00\xbf\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x8b\x0d\x00\x00\x00\x00"
21+
#define PTRN_CMD_TOKENIZESTRING "\x48\x85\xff\x53\xc7\x05\x12\x2f\x44\x00\x00\x00\x00\x00\x48\x89\xfb\x0f\x84\x00\x00\x00\x00\x48\x89\xfe\xba\x00\x00\x00\x00\xbf\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x8b\x0d\x00\x00\x00\x00"
2222
#define MASK_CMD_TOKENIZESTRING "XXXXXXXXX----XXXXXX----XXXX----X----X----XX----"
2323
#define PTRN_CBUF_EXECUTETEXT "\x83\xff\x00\x74\x00\x83\xff\x00\x74\x00\x85\xff\x74\x00\xbe\x00\x00\x00\x00\x31\xff\x31\xc0\xe9\x00\x00\x00\x00\x0f\x1f\x40\x00\x48\x85\xf6\x74\x00\x80\x3e\x00\x75\x00\xe9\x00\x00\x00\x00\x90"
2424
#define MASK_CBUF_EXECUTETEXT "XX-X-XX-X-XXX-X----XXXXX----XXX-XXXX-XX-X-X----X"

Diff for: python/minqlx/_core.py

+5
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ def set_plugins_version(path):
219219
setattr(minqlx, "__plugins_version__", "{}-{}".format(version, branch))
220220

221221
def set_map_subtitles():
222+
# We save the actual values before setting them so that we can retrieve them in Game.
223+
setattr(minqlx, "_map_title", minqlx.get_configstring(3))
224+
setattr(minqlx, "_map_subtitle1", minqlx.get_configstring(678))
225+
setattr(minqlx, "_map_subtitle2", minqlx.get_configstring(679))
226+
222227
cs = minqlx.get_configstring(678)
223228
if cs:
224229
cs += " - "

Diff for: python/minqlx/_game.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,17 @@ def map(self, value):
9696
@property
9797
def map_title(self):
9898
"""The full name of the map. Ex.: ``Longest Yard``."""
99-
return minqlx.get_configstring(3)
99+
return minqlx._map_title
100+
101+
@property
102+
def map_subtitle1(self):
103+
"""The map's subtitle. Usually either empty or has the author's name."""
104+
return minqlx._map_subtitle1
105+
106+
@property
107+
def map_subtitle2(self):
108+
"""The map's second subtitle. Usually either empty or has the author's name."""
109+
return minqlx._map_subtitle2
100110

101111
@property
102112
def red_score(self):

Diff for: python/minqlx/_player.py

+12
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ def clan(self):
161161
return minqlx.parse_variables(minqlx.get_configstring(529 + self._id))["cn"]
162162
except KeyError:
163163
return ""
164+
165+
@clan.setter
166+
def clan(self, tag):
167+
index = self.id + 529
168+
cs = minqlx.parse_variables(minqlx.get_configstring(index), ordered=True)
169+
cs["xcn"] = tag
170+
cs["cn"] = tag
171+
new_cs = "".join(["\\{}\\{}".format(key, cs[key]) for key in cs])
172+
minqlx.set_configstring(index, new_cs)
164173

165174
@property
166175
def name(self):
@@ -541,6 +550,9 @@ def score(self, value):
541550
def channel(self):
542551
return minqlx.TellChannel(self)
543552

553+
def center_print(self, msg):
554+
minqlx.send_server_command(self.id, "cp \"{}\"".format(msg))
555+
544556
def tell(self, msg, **kwargs):
545557
return minqlx.Plugin.tell(msg, self, **kwargs)
546558

Diff for: python/minqlx/_plugin.py

+7
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,13 @@ def teams(cls, player_list=None):
404404

405405
return res
406406

407+
@classmethod
408+
def center_print(cls, msg, recipient=None):
409+
if recipient:
410+
recipient = cls.client_id(recipient)
411+
412+
minqlx.send_server_command(recipient, "cp \"{}\"".format(msg))
413+
407414
@classmethod
408415
def tell(cls, msg, recipient, **kwargs):
409416
"""Send a tell (private message) to someone.

0 commit comments

Comments
 (0)