diff --git a/.server.py.swo b/.server.py.swo new file mode 100644 index 0000000..c72ce83 Binary files /dev/null and b/.server.py.swo differ diff --git a/.server.py.swp b/.server.py.swp new file mode 100644 index 0000000..f3d9ed4 Binary files /dev/null and b/.server.py.swp differ diff --git a/README.md b/README.md index 41e1f2c..f1effcd 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,36 @@ Welcome to your IRC project on Cloud9 IDE! 2. Messages stored in database. 3. When a user logs in they will see some list of previous messages. 4. Search. I can search for a particular term and see the results. + +### Deliverables for Second Sprint +1. the chat supports multiple rooms (EXAMPLE CODE: https://bitbucket.org/zacharski/irc.git) +2. Users are subscribed to a set of rooms and cannot access rooms that they are not subscribed to. +3. When a user searches for something the search takes place only in posts in rooms they are subscribed to +4. all tables in 3NF +Earn more XP by implementing other features that rely on a db. (for ex, a register an account popup) + +Still need to add stuff from Michelle's paper. She scribbled things while he was talking about stuff. ### You must host your code on github +we still need to : + cake is great! + - do search stuff + - make it fail gracefully when user is not in the thing +======= +I'm pretty sure this isn't right. Stuff down there at least. Not running server from .js what. + +Welcome to your Node.js project on Cloud9 IDE! + +This chat example showcases how to use `socket.io` with a static `express` server. + +## Running the server + +1) Open `server.js` and start the app by clicking on the "Run" button in the top menu. + +2) Alternatively you can launch the app from the Terminal: + + $ node server.js + +Once the server is running, open the project in the shape of 'https://projectname-username.c9.io/'. As you enter your name, watch the Users list (on the left) update. Once you press Enter or Send, the message is shared with all connected clients. diff --git a/irc.sql b/irc.sql new file mode 100644 index 0000000..4ab644c --- /dev/null +++ b/irc.sql @@ -0,0 +1,60 @@ +DROP DATABASE IF EXISTS irc_db; +CREATE DATABASE irc_db; +\c irc_db + +CREATE TABLE users ( + id serial, + username varchar(30), + password varchar(30), + PRIMARY KEY (id) +); + +CREATE TABLE rooms ( + id serial UNIQUE, + roomname varchar(30), +/* user_in_room varchar(30), */ + PRIMARY KEY (id) +); + +CREATE TABLE subscriptions ( + id serial, + room_id int NOT NULL, + user_id int NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE messages ( + message_id serial, + original_poster_id int NOT NULL, + message_content VARCHAR(250), + room_id int NOT NULL, + PRIMARY KEY (message_id) +); + +INSERT INTO users (id, username, password) +VALUES +(DEFAULT, 'SpiderBall', 'sb'), +(DEFAULT, 'MidnaPeach', 'mp'), +(DEFAULT, 'lz', 'lz'); + +INSERT INTO rooms (id, roomname) +VALUES +(DEFAULT, 'General'), +(DEFAULT, 'Happy'), +(DEFAULT, 'Sad'), +(DEFAULT, 'Hungry'); + + +INSERT INTO subscriptions (id, room_id, user_id) +VALUES +(DEFAULT, 1, 1), +(DEFAULT, 1, 2), +(DEFAULT, 1, 3), +(DEFAULT, 2, 1), +(DEFAULT, 3, 2), +(DEFAULT, 4, 1), +(DEFAULT, 4, 2), +(DEFAULT, 3, 3); +/* sb is subscribed to happy hungry and general + mp is subscribed to general sad and hungry + lz is subscribed to general and sad */ diff --git a/postgreSQLCommands.txt b/postgreSQLCommands.txt new file mode 100644 index 0000000..2db85e2 --- /dev/null +++ b/postgreSQLCommands.txt @@ -0,0 +1,23 @@ +Command cheat sheet + +change column name +ALTER TABLE [tablename] RENAME COLUMN [oldname] TO [newname]; + +copy table +CREATE TABLE [newtablename] AS SELECT [columns] FROM [existing]; + +change column data type +ALTER TABLE[tablename] ALTER COLUMN [columnname] TYPE [newtype]; + +//first sprint thing +username, password + +insert +INSERT INTO [tablename] VALUES +([value1],[value2], ... ); + + + + +update +UPDATE [tablename] SET [column1]=[value1] ... WHERE [somecolumn] = [somevalue]; diff --git a/server.py b/server.py index dcb0644..548d5d1 100644 --- a/server.py +++ b/server.py @@ -1,70 +1,482 @@ +import psycopg2 +import psycopg2.extras +import traceback + import os import uuid -from flask import Flask, session -from flask.ext.socketio import SocketIO, emit +from flask import Flask, session, jsonify, request +from flask.ext.socketio import SocketIO, emit, join_room, leave_room app = Flask(__name__, static_url_path='') app.config['SECRET_KEY'] = 'secret!' socketio = SocketIO(app) +def connectToDB(): + #print 'in connectToDB' + connectionString = 'dbname=irc_db user=postgres password=pg host=localhost' + try: + return psycopg2.connect(connectionString) + except: + print("Can't connect to database - in server.py") + traceback.print_exc() + messages = [{'text':'test', 'name':'testName'}] -users = {} + +#the list of rooms +rooms = [] +#printed = False +#USERS IS A DICTIONARY +users = {} +names = [] +current_subs = [] +#What the actual is this thing doing. +app.debug = True + +socketio = SocketIO(app) + +messages = [{'text':'test', 'name':'testName'}] + +rooms = ['General'] def updateRoster(): names = [] for user_id in users: - print users[user_id]['username'] if len(users[user_id]['username'])==0: names.append('Anonymous') else: names.append(users[user_id]['username']) print 'broadcasting names' + traceback.print_exc() emit('roster', names, broadcast=True) + +#UPDATE ROOMS +def updateRooms(): + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + + selectRoomsQuery = "SELECT * FROM rooms;" + cur.execute(selectRoomsQuery) + previous_rooms = cur.fetchall() + + #if not printed: + rooms = [] + for room in previous_rooms: + print room[1] + rooms.append(room[1]) + + #printed = True + emit('rooms', rooms) + + +def getSubscriptions(username): + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + user_id = getUserId(username) + selectSubQuery = "SELECT room_id FROM subscriptions WHERE user_id = %s;" + cur.execute(selectSubQuery, (user_id,)) + subs = cur.fetchall() + for sub in subs: + print "this person is subscribed to a chat with the id: " + sub[2] + current_subs.append(sub[2]) #just stores room_id + + +def getUserId(username): + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + + userIdSelectQuery = "SELECT id FROM users WHERE username = %s;" + id_dict = 0 #initializing id_dict, just in case + + try: + print "trying to execute select room id" + cur.execute(userIdSelectQuery, (username,)) + print "sucessfully executed select room id " + + print "trying to grab id" + id_dict = cur.fetchone() + print "this is the current user id " + str(id_dict[0]) + + + except: + print "could not execute select user id" + traceback.print_exc() + return id_dict + + -@socketio.on('connect', namespace='/chat') +def getRoomId(roomname): + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + + roomIdSelectQuery = "SELECT id FROM rooms WHERE roomname = %s;" + + id_dict = 0 #initializing id_dict, just in case + + try: + print "trying to execute select room id" + cur.execute(roomIdSelectQuery, (roomname,)) + print "sucessfully executed select room id " + + print "trying to grab id" + id_dict = cur.fetchone() + print "this is the current room id" + str(id_dict[0]) + + + except: + print "could not execute select room id" + traceback.print_exc() + return id_dict[0] + +#we also need a thing that pulls up messages from a chat +#maybe have a subscribe function that determines whether or not join is called?? + +#THIS IS NOT MINE COPIED FROM DOCUMENTATION, then edited a little bit +@socketio.on('join', namespace='/chat') +#data needs to become session stuff maybe??? +def on_join(data): + #print "data username is " + data['username'] + #print "data room is " + data['room'] + #username = data['username'] + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + selectMessagesQuery = "SELECT original_poster_id as name, message_content as text FROM messages INNER JOIN users ON users.id = messages.original_poster_id WHERE room_id = %s" + room = data + + cur.execute(selectMessagesQuery, (getRoomId(data),)) + results = cur.fetchall() + for result in results: + print result + result = { 'name' : result['name'], 'text' : result['text']} + emit('message', (result,)) + + join_room(room) + +@socketio.on('leave', namespace='/chat') +def on_leave(data): + #username = data['username'] + room = data + leave_room(room) +#END COPIED FROM DOCS + + +#CONNECT +@socketio.on('connect', namespace='/chat') #handles the connect event def test_connect(): - session['uuid']=uuid.uuid1() + print 'IN CONNECT' + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + + session['uuid']=uuid.uuid1()# each time a uuid is called, a new number is returned + session['username']='starter name' - print 'connected' + session['room'] = 'General' + #session['room']['room_id'] = + #print 'connected' + + #this means that it goes to the users list thing and gets the session id + #this instance of the chat and makes the username field = new user users[session['uuid']]={'username':'New User'} updateRoster() + updateRooms() + + for item in messages: + emit('message', item) - for message in messages: - emit('message', message) - +#MESSAGE +#THIS IS ON LINE 55 IN INDEX.HTML $scope.send - emits message and text @socketio.on('message', namespace='/chat') -def new_message(message): - #tmp = {'text':message, 'name':'testName'} - tmp = {'text':message, 'name':users[session['uuid']]['username']} +def new_message(message, roomName): + print 'IN MESSAGE' + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + #print 'the message typed was:' + message + + updateRooms() + print "just called update rooms, now back in message" + + + messageToGoInDB = message + print 'the message typed was:' + message + + print 'the room typed was:' + roomName + + #roomNameQuery = "INSERT into" + temp_room_id = getRoomId(roomName) + print "this is the room id " + str(temp_room_id) + room_id = temp_room_id[0] + + #get id here from users + posterIdQuery = "SELECT id FROM users;" + try: + cur.execute(posterIdQuery) + except: + print("couldn't get posterID from users!") + listOfPosterIDs = cur.fetchall() + + originalPosterID = -7 + + #first get the username of the person who is posting. + thisSessionNum = session['uuid'] + currentUsername = users[thisSessionNum]['username'] + + #then go through database and get that user's id + userIdSelectQuery = "SELECT id FROM users WHERE username = %s" + try: + cur.execute(userIdSelectQuery, (currentUsername,)) + except: + print("I had a problem getting the users id from their username.") + usersIdResult = cur.fetchone() + + originalPosterID = usersIdResult[0] + + #get roomid here + + #first get room name from site? + + + #then do a select for the room id that matches that room name + #but we aren't inserting into the room table yet so we can't do that. + + + #insert message into the database + insertStatement = "INSERT INTO messages (original_poster_id, message_content, room_id) VALUES (%s, %s, %s)" + try: + cur.execute(insertStatement, (originalPosterID, messageToGoInDB, int(room_id))); + except: + print "there was an error with the insert" + traceback.print_exc() + + conn.commit() + + #take what is in the database, take from the users column and then + #make it into a python dict called users + tmp = {'text':message, 'username':session['username']} + + thisSessionNum = session['uuid'] + user = users[thisSessionNum]['username'] + if user in users: + tmp = {'text':message, 'username':user} + + #messages needs the room stuff too! + #added rooms into tmp, which means that it is a part of the message thing + + #from zacharskis + tmp = {'text':message, 'room':roomName, 'username':users[session['uuid']]['username']} + + + #messages is a list of python dictionaries that look like {messages,users} messages.append(tmp) - emit('message', tmp, broadcast=True) + emit('message', tmp, broadcast=True) + + +#IDENTIFY +#LINE 76ish in index.html? $scope.setName - emits identify scope.name +# $scope.setName2 also emits identify, $scope.name2 @socketio.on('identify', namespace='/chat') -def on_identify(message): - print 'identify' + message - users[session['uuid']]={'username':message} +def on_identify(userTypedLoginInfo): + print 'IN IDENTIFY' + # conn = connectToDB() + # cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + #print 'identify' + userTypedLoginInfo + #the message here is where we need to connect to check against the database?? + + #userTypedLogininfo is the real time variable that is displaying in the server console window and it is being displayed as + #the user types things into the username box. + #we might need to get the username from here and the password from here and get the thing + if 'uuid' in session: + users[session['uuid']]={'username':userTypedLoginInfo} + updateRoster() + else: + print 'sending information' + session['uuid']=uuid.uuid1() + session['username']='starter name' + + + updateRoster() + updateRooms() + + for message in messages: + emit('message', message) + + users[session['uuid']]={'username':userTypedLoginInfo} updateRoster() + updateRooms() + #call update rooms with update roster? + + +#LOGIN +#around line 85 index.html $scope.processLogin - emits login, $scope.password +@socketio.on('login', namespace='/chat') +def on_login(loginInfo): + print 'IN LOGIN' + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + + previousMessages = [] + usernameVar = loginInfo['username'] + passwordVar = loginInfo['password'] + #print 'user:' + loginInfo['username'] + #print 'pass:' + loginInfo['password'] + oldMessages = [{'text':'oldMessageInitText', 'username':'oldMessageInitUsername'}] + + user_select_string = "SELECT id, username FROM users WHERE username = %s AND password = %s;" + try: + cur.execute(user_select_string,(usernameVar, passwordVar)); + #print 'executed query' + currentUser = cur.fetchone() + if(currentUser is None): + print 'this is not a valid login, please try again' + else: + session['username'] = currentUser['username'] + subsSelectQuery = "SELECT room_id FROM subscriptions WHERE user_id = %s"; + cur.execute(subsSelectQuery, (currentUser['id'],)) + sub_results=cur.fetchall() + subscriptions = [] + for sub in sub_results: + subscriptions.append(sub[0]) + session['current_subs'] = subscriptions -@socketio.on('login', namespace='/chat') -def on_login(pw): - print 'login ' + pw + + print 'Logged on as:' + session['username'] + except: + print 'could not execute login query!' + traceback.print_exc() + + #printing all previous messages from database here. + subs_string = str(tuple(session['current_subs'])) + #this part grabs the stuff from messages + messageQuery = "SELECT message_content, original_poster_id FROM messages WHERE room_id IN %s;"%subs_string + print messageQuery + try: + print "entering try with current_subs" + cur.execute(messageQuery) #this may not work, but imma try it + print "successfully executed query" + previousMessages = cur.fetchall() + print "successfully fetched" + except: + print("I couldn't grab messages from the previous database") + + for message in previousMessages: + messageStr = str(message['message_content']) + #print 'a previous message was:' + messageStr + idStr = str(message['original_poster_id']) + #print 'the users id was: ' + idStr + + #this part grabs the stuff from users + userQuery = "SELECT id, username FROM users WHERE id = %s;" + try: + cur.execute(userQuery, (idStr,)) + except: + print("I couldn't grab users from database") + idMatchUserResults = cur.fetchall() + + theUserMatchName = "" + for user in idMatchUserResults: + #print 'the id is:' + idStr + theUserMatchName = user['username'] + #print 'the username that hopefully matches is' + theUserMatchName + temp = {'text':messageStr, 'username':theUserMatchName} + oldMessages.append(temp) + #oldMessages = [{'text':messageStr, 'username':theUserMatchName}] + + count = 0 + for item in oldMessages: + if count >= len(oldMessages): + thing = 'nope' + else : + usernameName = oldMessages[count]['username'] + messageFromUsername = oldMessages[count]['text'] + print messageFromUsername + print 'from:' + usernameName + count = count + 1 + #put emit here + emit('message', item) + + + #what why is this commented out. zacharski did that and I don't know. #users[session['uuid']]={'username':message} #updateRoster() +#SEARCH RESULTS +@socketio.on('search', namespace='/chat') +def on_search(searchTerm): + #this searches in the room in session, not what users are subscribed to + print 'IN SEARCH' + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + roomName = session['room'] + print roomName + print searchTerm + searchTerm = '%'+ searchTerm +'%' + #make select statement and execute query + searchQuery = "SELECT messages.message_content FROM messages INNER JOIN rooms ON rooms.id = messages.room_id WHERE messages.message_content LIKE %s AND rooms.roomname = %s;" + try: + print 'entering try' + cur.execute(searchQuery,(searchTerm, roomName)); + print 'query successfully executed' + except: + print 'could not execute search query!' + traceback.print_exc() + searchResults = cur.fetchall() + #return and print results in chat messages + for item in searchResults: + print len(searchResults) + if item: + item = {'text': str(item[0])} + emit('search', item) + else: + print 'there is nothing here' + #if time, then print out messages in another spot + #do this by changing emit to send it somewhere else + + +#DISCONNECT @socketio.on('disconnect', namespace='/chat') def on_disconnect(): - print 'disconnect' + print 'DISCONNECT' + #disconnect happens when you close the thing! if session['uuid'] in users: del users[session['uuid']] updateRoster() + emit('roster', names) + +@socketio.on('new_room', namespace='/chat') +def new_room(room): + conn = connectToDB() + cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) + print 'updating rooms' + rooms.append(room) + session['room'] = room + + + roomInsertQuery="INSERT INTO rooms (id, roomname) VALUES (DEFAULT, %s)" + + #this pos isn't working, it either gives me a syntax error + #roomInsertQuery="INSERT INTO rooms (id, roomname) SELECT * FROM rooms WHERE NOT EXISTS (SELECT roomname FROM rooms WHERE roomname = %s)" + try: + cur.execute(roomInsertQuery, (room,)) + print "did the thing successfully I guess. after try and before emit" + except: + print "I couldn't do the room insert augh" + traceback.print_exc() + + conn.commit() + print room + # printed = False + updateRooms() + print 'back' + + # return jsonify(success= "ok") + @app.route('/') def hello_world(): print 'in hello world' @@ -90,4 +502,4 @@ def static_proxy_img(path): print "A" socketio.run(app, host=os.getenv('IP', '0.0.0.0'), port=int(os.getenv('PORT', 8080))) - \ No newline at end of file + diff --git a/static/.index.html.swp b/static/.index.html.swp new file mode 100644 index 0000000..083d09f Binary files /dev/null and b/static/.index.html.swp differ diff --git a/static/index.html b/static/index.html index e43047e..e40e928 100644 --- a/static/index.html +++ b/static/index.html @@ -16,16 +16,25 @@ margin-right: 70%; margin-top: 70px; padding-top: 10px; -width: 20%; -height: 170px; +width: 30%; +height: 180px; position: absolute; -background: #FFFFFF; +background: #C4E0F2; border: solid #909090 2px; z-index: 9; font-family: arial; visibility: hidden; } + - - - - - -
- - - - - - - - - + +
+
+ + +
+
+

