GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/tmwa/adminhandler.cpp Lines: 0 81 0.0 %
Date: 2021-03-17 Branches: 0 32 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2004-2009  The Mana World Development Team
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 *  Copyright (C) 2011-2019  The ManaPlus Developers
6
 *  Copyright (C) 2019-2021  Andrei Karas
7
 *
8
 *  This file is part of The ManaPlus Client.
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  any later version.
14
 *
15
 *  This program is distributed in the hope that it will be useful,
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 *  GNU General Public License for more details.
19
 *
20
 *  You should have received a copy of the GNU General Public License
21
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
 */
23
24
#include "net/tmwa/adminhandler.h"
25
26
#include "game.h"
27
28
#include "net/tmwa/messageout.h"
29
#include "net/tmwa/protocolout.h"
30
31
#include "utils/gmfunctions.h"
32
#include "utils/stringutils.h"
33
34
#include "debug.h"
35
36
namespace TmwAthena
37
{
38
39
AdminHandler::AdminHandler() :
40
    Ea::AdminHandler()
41
{
42
    adminHandler = this;
43
}
44
45
AdminHandler::~AdminHandler()
46
{
47
    adminHandler = nullptr;
48
}
49
50
void AdminHandler::announce(const std::string &text) const
51
{
52
    createOutPacket(CMSG_ADMIN_ANNOUNCE);
53
    outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
54
    outMsg.writeString(text, CAST_S32(text.length()), "message");
55
}
56
57
void AdminHandler::localAnnounce(const std::string &text) const
58
{
59
    createOutPacket(CMSG_ADMIN_LOCAL_ANNOUNCE);
60
    outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
61
    outMsg.writeString(text, CAST_S32(text.length()), "message");
62
}
63
64
void AdminHandler::hide(const bool h A_UNUSED) const
65
{
66
    createOutPacket(CMSG_ADMIN_HIDE);
67
    outMsg.writeInt32(0, "unused");
68
}
69
70
void AdminHandler::kick(const BeingId playerId) const
71
{
72
    createOutPacket(CMSG_ADMIN_KICK);
73
    outMsg.writeBeingId(playerId, "account id");
74
}
75
76
void AdminHandler::kickAll() const
77
{
78
}
79
80
void AdminHandler::warp(const std::string &map, const int x, const int y) const
81
{
82
    Gm::runCommand("warp",
83
        strprintf("%s %d %d", map.c_str(), x, y));
84
}
85
86
void AdminHandler::resetStats() const
87
{
88
}
89
90
void AdminHandler::resetSkills() const
91
{
92
}
93
94
void AdminHandler::gotoName(const std::string &name) const
95
{
96
    Gm::runCommand("goto", name);
97
}
98
99
void AdminHandler::recallName(const std::string &name) const
100
{
101
    Gm::runCommand("recall", name);
102
}
103
104
void AdminHandler::mute(const Being *const being A_UNUSED,
105
                        const int type A_UNUSED,
106
                        const int limit A_UNUSED) const
107
{
108
}
109
110
void AdminHandler::muteName(const std::string &name A_UNUSED) const
111
{
112
}
113
114
void AdminHandler::requestLogin(const Being *const being A_UNUSED) const
115
{
116
}
117
118
void AdminHandler::setTileType(const int x A_UNUSED, const int y A_UNUSED,
119
                               const int type A_UNUSED) const
120
{
121
}
122
123
void AdminHandler::unequipAll(const Being *const being A_UNUSED) const
124
{
125
}
126
127
void AdminHandler::requestStats(const std::string &name A_UNUSED) const
128
{
129
}
130
131
void AdminHandler::monsterInfo(const std::string &name A_UNUSED) const
132
{
133
}
134
135
void AdminHandler::itemInfo(const std::string &name A_UNUSED) const
136
{
137
}
138
139
void AdminHandler::whoDrops(const std::string &name A_UNUSED) const
140
{
141
}
142
143
void AdminHandler::mobSearch(const std::string &name A_UNUSED) const
144
{
145
}
146
147
void AdminHandler::mobSpawnSearch(const std::string &name A_UNUSED) const
148
{
149
}
150
151
void AdminHandler::playerGmCommands(const std::string &name A_UNUSED) const
152
{
153
}
154
155
void AdminHandler::playerCharGmCommands(const std::string &name A_UNUSED) const
156
{
157
}
158
159
void AdminHandler::showLevel(const std::string &name A_UNUSED) const
160
{
161
}
162
163
void AdminHandler::showStats(const std::string &name A_UNUSED) const
164
{
165
}
166
167
void AdminHandler::showStorageList(const std::string &name A_UNUSED) const
168
{
169
}
170
171
void AdminHandler::showCartList(const std::string &name A_UNUSED) const
172
{
173
}
174
175
void AdminHandler::showInventoryList(const std::string &name A_UNUSED) const
176
{
177
}
178
179
void AdminHandler::locatePlayer(const std::string &name A_UNUSED) const
180
{
181
}
182
183
void AdminHandler::showAccountInfo(const std::string &name A_UNUSED) const
184
{
185
}
186
187
void AdminHandler::spawnSlave(const std::string &name A_UNUSED) const
188
{
189
}
190
191
void AdminHandler::spawnClone(const std::string &name A_UNUSED) const
192
{
193
}
194
195
void AdminHandler::spawnSlaveClone(const std::string &name A_UNUSED) const
196
{
197
}
198
199
void AdminHandler::spawnEvilClone(const std::string &name A_UNUSED) const
200
{
201
}
202
203
void AdminHandler::savePosition(const std::string &name A_UNUSED) const
204
{
205
}
206
207
void AdminHandler::loadPosition(const std::string &name A_UNUSED) const
208
{
209
}
210
211
void AdminHandler::randomWarp(const std::string &name A_UNUSED) const
212
{
213
}
214
215
void AdminHandler::gotoNpc(const std::string &name A_UNUSED) const
216
{
217
}
218
219
void AdminHandler::killer(const std::string &name A_UNUSED) const
220
{
221
}
222
223
void AdminHandler::killable(const std::string &name A_UNUSED) const
224
{
225
}
226
227
void AdminHandler::heal(const std::string &name A_UNUSED) const
228
{
229
}
230
231
void AdminHandler::alive(const std::string &name) const
232
{
233
    Gm::runCommand("revive", name);
234
}
235
236
void AdminHandler::disguise(const std::string &name A_UNUSED) const
237
{
238
}
239
240
void AdminHandler::immortal(const std::string &name A_UNUSED) const
241
{
242
}
243
244
void AdminHandler::hide(const std::string &name A_UNUSED) const
245
{
246
    Gm::runCommand("hide");
247
}
248
249
void AdminHandler::nuke(const std::string &name A_UNUSED) const
250
{
251
}
252
253
void AdminHandler::kill(const std::string &name A_UNUSED) const
254
{
255
}
256
257
void AdminHandler::jail(const std::string &name A_UNUSED) const
258
{
259
}
260
261
void AdminHandler::unjail(const std::string &name A_UNUSED) const
262
{
263
}
264
265
void AdminHandler::npcMove(const std::string &name A_UNUSED,
266
                           const int x A_UNUSED,
267
                           const int y A_UNUSED) const
268
{
269
}
270
271
void AdminHandler::hideNpc(const std::string &name A_UNUSED) const
272
{
273
}
274
275
void AdminHandler::showNpc(const std::string &name A_UNUSED) const
276
{
277
}
278
279
void AdminHandler::changePartyLeader(const std::string &name A_UNUSED) const
280
{
281
}
282
283
void AdminHandler::partyRecall(const std::string &name A_UNUSED) const
284
{
285
}
286
287
void AdminHandler::breakGuild(const std::string &name A_UNUSED) const
288
{
289
}
290
291
void AdminHandler::guildRecall(const std::string &name A_UNUSED) const
292
{
293
}
294
295
void AdminHandler::slide(const int x, const int y) const
296
{
297
    warp(Game::instance()->getCurrentMapName(), x, y);
298
}
299
300
void AdminHandler::changeDress() const
301
{
302
}
303
304
void AdminHandler::resetCooldowns() const
305
{
306
}
307
308
}  // namespace TmwAthena