summaryrefslogtreecommitdiffstats
path: root/src/client/client.cpp
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2020-12-06 19:47:25 +0000
committerJoursoir <chat@joursoir.net>2020-12-06 19:47:25 +0000
commite99a03a838ddcf9eecadc10a7f71837afac3b99c (patch)
tree092ac919a8a8090df9c01536f5169e27952f7776 /src/client/client.cpp
parent91d777da4f5baeac47b3097913b2407b45bc031e (diff)
downloadwant-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.tar.gz
want-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.tar.bz2
want-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.zip
some changes in reg/auth; client: remove name in arguments
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r--src/client/client.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
deleted file mode 100644
index 8143b9e..0000000
--- a/src/client/client.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <ncurses.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "user.hpp"
-
-#define SERVER_IP "127.0.0.1"
-static int port = 3030;
-
-int main(int argc, char *argv[])
-{
- if(argc < 2) {
- printf("Usage: client *name*\n");
- return 1;
- }
-
- initscr();
- //raw();
- noecho();
-
- int rows, columns;
- getmaxyx(stdscr, rows, columns);
- if(rows != 24 || columns != 80) {
- endwin();
- printf("Please use terminal with size 24x80\n");
- return 1;
- }
-
- Client *user = Client::Start(SERVER_IP, port, argv[1]);
- if(!user) {
- endwin();
- perror("server");
- return 1;
- }
-
- ChatRoom *room = new ChatRoom();
- user->Run(room);
- delete room;
-
- endwin();
- return 0;
-} \ No newline at end of file