diff options
author | Joursoir <chat@joursoir.net> | 2020-11-30 02:29:18 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2020-11-30 02:29:18 +0300 |
commit | 7385c0352c7fe7e9ceca343400a5caa5ddd999d6 (patch) | |
tree | 9f6968d4c7b646a64f36baf214fcf5af622f366d /src/client/client.cpp | |
parent | 4d4cd095cd3a2f0b65f0ed19af51c667c5941abc (diff) | |
download | want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.tar.gz want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.tar.bz2 want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.zip |
refactoring and some feature
client: type nick in argument
server: basis for registration;
change style add commands;
edit send msg to user;
feature: private room
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 7f092cc..8143b9e 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -10,6 +10,11 @@ static int port = 3030; int main(int argc, char *argv[]) { + if(argc < 2) { + printf("Usage: client *name*\n"); + return 1; + } + initscr(); //raw(); noecho(); @@ -22,10 +27,10 @@ int main(int argc, char *argv[]) return 1; } - Client *user = Client::Start(SERVER_IP, port); + Client *user = Client::Start(SERVER_IP, port, argv[1]); if(!user) { endwin(); - perror("client"); + perror("server"); return 1; } |