Verified Commit 747a0466 authored by Matthew Burket's avatar Matthew Burket
Browse files

CCCCCHANGES

parent aedebcfe
Pipeline #280 passed with stage
in 23 seconds
......@@ -14,17 +14,11 @@
<list default="true" id="2fa245b4-ca4a-4f7e-827b-e32957382591" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/coms327_irc" afterPath="$PROJECT_DIR$/cmake-build-debug/coms327_irc" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CMakeLists.txt" afterPath="$PROJECT_DIR$/CMakeLists.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG" afterPath="$PROJECT_DIR$/CHANGELOG" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README" afterPath="$PROJECT_DIR$/README" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/channel.cpp" afterPath="$PROJECT_DIR$/channel.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/channel.h" afterPath="$PROJECT_DIR$/channel.h" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/coms327_irc.cbp" afterPath="$PROJECT_DIR$/cmake-build-debug/coms327_irc.cbp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/connection.cpp" afterPath="$PROJECT_DIR$/connection.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/connection.h" afterPath="$PROJECT_DIR$/connection.h" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/main.cpp" afterPath="$PROJECT_DIR$/main.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/string_socket.cpp" afterPath="$PROJECT_DIR$/string_socket.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/string_socket.h" afterPath="$PROJECT_DIR$/string_socket.h" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/utils.cpp" afterPath="$PROJECT_DIR$/utils.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/utils.h" afterPath="$PROJECT_DIR$/utils.h" />
</list>
<ignored path="$PROJECT_DIR$/cmake-build-debug/" />
......@@ -41,18 +35,18 @@
<file leaf-file-name="string_socket.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/string_socket.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="920">
<caret line="46" column="1" lean-forward="true" selection-start-line="46" selection-start-column="1" selection-end-line="46" selection-end-column="1" />
<state relative-caret-position="557">
<caret line="57" column="0" lean-forward="false" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="string_socket.h" pinned="false" current-in-tab="true">
<file leaf-file-name="string_socket.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/string_socket.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="439">
<caret line="36" column="27" lean-forward="false" selection-start-line="36" selection-start-column="27" selection-end-line="36" selection-end-column="27" />
<state relative-caret-position="192">
<caret line="30" column="23" lean-forward="false" selection-start-line="30" selection-start-column="23" selection-end-line="30" selection-end-column="23" />
<folding />
</state>
</provider>
......@@ -61,18 +55,20 @@
<file leaf-file-name="main.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
<state relative-caret-position="300">
<caret line="15" column="35" lean-forward="false" selection-start-line="15" selection-start-column="35" selection-end-line="15" selection-end-column="35" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README" pinned="false" current-in-tab="false">
<file leaf-file-name="README" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/README">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="12" column="27" lean-forward="false" selection-start-line="12" selection-start-column="27" selection-end-line="12" selection-end-column="27" />
<state relative-caret-position="300">
<caret line="15" column="45" lean-forward="false" selection-start-line="15" selection-start-column="45" selection-end-line="15" selection-end-column="45" />
<folding />
</state>
</provider>
......@@ -91,10 +87,10 @@
<file leaf-file-name="utils.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/utils.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="358">
<caret line="24" column="36" lean-forward="false" selection-start-line="24" selection-start-column="36" selection-end-line="24" selection-end-column="36" />
<state relative-caret-position="220">
<caret line="11" column="17" lean-forward="true" selection-start-line="11" selection-start-column="17" selection-end-line="11" selection-end-column="17" />
<folding>
<element signature="e#128#147#0" expanded="true" />
<element signature="e#126#145#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -103,8 +99,8 @@
<file leaf-file-name="connection.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/connection.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="338">
<caret line="84" column="29" lean-forward="false" selection-start-line="84" selection-start-column="23" selection-end-line="84" selection-end-column="29" />
<state relative-caret-position="317">
<caret line="68" column="0" lean-forward="false" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding>
<element signature="e#48#71#0" expanded="true" />
</folding>
......@@ -115,7 +111,7 @@
<file leaf-file-name="connection.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/connection.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="318">
<state relative-caret-position="340">
<caret line="53" column="16" lean-forward="false" selection-start-line="53" selection-start-column="4" selection-end-line="53" selection-end-column="16" />
<folding>
<element signature="e#115#133#0" expanded="true" />
......@@ -124,16 +120,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="Makefile" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Makefile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="12" column="9" lean-forward="true" selection-start-line="12" selection-start-column="9" selection-end-line="12" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="channel.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/channel.cpp">
<provider selected="true" editor-type-id="text-editor">
......@@ -176,14 +162,14 @@
<option value="$PROJECT_DIR$/channel.h" />
<option value="$PROJECT_DIR$/channel.cpp" />
<option value="$PROJECT_DIR$/Makefile" />
<option value="$PROJECT_DIR$/main.cpp" />
<option value="$PROJECT_DIR$/README" />
<option value="$PROJECT_DIR$/utils.cpp" />
<option value="$PROJECT_DIR$/connection.h" />
<option value="$PROJECT_DIR$/string_socket.h" />
<option value="$PROJECT_DIR$/string_socket.cpp" />
<option value="$PROJECT_DIR$/utils.h" />
<option value="$PROJECT_DIR$/connection.cpp" />
<option value="$PROJECT_DIR$/string_socket.cpp" />
<option value="$PROJECT_DIR$/string_socket.h" />
<option value="$PROJECT_DIR$/main.cpp" />
<option value="$PROJECT_DIR$/README" />
</list>
</option>
</component>
......@@ -196,7 +182,7 @@
<component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
<component name="ProjectFrameBounds">
<option name="x" value="1050" />
<option name="y" value="795" />
<option name="y" value="747" />
<option name="width" value="1920" />
<option name="height" value="1053" />
</component>
......@@ -458,15 +444,15 @@
<workItem from="1492201575733" duration="2601000" />
<workItem from="1492632674821" duration="3307000" />
<workItem from="1492802032155" duration="6947000" />
<workItem from="1492810969873" duration="5956000" />
<workItem from="1492810969873" duration="11005000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="21232000" />
<option name="totallyTimeSpent" value="26281000" />
</component>
<component name="ToolWindowManager">
<frame x="1050" y="795" width="1920" height="1053" extended-state="6" />
<frame x="1050" y="747" width="1920" height="1053" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17708333" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
......@@ -498,7 +484,19 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="3" />
<breakpoints>
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
<url>file://$PROJECT_DIR$/main.cpp</url>
<line>13</line>
<option name="timeStamp" value="5" />
</line-breakpoint>
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
<url>file://$PROJECT_DIR$/connection.cpp</url>
<line>66</line>
<option name="timeStamp" value="6" />
</line-breakpoint>
</breakpoints>
<option name="time" value="7" />
</breakpoint-manager>
<watches-manager />
</component>
......@@ -523,7 +521,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="620">
<caret line="31" column="37" lean-forward="false" selection-start-line="31" selection-start-column="37" selection-end-line="31" selection-end-column="37" />
<folding />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -548,7 +548,7 @@
<state relative-caret-position="260">
<caret line="13" column="35" lean-forward="false" selection-start-line="13" selection-start-column="35" selection-end-line="13" selection-end-column="35" />
<folding>
<element signature="e#128#147#0" expanded="true" />
<element signature="e#126#145#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -608,7 +608,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -670,7 +672,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="26" column="16" lean-forward="false" selection-start-line="26" selection-start-column="16" selection-end-line="26" selection-end-column="16" />
<folding />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -701,7 +705,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="35" column="23" lean-forward="false" selection-start-line="35" selection-start-column="23" selection-end-line="35" selection-end-column="23" />
<folding />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -791,11 +797,13 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README">
<entry file="file://$PROJECT_DIR$/connection.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="12" column="27" lean-forward="false" selection-start-line="12" selection-start-column="27" selection-end-line="12" selection-end-column="27" />
<folding />
<state relative-caret-position="340">
<caret line="53" column="16" lean-forward="false" selection-start-line="53" selection-start-column="4" selection-end-line="53" selection-end-column="16" />
<folding>
<element signature="e#115#133#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -807,64 +815,64 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.cpp">
<entry file="file://$PROJECT_DIR$/utils.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state relative-caret-position="40">
<caret line="2" column="2" lean-forward="false" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/utils.cpp">
<entry file="file://$PROJECT_DIR$/string_socket.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="40">
<caret line="2" column="2" lean-forward="false" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="2" />
<state relative-caret-position="192">
<caret line="30" column="23" lean-forward="false" selection-start-line="30" selection-start-column="23" selection-end-line="30" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/utils.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="358">
<caret line="24" column="36" lean-forward="false" selection-start-line="24" selection-start-column="36" selection-end-line="24" selection-end-column="36" />
<state relative-caret-position="220">
<caret line="11" column="17" lean-forward="true" selection-start-line="11" selection-start-column="17" selection-end-line="11" selection-end-column="17" />
<folding>
<element signature="e#128#147#0" expanded="true" />
<element signature="e#126#145#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/connection.cpp">
<entry file="file://$PROJECT_DIR$/string_socket.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="338">
<caret line="84" column="29" lean-forward="false" selection-start-line="84" selection-start-column="23" selection-end-line="84" selection-end-column="29" />
<folding>
<element signature="e#48#71#0" expanded="true" />
</folding>
<state relative-caret-position="557">
<caret line="57" column="0" lean-forward="false" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/connection.h">
<entry file="file://$PROJECT_DIR$/connection.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="318">
<caret line="53" column="16" lean-forward="false" selection-start-line="53" selection-start-column="4" selection-end-line="53" selection-end-column="16" />
<state relative-caret-position="317">
<caret line="68" column="0" lean-forward="false" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding>
<element signature="e#115#133#0" expanded="true" />
<element signature="e#48#71#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/string_socket.cpp">
<entry file="file://$PROJECT_DIR$/main.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="920">
<caret line="46" column="1" lean-forward="true" selection-start-line="46" selection-start-column="1" selection-end-line="46" selection-end-column="1" />
<folding />
<state relative-caret-position="300">
<caret line="15" column="35" lean-forward="false" selection-start-line="15" selection-start-column="35" selection-end-line="15" selection-end-column="35" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/string_socket.h">
<entry file="file://$PROJECT_DIR$/README">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="439">
<caret line="36" column="27" lean-forward="false" selection-start-line="36" selection-start-column="27" selection-end-line="36" selection-end-column="27" />
<state relative-caret-position="300">
<caret line="15" column="45" lean-forward="false" selection-start-line="15" selection-start-column="45" selection-end-line="15" selection-end-column="45" />
<folding />
</state>
</provider>
......
commit aedebcfe0faa08a2dd3f795afc16f4bac8643bf6
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:46:35 2017 -0500
Fix compare signed to unsigned is bad so says -W
utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 620cb4f7312d9f8f335b5748651c7d55d6bde070
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:45:47 2017 -0500
Remove useless stuff on main.cpp
main.cpp | 34 +++-------------------------------
1 file changed, 3 insertions(+), 31 deletions(-)
commit 924cd3c5730413767fd4eed63b07eebd74b83ad8
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:44:53 2017 -0500
Added gitlab
.gitlab-ci.yml | 6 ++++++
1 file changed, 6 insertions(+)
commit fbf693bc5b5a130ad35b708291cbeb4d56528cce
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:43:48 2017 -0500
Remove useless methods on string socket
string_socket.cpp | 6 +++---
string_socket.h | 2 --
2 files changed, 3 insertions(+), 5 deletions(-)
commit 37fbc765e69ae111b63ae759e463739ef2fc7222
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:43:12 2017 -0500
Added more methods for connection
connection.cpp | 74 ++++++++++++++++++++++++++++++++++++++++++++++------------
connection.h | 63 ++++++++++++++++++++++++++++++++++---------------
2 files changed, 103 insertions(+), 34 deletions(-)
commit 70e1381f4ca0ea7365e2ac868ca10399a6d7ffcd
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:42:12 2017 -0500
CMake and CLoin stuff
.idea/.name | 1 +
.idea/workspace.xml | 379 ++++++++++++++++++++++++++------------
CMakeLists.txt | 2 +-
cmake-build-debug/coms327_irc | Bin 16136 -> 226856 bytes
cmake-build-debug/coms327_irc.cbp | 94 +++++-----
5 files changed, 306 insertions(+), 170 deletions(-)
commit 1adb8193a7fa40431fb130fd5970033907bd3051
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:40:24 2017 -0500
Make project compile
channel.cpp | 9 +--------
channel.h | 6 +-----
2 files changed, 2 insertions(+), 13 deletions(-)
commit 4ab8232825acba518dbf31432e42847876b219b9
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 19:39:13 2017 -0500
Updated project docs
CHANGELOG | 9 +++++++++
README | 8 +++++++-
utils.cpp | 21 +--------------------
utils.h | 36 ++++++++++++++++++++++++++++++++++--
4 files changed, 51 insertions(+), 23 deletions(-)
commit 6681164dccc8b35af67b49e9f3e5a85d7dd2ef21
Author: Matthew Burket <m@tthewburket.com>
Date: Fri Apr 21 17:30:01 2017 -0500
......
......@@ -3,6 +3,7 @@ CXX = g++
ECHO = echo
RM = rm -f
GIT = git
USER := $(shell echo $USER)
CFLAGS = -Wall -Werror -ggdb -std=c++11
CXXFLAGS = -Wall -Werror -ggdb -std=c++11
......@@ -49,4 +50,5 @@ tarball: changelog clean
mv ../$(TARBALLNAME) .
tar -czvf $(TARBALLNAME).tar.gz $(TARBALLNAME)
rm -rf $(TARBALLNAME)
me a sandwhich:
@$(ECHO) Make your own!
......@@ -10,4 +10,12 @@ Connection.cpp/h - Represnets one users session to an IRC Server
Channel.cpp/h - Represents a channel
There is a lot code that stills needs to be written. Such as the code to handle new message, being kick from a room,
being killed from a server.
\ No newline at end of file
being killed from a server.
Running the code will connect to irc.freenode.net, join ##mburket as CS327_irc send a quick message and quit. Due to some the limitations of
my program it may not print out all messages.
To run my program:
# make
# ./irc
......@@ -51,15 +51,19 @@ void Connection::whois(std::string query) {
void Connection::setNick(std::string nick) {
this->nick = nick;
socket->writeSocket("NICK " + nick + CRLF);
socket->writeSocket("NICK " + nick);
}
void Connection::setUser() {
socket->writeSocket("USER " + user + " " + "0" + " " + real_name + CRLF);
socket->writeSocket("USER " + user + " 0 0 :" + real_name);
}
void Connection::connect() {
socket = new StringSocket(serverAddress, port);
for (int i = 0; i < 3; i++) {
std::cout << this->read_line();
usleep(50);
}
setNick(nick);
setUser();
}
......
#include <iostream>
#include "connection.h"
#include "string_socket.h"
int main() {
std::cout << "Hello World" << std::endl;
std::cout << "Testing of the IRC Client" << std::endl;
std::cout << "Connecting to irc.freenode.com" << std::endl;
Connection *conn = new Connection();
conn->serverAddress = "195.148.124.79";
conn->port = 6667;
conn->nick = "CS327irc";
conn->real_name = "COM S 327 Client by Matthew Burket";
conn->user = "cy";
conn->connect();
sleep(2);
conn->joinChannel("##mburket");
conn->messageUser("##mburket", "Testing");
conn->quit();
delete(conn);
}
\ No newline at end of file
......@@ -20,6 +20,11 @@ StringSocket::StringSocket(std::string address, unsigned int port) {
serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(port);
serv_addr.sin_addr.s_addr = inet_addr(address.c_str());
if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
{
printf("\n Error : Connect Failed \n");
}
}
/**
......
......@@ -5,7 +5,7 @@
#ifndef COMS327_IRC_UTILS_H
#define COMS327_IRC_UTILS_H
#define CRLF "\\r\\n"
#define CRLF "\r\n"
#include <iostream>
#include <string>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment