summaryrefslogtreecommitdiffstats
path: root/src/crsm.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crsm.hpp')
-rw-r--r--src/crsm.hpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/crsm.hpp b/src/crsm.hpp
index 57a0cc9..0a23d7a 100644
--- a/src/crsm.hpp
+++ b/src/crsm.hpp
@@ -136,6 +136,10 @@ private slots:
void newManagementData();
void managementConnectionDisconnected();
+ void newDCCConnection();
+ void newDCCData();
+ void disconnectedDCCConnection();
+
void updateNextAutoScens();
void reconnectIrc();
void enableAutoHosting();
@@ -230,6 +234,16 @@ private:
bool ok = false;
bool hostingIsErrorDeactivated = false;
+ struct DCCConnection {
+ ClientInfo client;
+ QTcpSocket* socket;
+ };
+
+ QMap<QTcpSocket*, DCCConnection> dccSocketConnections;
+ QMap<QString, DCCConnection> dccNickConnections;
+ QMap<QString, QTcpSocket*> dccConnectionIdentifiers;
+ QTcpServer dccServer;
+
void startScen(const ScenarioSettings& scen, QStringList);
void readConfig();
void readScenarios();
@@ -263,7 +277,7 @@ private:
void setupCmds();
- void respond(const ClientInfo& client, const QString& message, const RespondType type = Normal);
+ void respond(const ClientInfo& client, const QString& message, const RespondType type = Normal, bool allowDCCNotice = false);
void ircCheckUserStatus(const ClientInfo& requester, const ClientInfo& subject, IrcCheckCallback callback);
void setIngameAdmin(const ClientInfo &client, const QString& newAdmin);
@@ -293,8 +307,9 @@ private:
void removeCommandSuffixes(QString& command);
void substituteCommandAlias(QString& command);
QString clientModName(const ClientInfo& client);
- void sendIrcMessage(const QString& message, const QString& target, bool action, bool notice);
+ void sendIrcMessage(const QString& message, const QString& target, bool action, bool notice, bool noticeOrDCC = false);
bool greetAllowed(const ClientInfo& client);
+ void handleIrcMessage(const ClientInfo& client, QString message, const QString& target, bool privateMessage, bool action, bool own = false);
CMD_FUNCTION(help);
CMD_FUNCTION(passToClonk);
@@ -360,6 +375,9 @@ private:
CMD_FUNCTION(packsScenariosDelete);
CMD_FUNCTION(packsScenariosList);
+ CMD_FUNCTION(dccConnect);
+ CMD_FUNCTION(dccIdentify);
+
IRC_CHECK_CALLBACK(ircSetAdmin);
IRC_CHECK_CALLBACK(ircModCmd);