Current Room: {{current_room}}

@@ -151,14 +251,36 @@

Chat Example

- +
+ + + + + + + + + + + + + + + +
Text
+ + + + + +
-
+
@@ -169,6 +291,8 @@

Chat Example

+ + diff --git a/ter temp b/ter temp new file mode 100644 index 0000000..5126013 --- /dev/null +++ b/ter temp @@ -0,0 +1,342 @@ +* 58c3fc8 (HEAD, temp) Merge branch 'master' of https://github.com/SpiderBall/irc into HEAD +|\ +| * e079cc3 (origin/master, origin/HEAD, master) moved insert to new_room function, added select statement to updaterooms +* | 7cea163 trying to use data as a session +* | fa2130b put the insert statements back in update rooms +|/ +* e0b8088 uncommented updateRooms just to see what it does +* 649d6dd added a comma +* d9c492d added subscriptions table +* 777f861 screwed it up so that it doesnt add tables to irc_db, fixed that +* 25692cb fixed some small things in the irc.sql file +* 8dee071 just realized that michelle also edited the irc.sql file, changed it so that both of our changes work +* 6729cc8 Merge branch 'master' of https://github.com/SpiderBall/irc changed irc.sql and michelle added stuff +|\ +| * ba09ff1 Merge branch 'master' of https://github.com/SpiderBall/irc michelle added stuff i think +| |\ +| * | cee8a6f added a rooms table to the sql file, now associates each message with a room id +* | | 4a2c126 Everything I have for now, trying to get chat to communicate with room db table +* | | bbe684a Updated readme +* | | 2bf9662 Imported the join_room and leave_room also did some other stuff with irc.sql +* | | 746df8b The current room now displays above the chat window +* | | 688c394 doin a thing so up to date on login for reals Merge https://github.com/SpiderBall/irc +|\ \ \ +| | |/ +| |/| +| * | a1b174a log in should work +| |/ +* | a13c9d1 hopefully up to date for sprint2 +* | e97b97c merging bc unmerged ugh +* | b202a80 there is no steak Merge https://github.com/SpiderBall/irc +|\ \ +| |/ +| * c8af551 maybe fixed object error +| * 4d7f46d bkashfd +| * 617c7c4 added hello to see if i know where the problem is +| * 80d40a8 rooms are doing a thing now +| * 3b12b26 cleanup +| * b9dcedd laskjfMerge branch 'master' of https://github.com/SpiderBall/irc +| |\ +| | * d9ba809 nevermine +| * | b29ab04 Merge branch 'master' of https://github.com/SpiderBall/irc aklsejf +| |\ \ +| | |/ +| | * 4b58ad5 got rid of line printing near the msg box +| * | 643e069 Merge branch 'master' of https://github.com/SpiderBall/irc commented out crap +| |\ \ +| | |/ +| | * 23820d8 found why all that code was printing out, forgot to comment out something +| | * 5e53d52 cleaned up repo a bit +| * | c113ede Merge branch 'master' of https://github.com/SpiderBall/irc hiiii +| |\ \ +| | |/ +| | * 1f89003 again? +| | |\ +| | * | 321dea2 will this push to master +| | * | 6bd0c54 actually added files this time: +| * | | 4fa1a26 Merge branch 'master' of https://github.com/SpiderBall/irc added raz stuff +| |\ \ \ +| | | |/ +| | |/| +| | * | 9d56092 merged raz stuff +| * | | 981b592 Merge branch 'master' of https://github.com/SpiderBall/irc merging raz stuff +| |\ \ \ +| | |/ / +| * | | 782a4e0 hi im commiting because reasons +* | | | ec5d096 Merging stuff Merge https://github.com/SpiderBall/irc +|\ \ \ \ +| |/ / / +|/| / / +| |/ / +| * | a154d34 MERGED RAZ'S IRC +| |\ \ +| | |/ +| | * d8abc86 Added notion of rooms +| | * 187abde initial commit +* | 8ac972c This should be the last commit I think. +|/ +* 24e2105 created a new user so that when someone runs the irc.sql they wont have to edit the server.py file at all +* e6d8e9e playing around with the html +* d84f0dc got it to work :D +* a21f14f still not working whyyyy +* 9440e81 trying something weird; adding the variable searchItem2 to see if transferrring the input from there to the output would solve the problem +* 5d75b29 added back those random lines i deleted +* aba0d91 the changes i just made earlier actually broke it, so im changing it back +* 4859038 set scope to another value in index.html +* 65748a5 added helpful print statements +* b606e68 seeing if an if statement can help prevent more errors +* edf1215 added some print statements for diagnostics +* 3d8e1aa added michelle's change to search bar +|\ +| * 2d2a2fb IT IS DONEEEEE +| * 217d605 changed searchterm to work with %% +| * 947d0f9 Merge https://github.com/MidnaPeach/irc ;lk +| |\ +| | * 1d15e5b This should be the up to date server.py +| | * 2f0d492 Merge dammit +| | |\ +| | * | 4dff89b Hey I just got the previous messages to display, now I'm working on search +| * | | 11de73a fixing merge bullshit +| |\ \ \ +| | | |/ +| | |/| +| * | | f740b03 Merge https://github.com/MidnaPeach/irc michelle got message stuff working, just not showing up +| |\ \ \ +* | \ \ \ a55a672 lsdkf +|\ \ \ \ \ +| |_|_|/ / +|/| | | / +| | |_|/ +| |/| | +| * | | 7a82d44 This is the updated index.html, along with server.py to be sure +| * | | d9796c8 This is me trying to get previous messages to display +| | |/ +| |/| +| * | 07a0a7a Grabbed all previous messages and their usernames. ugh. +| * | 6e301dd Almost got previous messages loading +* | | 380ee12 adding michelles latest changes +| |/ +|/| +* | 4036add asx +|\ \ +| * | 68dfbe3 moved search function up so that i can compare how other functions take data form html +* | | e52ee37 asodufh +|/ / +* | 3498f43 rge branch 'master' of https://github.com/SpiderBall/irc yup Conflicts: static/index.html +|\ \ +| * \ 75676ac Merge branch 'master' of https://github.com/SpiderBall/irc fixed search bar Conflicts: static/index.html +| |\ \ +| * | | 03dcf06 made it so the search bar doesnt copy its text into message box +* | | | 494d5fe wrote search query +| |/ / +|/| | +* | | 6d59dab changed Search to go and switched the button and the text box +|/ / +* | 85b0679 added text box to search bar +* | 13338e8 attempted to add a search bar +|/ +* 281b56b merging after a slight start over +|\ +| * 0dc056b can successfully log in, just doesnt show up on the screen +| * 63fc65a cleaned up a bit, changed update roster back to what raz had, it turns out i fixed something that wasnt broken. +* | 1c5e400 Have the messages from before displaying, and cleaned up some previous code. +|/ +* 057739f update roster officially works. the code looks pretty awful rn, but it works +* 4d58ff9 lkxjvcMerge branch 'master' of https://github.com/SpiderBall/irc +|\ +| * 97badd1 trying to make sure count does not go out of bounds +* | a68800f asdfskjlfMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * d47df57 added count=0 and names[count][1] as a clever way to check each element for a name +* | d2710e1 aklsdfjMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * cc5f79b changed names to names[][1] to see if that will print just the name +* | ff64fea skjkfMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * 77f8a35 changed item to item[1] to see if that would just print out names +* | d4cb2d7 Merge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * fdf5364 i figured out why the whole list is printing, we needed to access name[1] and all of users +* | 1c2db33 kljdfMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * 9990325 changed names users to names=users[1] to see if that would just pass names (not the whole list) +* | ee91ff9 salkdf Merge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * 722985e changed print item to print item[0] +* | cd9ca29 dkjsgMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| |/ +| * a4253f7 changed names = [] to names = users. hope this works +* | 61f529c Merge branch 'master' of https://github.com/SpiderBall/irc lksajfd +|\ \ +| |/ +| * a5454af kljf +| * 2e08540 Merge https://github.com/MidnaPeach/irc applying michelle's latest changes +| |\ +| | * fb97129 I'm adding things before I crash. >~< I'll be better tomorrow. +| * | 9481b85 Merge https://github.com/MidnaPeach/irc michelle got messages to work +| |\ \ +| | |/ +| | * f28de18 Making stuff up to date. +| * | aef5cd5 Merge https://github.com/MidnaPeach/irc michelle updated more stuff in index.html +| |\ \ +| | |/ +| | * 5fbb4ea Changed index.html name to username line 157 +| * | 1d3a29f Merge https://github.com/MidnaPeach/irc michelle updated stuff +| |\ \ +| | |/ +| | * dcc339f Changed a few variable names and adds a comment that explains what uuid does I think. +| * | 8d397b3 Merge https://github.com/MidnaPeach/irc michelle got messagees working mostly +| |\ \ +| | |/ +| | * 7dae489 Figuring out why it can't read users. bob guy to the rescue! +| | * 78b3e7f Did this work? Merge https://github.com/SpiderBall/irc +| | |\ +* | | \ 2ce4c01 as;lfjksMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ \ \ +| |/ / / +| * | | 29d48e3 alkfderge https://github.com/MidnaPeach/irc +| |\ \ \ +| | |/ / +| | | / +| | |/ +| |/| +| | * f9b0a51 The message thingy inserts into the table oMG +| | * 209dc65 ehhhhhhhhsdfjkdsfkjh +| | * 140eca8 Merge pull request #6 from SpiderBall/master +| | |\ +| * | | fb42da8 skljf +* | | | b9de6f4 skld;fja Merge branch 'master' of https://github.com/SpiderBall/irc +|\ \ \ \ +| |/ / / +| * | | 53fe066 null is None now +* | | | 9db4fec saldfjMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ \ \ +| |/ / / +| * | | 96a6ebd changed == to is +| | |/ +| |/| +* | | e4222ed Merge branch 'master' of https://github.com/SpiderBall/irc merging my branch +|\ \ \ +| |/ / +| * | 95d9c3c Merge https://github.com/MidnaPeach/irc merrge michelles stuff , added error printing Conflicts: server.py +| |\ \ +| | |/ +| | * d77dad5 Found out how to do error printing, which will save us hours. Trying to work on messages. +* | | ea54ce7 jsklhfdMerge branch 'master' of https://github.com/SpiderBall/irc +|\ \ \ +| |/ / +| * | c2e70c2 attempted error handling for login +* | | 6d8d77e balsjkf +* | | 8aac8ed Merge branch 'master' of https://github.com/SpiderBall/irc nalshnfdi Conflicts: server.py +|\ \ \ +| |/ / +| * | 91d6232 removed session password +| * | 031e76b M;erge https://github.com/MidnaPeach/irc kdfj Conflicts: server.py +| |\ \ +| | |/ +| | * 18e8678 We will get login to work. It is inevitable. +| * | e226ef9 stuff? +* | | 361796f whatever +* | | 3ed7b4a Merge branch 'master' of https://github.com/SpiderBall/irc michelle updated things +|\ \ \ +| |/ / +| * | 0e1e1c1 Merge https://github.com/MidnaPeach/irc elle fixed index.html and server.py loginInfo +| |\ \ +| | |/ +| | * 7fdc5ea Added index.html and a new server.py. Trying to get login variables. +* | | 2b7b8f1 Merge branch 'master' of https://github.com/SpiderBall/irc +|\ \ \ +| |/ / +| * | 4426b66 found two semicolons that were breaking things +| |/ +| * 9420bb5 Just double checking we are on the same page +| * dc528eb put my stash back +| * 6b5548b Merge pull request #8 from MidnaPeach/master +| |\ +| | * 0a5922d I'm trying to do a thing. Merge branch 'master' of https://github.com/SpiderBall/irc +| | |\ +| | |/ +| |/| +| | * 5db13b1 This sure is terrible message attempt. +* | | 54be38c added print B, testing git stash +|/ / +* | 9ab6aea changed irc to irc_db +* | f3d4de9 added a means to execute a select users query in updateroster, fingers crossed +* | 7328fd2 added print statements to see what each function does to the website +* | 2ae39eb added a login function that should work with postgres, committing to test on c9 +* | a6f6567 Merge pull request #7 from MidnaPeach/master +|\ \ +| |/ +| * e62df68 adding the fact that there is a username and password in the login function +| * d3ffcb1 Merge pull request #3 from SpiderBall/master +| |\ +| |/ +|/| +* | 06790da Merge pull request #6 from MidnaPeach/master +|\ \ +| |/ +| * 1e89ac7 Merge pull request #2 from SpiderBall/master +| |\ +* | | 995a1ac took out the penis +| |/ +|/| +* | 686db9c Merge pull request #5 from MidnaPeach/master +|\ \ +| |/ +| * 365b07f testing +* | 577e3d9 I added a penis +* | 671d54f Merge branch 'master' of https://github.com/MidnaPeach/irc hi there im pulling from midna peach +|\ \ +| |/ +| * fe4decb I added conn stuff and cursor stuff into each socket function. +* | 81f87c5 Merge branch 'master' of https://github.com/MidnaPeach/irc pulling from Michelle +|\ \ +| |/ +| * 6d05a5a Merge pull request #1 from SpiderBall/master +| |\ +* | \ a6bfe96 Merge branch 'master' of https://github.com/SpiderBall/irc i probably just deleted a line or something unimportant\ +|\ \ \ +| | |/ +| |/| +| * | 4e84ce4 Merge pull request #4 from MidnaPeach/master +| |\ \ +| | |/ +| | * 335ccc0 I added some code, and more comments. +| | * c9ea566 Yay this works now, git editor changed from nano, not really a thing for the irc project. +| | * 9ac483b testy crap +* | | 56d1282 committing because i need to merge +|/ / +* | 2cf21dc added a comment above uuid +* | 9d79c69 hai Merge branch 'master' of https://github.com/SpiderBall/irc +|\ \ +| * \ d116a35 Merge pull request #3 from MidnaPeach/master +| |\ \ +| | |/ +| | * 1b6d2f4 I am adding a ton of comments to try to understand what is happening here. +* | | 4ed052d committing because it told me to +|/ / +* | 8f4ae22 Merge pull request #2 from MidnaPeach/master +|\ \ +| |/ +| * e29af70 I think I just updated index, mostly I want to check if github and I are on the same page. +* | 95ddef8 Merge pull request #1 from MidnaPeach/master +|\ \ +| |/ +| * 3c2f944 A file that might be helpful. +|/ +* 5862c7f added Michelle's insert query +* 4d73ca5 added a comment to server.js +* 3325d6e added connectToDB +* f7be5ba replaced varchar to bytea in irc.sql +* 93ae88d changed binary to varchar(200) in message table +* b1e3cf6 added irc.sql, just creates basic user and message tables +* 1b96b96 added dependencies +* 31d9265 Fixed readme +* ca7fae8 first coommit