Code Monkey home page Code Monkey logo

irc's Introduction

Simple IRC Server

General

Implement a simple IRC server with a client-server architecture.

Instructions

This project usess robotgo, please follow installation instructions in: https://github.com/go-vgo/robotgo

For the server run go run server.go -host localhost -port 9000 with your desire flags.

For the client run go run client.go -user user1 -server localhost:9000 with your desire flags.

It will be based on the Go Programming Language book's chapter 8th examples. Chat Server and netcat client. Below you can see the specific requirements for this.

Requirements

  • The program must be implemented in Golang programming language.
  • Use the provided base source code from server.go and client.go files.
  • Add support for usernames. Instead of identifying users by their ip:port, they will be identified with their usernames.
  • Add support for IRC sub-commands in the client.go
Sub-command description
/users To list all connected users
/msg <user> <msg> To send a direct message to the specified user
/time Get IRC Server's localtime
/user <user> Get more details about user (Username and IP address)

Sample IRC Server output

# go run server.go -host localhost -port 9000
irc-server > Simple IRC Server started at localhost:9000
irc-server > Ready for receiving new clients
irc-server > New connected user [user1]
irc-server > New connected user [user2]
irc-server > [user1] left

Sample 2 IRC clients output

# go run client.go -user user1 -server localhost:9000
irc-server > Welcome to the Simple IRC Server
irc-server > Your user [user1] is successfully logged
user1 > Hi
^C
# go run client.go -user user2 -server localhost:9000
irc-server > Welcome to the Simple IRC Server
irc-server > Your user [user2] is successfully logged
user2 >
user1 > Hi
user2 >
irc-server > [user1] left

Sample Sub-Commands output

user1 > /users
irc-server > user1, user2
user1 > /msg user2 message to user2    # user2 should receive the direct message "message to user2"
user1> /time
irc-server > Local Time: America/Mexico_City 16:53
user1 > /user user2
irc-server > username: user2, IP: 192.168.1.22

irc's People

Contributors

humbertoamdc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.