make
make bonus
- Code written in C++ 98
- No IRC client (only an IRC server)
- No server-to-server communication
- Excutable runs as follow:
./ircserv <port> <password>
- Multiple clients are handled at the same time without server hanging
- No fork (e.g. no child process)
- All I/O operations are non-blocking
- Only one call to epoll_wait() handles all operations (read, write, listen, etc)
- No read/write without calling epoll_wait()
- Communication is done with TCP/IP (v4 or v6)
- Reference IRC client works without any error (e.g. irssi)
- Partial data reception (e.g. Ctrl + D when using netcat)
- Clean code (e.g. all messages are created with the builder design pattern)
Client commands:
- PASS
- NICK
- USER
- OPER
- JOIN
- TOPIC
- INVITE
- KICK
- MODE (channel modes: iklot)
- PRIVMSG
- NOTICE
Numeric replies:
- RPL_WELCOME
- RPL_CHANNELMODEIS
- RPL_CREATIONTIME
- RPL_NOTOPIC
- RPL_TOPIC
- RPL_TOPICWHOTIME
- RPL_INVITELIST
- RPL_ENDOFINVITELIST
- RPL_INVITING
- RPL_YOUREOPER
- ERR_NOSUCHNICK
- ERR_NOSUCHCHANNEL
- ERR_NORECIPIENT
- ERR_NOTEXTTOSEND
- ERR_NONICKNAMEGIVEN
- ERR_ERRONEUSNICKNAME
- ERR_USERNOTINCHANNEL
- ERR_NOTONCHANNEL
- ERR_USERONCHANNEL
- ERR_NEEDMOREPARAMS
- ERR_ALREADYREGISTRED
- ERR_PASSWDMISMATCH
- ERR_KEYSET
- ERR_CHANNELISFULL
- ERR_UNKNOWNMODE
- ERR_INVITEONLYCHAN
- ERR_BADCHANNELKEY
- ERR_BADCHANMASK
- ERR_CHANOPRIVSNEEDED
- ERR_INVALIDKEY
- ERR_INVALIDMODEPARAM
- Bot (PRIVMSG to GameBot or on #jan-ken-pon channel)
- File transfer (initiated with PRIVMSG thanks to irssi DCC)
- Configuration file:
./ircserv <port> <password> [<configuration file>]
(cf. ircserv.conf)
Client commands:
- USER (second parameter is an integer translated to bitmask to set i and w modes respectively on 1000 and 0100)
- PING
- QUIT
- LUSERS
- MOTD
- VERSION
- NAMES
- MODE (user modes: iow)
- WHO
- WALLOPS
- SUMMON (e.g. summon disabled)
- USERS (e.g. users disabled)
Server commands:
- ERROR
- PONG
Numeric replies:
- RPL_YOURHOST
- RPL_CREATED
- RPL_MYINFO
- RPL_ISUPPORT
- RPL_UMODEIS
- RPL_LUSERCLIENT
- RPL_LUSEROP
- RPL_LUSERUNKNOWN
- RPL_LUSERCHANNELS
- RPL_LUSERME
- RPL_LOCALUSERS
- RPL_GLOBALUSERS
- RPL_ENDOFWHO
- RPL_VERSION
- RPL_WHOREPLY
- RPL_NAMREPLY
- RPL_ENDOFNAMES
- RPL_MOTD
- RPL_MOTDSTART
- RPL_ENDOFMOTD
- ERR_NOSUCHSERVER
- ERR_TOOMANYCHANNELS
- ERR_TOOMANYTARGETS
- ERR_NOORIGIN
- ERR_INPUTTOOLONG
- ERR_UNKNOWNCOMMAND
- ERR_NOMOTD
- ERR_SUMMONDISABLED
- ERR_USERSDISABLED
- ERR_NOTREGISTERED
- ERR_NOPRIVILEGES
- ERR_UMODEUNKNOWNFLAG
- ERR_USERSDONTMATCH