Mana
Loading...
Searching...
No Matches
commandhandler.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2008-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <string>
25
26class ChatTab;
27
28extern ChatTab *localChatTab;
29
30std::string booleanOptionInstructions(const char *command);
31
36{
37 public:
39
41
45 void handleCommand(const std::string &command, ChatTab *tab = localChatTab);
46
47 static char parseBoolean(const std::string &value);
48
49 protected:
50 friend class ChatTab;
51 friend class WhisperTab;
52
56 void handleHelp(const std::string &args, ChatTab *tab);
57
61 void handleWhere(const std::string &args, ChatTab *tab);
62
66 void handleWho(const std::string &args, ChatTab *tab);
67
71 void handleMsg(const std::string &args, ChatTab *tab);
72
76 void handleQuery(const std::string &args, ChatTab *tab);
77
81 void handleJoin(const std::string &args, ChatTab *tab);
82
86 void handleListChannels(const std::string &args, ChatTab *tab);
87
91 void handleClear(const std::string &args, ChatTab *tab);
92
96 void handleCreateParty(const std::string &args, ChatTab *tab);
97
101 void handleParty(const std::string &args, ChatTab *tab);
102
106 void handleMe(const std::string &args, ChatTab *tab);
107
111 void handleRecord(const std::string &args, ChatTab *tab);
112
116 void handleToggle(const std::string &args, ChatTab *tab);
117
121 void handlePresent(const std::string &args, ChatTab *tab);
122
126 void handleIgnore(const std::string &args, ChatTab *tab);
127
131 void handleUnignore(const std::string &args, ChatTab *tab);
132
136 void handleAway(const std::string &args, ChatTab *tab);
137
138 /*
139 * Handle showip command.
140 */
141 void handleShowIp(const std::string &args, ChatTab *tab);
142};
143
A tab for the chat window.
Definition chattab.h:36
A class to parse and handle user commands.
void handlePresent(const std::string &args, ChatTab *tab)
Handle a present command.
void handleCommand(const std::string &command, ChatTab *tab=localChatTab)
Parse and handle the given command.
void handleQuery(const std::string &args, ChatTab *tab)
Handle a msg tab request.
void handleIgnore(const std::string &args, ChatTab *tab)
Handle an ignore command.
void handleShowIp(const std::string &args, ChatTab *tab)
void handleClear(const std::string &args, ChatTab *tab)
Handle a clear command.
static char parseBoolean(const std::string &value)
void handleParty(const std::string &args, ChatTab *tab)
Handle a party command.
void handleMe(const std::string &args, ChatTab *tab)
Handle a me command.
void handleListChannels(const std::string &args, ChatTab *tab)
Handle a listchannels command.
void handleWhere(const std::string &args, ChatTab *tab)
Handle a where command.
void handleRecord(const std::string &args, ChatTab *tab)
Handle a record command.
void handleWho(const std::string &args, ChatTab *tab)
Handle a who command.
void handleHelp(const std::string &args, ChatTab *tab)
Handle a help command.
void handleCreateParty(const std::string &args, ChatTab *tab)
Handle a createparty command.
void handleJoin(const std::string &args, ChatTab *tab)
Handle a join command.
void handleAway(const std::string &args, ChatTab *tab)
Handle away command.
void handleUnignore(const std::string &args, ChatTab *tab)
Handle an unignore command.
void handleToggle(const std::string &args, ChatTab *tab)
Handle a toggle command.
void handleMsg(const std::string &args, ChatTab *tab)
Handle a msg command.
A tab for whispers from a single player.
Definition whispertab.h:32
std::string booleanOptionInstructions(const char *command)
ChatTab * localChatTab
Definition game.cpp:117
CommandHandler * commandHandler
Definition game.cpp:112