summaryrefslogtreecommitdiff
path: root/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'core.h')
-rw-r--r--core.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/core.h b/core.h
index cf2f8a9..cd45356 100644
--- a/core.h
+++ b/core.h
@@ -139,15 +139,18 @@ private:
};
struct Server : SocketRWCommon {
- char ircHostname[256];
- int ircPort;
+ int port;
+ bool useTls;
+
int dnsQueryId;
- bool ircUseTls;
Server(NetCore *_netCore);
~Server();
- void beginConnect();
+protected:
+ void connect(const char *hostname, int _port, bool _useTls);
+
+public:
void tryConnectPhase();
void connectionSuccessful();
@@ -158,6 +161,24 @@ private:
void handleLine(char *line, int size);
};
+struct IRCNetworkConfig {
+ char hostname[512];
+ char nickname[128];
+ char realname[128];
+ char password[128];
+ int port;
+ bool useTls;
+};
+
+struct IRCServer : Server {
+ Bouncer *bouncer;
+ IRCNetworkConfig config;
+
+ IRCServer(Bouncer *_bouncer);
+
+ void connect();
+};
+
struct NetCore {
NetCore();