summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b0fb140..b7fa01e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,31 +1,16 @@
-#include <irc/irc_client.hpp>
-#include <xmpp/xmpp_component.hpp>
#include <network/poller.hpp>
-
-#include <xmpp/xmpp_parser.hpp>
-#include <xmpp/xmpp_stanza.hpp>
+#include <xmpp/xmpp_component.hpp>
#include <memory>
-#include <xmpp/jid.hpp>
-#include <irc/iid.hpp>
-
-#include <iostream>
-
int main()
{
Poller p;
- // Now I'm the bridge, creating an ircclient because needed.
- std::shared_ptr<IrcClient> c = std::make_shared<IrcClient>();
- p.add_socket_handler(c);
- std::shared_ptr<IrcClient> d = std::make_shared<IrcClient>();
- p.add_socket_handler(d);
- std::shared_ptr<IrcClient> e = std::make_shared<IrcClient>();
- p.add_socket_handler(e);
- c->connect("localhost", "7877");
- d->connect("localhost", "7878");
- e->connect("localhost", "7879");
- while (true)
- p.poll();
+ std::shared_ptr<XmppComponent> xmpp_component =
+ std::make_shared<XmppComponent>("irc.localhost", "secret");
+ p.add_socket_handler(xmpp_component);
+ xmpp_component->start();
+ while (p.poll())
+ ;
return 0;
}