Compare commits
10 Commits
readme
...
d2e02440b3
| Author | SHA1 | Date | |
|---|---|---|---|
| d2e02440b3 | |||
|
|
e08ef37928 | ||
| bbeaae5923 | |||
|
|
c31c69c0fa | ||
|
|
206ff02eb4 | ||
| ddfe1202fd | |||
|
|
77e3166f15 | ||
|
|
c7bc6f90ca | ||
| 279a71aa31 | |||
|
|
b520ef7c34 |
50
Makefile
Normal file
50
Makefile
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
NAME = ircserv
|
||||||
|
|
||||||
|
SRC = main.cpp Server/Server.cpp Client/Client.cpp \
|
||||||
|
Channel/Channel.cpp \
|
||||||
|
commands/pass.cpp commands/nick.cpp commands/user.cpp \
|
||||||
|
commands/join.cpp commands/privmsg.cpp \
|
||||||
|
commands/part.cpp
|
||||||
|
|
||||||
|
HEADERS = Client/Client.hpp \
|
||||||
|
Server/Server.hpp \
|
||||||
|
Channel/Channel.hpp
|
||||||
|
|
||||||
|
OBJ = $(SRC:.cpp=.o)
|
||||||
|
|
||||||
|
CC = c++
|
||||||
|
CFLAGS = -Wall -Wextra -Werror -std=c++98
|
||||||
|
|
||||||
|
GREEN = \033[0;32m
|
||||||
|
RED = \033[0;31m
|
||||||
|
RESET = \033[0m
|
||||||
|
|
||||||
|
TOTAL := $(words $(SRC))
|
||||||
|
COUNT = 0
|
||||||
|
|
||||||
|
all: $(NAME)
|
||||||
|
|
||||||
|
$(NAME): $(OBJ) $(HEADERS)
|
||||||
|
@rm -f .build_start
|
||||||
|
@$(CC) $(CFLAGS) $(OBJ) -o $(NAME)
|
||||||
|
@printf "\n$(GREEN)âś” Listo (100%%)\n$(RESET)"
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
@if [ ! -f .build_start ]; then printf "$(GREEN)Compiling objects...\n$(RESET)"; touch .build_start; fi
|
||||||
|
@$(eval COUNT = $(shell echo $$(($(COUNT)+1))))
|
||||||
|
@PERCENT=$$(($(COUNT)*100/$(TOTAL))); \
|
||||||
|
BAR=$$(printf "%0.s#" $$(seq 1 $$((PERCENT/5)))); \
|
||||||
|
SPACE=$$(printf "%0.s " $$(seq 1 $$((20-PERCENT/5)))); \
|
||||||
|
printf "\r [$$BAR$$SPACE] %3d%% (%d/%d) $< " $$PERCENT $(COUNT) $(TOTAL)
|
||||||
|
@$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@printf "$(RED)Removing objects...\n$(RESET)"
|
||||||
|
@rm -f $(OBJ)
|
||||||
|
|
||||||
|
fclean: clean
|
||||||
|
@rm -f $(NAME)
|
||||||
|
|
||||||
|
re: fclean all
|
||||||
|
|
||||||
|
.PHONY: all clean fclean re
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
**This project has been created as part of the 42 curriculum by iherman- and aortigos**
|
*This project has been created as part of the 42 curriculum by iherman- and aortigos*
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
@@ -8,3 +8,5 @@ The goal of this project is to do an IRC Server
|
|||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
|
|
||||||
|
|
||||||
|
Thanks for reading :)
|
||||||
|
|||||||
35
tasks.md
Normal file
35
tasks.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Tasks for IRC
|
||||||
|
|
||||||
|
### Useful info
|
||||||
|
|
||||||
|
You can try connect IRC server with
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nc localhost <port>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### First stage
|
||||||
|
|
||||||
|
- Server starts
|
||||||
|
- It accepts two params, ./ircserv <port> <password>
|
||||||
|
- The server accepts one user, user can send messages and we can see from server
|
||||||
|
- Only 1 poll()
|
||||||
|
|
||||||
|
### Second stage
|
||||||
|
|
||||||
|
- Server can handle multiple clients simultaneously
|
||||||
|
|
||||||
|
### Third stage
|
||||||
|
|
||||||
|
- Client has nickname and username
|
||||||
|
- Client needs password for authenticate
|
||||||
|
- Client can be regular user or operator (admin)
|
||||||
|
|
||||||
|
### Fourth stage
|
||||||
|
|
||||||
|
- Client can create/connect to channels
|
||||||
|
- Client can send message inside channel (only people inside this channel can read)
|
||||||
|
|
||||||
|
*It will continue...*
|
||||||
Reference in New Issue
Block a user