A custom Internet Relay Chat (IRC) server implementation in C++ that supports multiple clients, channels, and standard IRC commands.
- Multi-client support with non-blocking I/O
- Channel management (create, join, leave)
- Private messaging between users
- IRC bot integration
- Password-protected server
- Standard IRC command support
- Proper connection handling and cleanup
- C++ compiler with C++98/C++11 support
make- POSIX-compliant system (Linux/macOS)
- IRC client (e.g., irssi or nc)
Clone the repository and compile:
git clone https://github.com/anasooo/IRC.git
cd IRC
makeStart the server:
./ircserv <port> <password>Example:
./ircserv 6667 mypasswordConnect with an IRC client:
# Using netcat
nc localhost 6667
# Using irssi
irssi -c localhost -p 6667 -w mypassword
| Command | Description | Usage |
|---|---|---|
PASS |
Authenticate with server | PASS <password> |
NICK |
Set/change nickname | NICK <nickname> |
USER |
Set user information | USER <username> 0 * :<realname> |
JOIN |
Join a channel | JOIN #channel |
PART |
Leave a channel | PART #channel [message] |
PRIVMSG |
Send message to user/channel | PRIVMSG <target> :<message> |
QUIT |
Disconnect from server | QUIT [message] |
KICK |
Kick user from channel | KICK #channel <user> [reason] |
INVITE |
Invite user to channel | INVITE <user> #channel |
TOPIC |
View/set channel topic | TOPIC #channel [new topic] |
MODE |
Change channel/user modes | MODE #channel +/-o <user> |
Contributions are welcome! Please feel free to submit a Pull Request.
Made with ☕ and C++