]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/matrix.qc
Update the weapon ammo notification to point people to the developers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / matrix.qc
1 #include "matrix.qh"
2
3 #include "client.qh"
4
5 var void MX_Handle(int buf, string ancestor)
6 {
7     string type = json_get(buf, strcat(ancestor, ".type"));
8     switch (type) {
9         case "m.room.message": {
10             string msgtype = json_get(buf, strcat(ancestor, ".content.msgtype"));
11             switch (msgtype) {
12                 case "m.text": {
13                     string sender = json_get(buf, strcat(ancestor, ".sender"));
14                     string body = json_get(buf, strcat(ancestor, ".content.body"));
15                     if (sender != matrix_user && body) Say(NULL, false, NULL, body, false);
16                     break;
17                 }
18             }
19             break;
20         }
21     }
22 }