Separated command string constants, internal (IdealIRC) commands and IRC commands.

master
Tomatix 5 years ago
parent 3e8ed42e2f
commit 18a87ceef2
  1. 70
      ICommand/Commands.h
  2. 1
      ICommand/Internal/echo.cpp
  3. 1
      ICommand/Internal/me.cpp
  4. 17
      IRCClient/Commands.h
  5. 1
      IWin/IWinChannel.cpp
  6. 1
      IdealIRC/IRC.cpp
  7. 1
      IdealIRC/InputHandler.cpp

@ -17,58 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef COMMANDS_H
#define COMMANDS_H
#ifndef ICOMMAND_COMMANDS_H
#define ICOMMAND_COMMANDS_H
namespace Command {
namespace IRC {
constexpr auto* PASS = "PASS";
constexpr auto* NICK = "NICK";
constexpr auto* USER = "USER";
constexpr auto* OPER = "OPER";
constexpr auto* MODE = "MODE";
constexpr auto* QUIT = "QUIT";
constexpr auto* SQUIT = "SQUIT";
constexpr auto* JOIN = "JOIN";
constexpr auto* PART = "PART";
constexpr auto* TOPIC = "TOPIC";
constexpr auto* NAMES = "NAMES";
constexpr auto* LIST = "LIST";
constexpr auto* INVITE = "INVITE";
constexpr auto* KICK = "KICK";
constexpr auto* PRIVMSG = "PRIVMSG";
constexpr auto* NOTICE = "NOTICE";
constexpr auto* MOTD = "MOTD";
constexpr auto* LUSERS = "LUSERS";
constexpr auto* VERSION = "VERSION";
constexpr auto* STATS = "STATS";
constexpr auto* LINKS = "LINKS";
constexpr auto* TIME = "TIME";
constexpr auto* CONNECT = "CONNECT";
constexpr auto* TRACE = "TRACE";
constexpr auto* ADMIN = "ADMIN";
constexpr auto* INFO = "INFO";
constexpr auto* SERVLIST = "SERVLIST";
constexpr auto* SQUERY = "SQUERY";
constexpr auto* WHO = "WHO";
constexpr auto* WHOIS = "WHOIS";
constexpr auto* WHOWAS = "WHOWAS";
constexpr auto* KILL = "KILL";
constexpr auto* PING = "PING";
constexpr auto* PONG = "PONG";
constexpr auto* ERROR = "ERROR";
constexpr auto* AWAY = "AWAY";
constexpr auto* REHASH = "REHASH";
constexpr auto* DIE = "DIE";
constexpr auto* RESTART = "RESTART";
constexpr auto* SUMMON = "SUMMON";
constexpr auto* USERS = "USERS";
constexpr auto* WALLOPS = "WALLOPS";
constexpr auto* USERHOST = "USERHOST";
constexpr auto* ISON = "ISON";
}
namespace Internal {
namespace Command::Internal {
constexpr auto* ACTION = "ACTION";
constexpr auto* CTCP = "CTCP";
constexpr auto* ME = "ME";
constexpr auto* ECHO = "ECHO";
@ -77,17 +30,4 @@ namespace Internal {
constexpr auto* UNMUTERESP = "UNMUTERESP";
}
namespace IRCv3 {
constexpr auto* CAP = "CAP";
constexpr auto* LS = "LS";
constexpr auto* LIST = "LIST";
constexpr auto* REQ = "REQ";
constexpr auto* ACK = "ACK";
constexpr auto* NAK = "NAK";
constexpr auto* END = "END";
constexpr auto* NEW = "NEW";
constexpr auto* DEL = "DEL";
} // namespace IRCv3
} // namespace command
#endif // COMMANDS_H
#endif // ICOMMAND_COMMANDS_H

@ -1,4 +1,5 @@
#include "ICommand/ICommandPriv.h"
#include "ICommand/Commands.h"
#include "IRCClient/IRCChannel.h"
using namespace Command::Internal;

@ -1,4 +1,5 @@
#include "ICommand/ICommandPriv.h"
#include "ICommand/Commands.h"
#include "IRCClient/IRCChannel.h"
using namespace Command::Internal;

@ -1,5 +1,5 @@
#ifndef COMMANDS_H
#define COMMANDS_H
#ifndef IRCCLIENT_COMMANDS_H
#define IRCCLIENT_COMMANDS_H
namespace Command {
namespace IRC {
@ -53,17 +53,6 @@ namespace Extension {
constexpr auto* ACCOUNT = "ACCOUNT";
}
// TODO move to client specific side
namespace Internal {
constexpr auto* CTCP = "CTCP";
constexpr auto* ME = "ME";
constexpr auto* ACTION = "ACTION";
constexpr auto* ECHO = "ECHO";
constexpr auto* QUERY = "QUERY";
constexpr auto* MUTERESP = "MUTERESP";
constexpr auto* UNMUTERESP = "UNMUTERESP";
}
namespace IRCv3 {
constexpr auto* CAP = "CAP";
constexpr auto* LS = "LS";
@ -77,4 +66,4 @@ namespace IRCv3 {
} // namespace IRCv3
} // namespace command
#endif // COMMANDS_H
#endif // IRCCLIENT_COMMANDS_H

@ -25,6 +25,7 @@
#include "IRCClient/IRCChannel.h"
#include "IRCClient/IRCMember.h"
#include "IRCClient/Utilities.h"
#include "IRCClient/Commands.h"
#include <ConfigMgr.h>
#include <QHeaderView>

@ -4,6 +4,7 @@
#include "IRCClient/IRCMember.h"
#include "IRCClient/IRCMemberEntry.h"
#include "IRCClient/IRCChannel.h"
#include "IRCClient/Commands.h"
#include "IWin/IWinStatus.h"
#include "IWin/IWinChannel.h"
#include "ConfigMgr.h"

@ -25,6 +25,7 @@
#include "ConfigMgr.h"
#include "IRCClient/IRCMember.h"
#include "IRCClient/IRCChannel.h"
#include "IRCClient/Commands.h"
#include <QDebug>
InputHandler::InputHandler(IRC& connection_)

Loading…
Cancel
Save