Twitter Console App

Hey everyone. I've been working on quite an interesting project this week. I decided to do a twitter app for consoles, mainly just to practise and I must say I've learned a bunch doing this. There are few things I'm unsure about before finishing this program though and I was wondering if anyone could help.

I'm using the ncurses library for layout and windows.
To give you a brief explanation about my program it works like this:

1. user name chooses login or registration, if login his username and password
must exist in the database (this will be a map of usernames and passwords)

2. When user registers the program will create a folder with his username, in this folder there are couple of files like tweets.txt (stores user tweets), mentions.txt (to send all tweets where this user is mentioned), messages etc

3. The user is now registered into the system and can go on tweeting about whatever. There is a mainfile.txt which collects all tweets from all the user and this file is displayed to all users when they log in so everyone can see what everyone else is talking about.

I've kind of got all 3 things working. The user can tweet and mentions and trends get specially examined and then sent on to correct paths etc..

My problem is first with ncurses. This program will have to depend on some interaction with the mouse. This is possible in ncurses but i'm having alot of trouble making this work. I've got alot of windows and subwindows and if anyone here is familiar with the ncurses library I'm using the wenclose function to check if mouse click is within a given window. But the mouse is just returning alot of garbage to the screen and not working correctly. I'm wondering if this is a wgetch problem because when I tried using just plain getch() the problem seemed to go away, but getch uses refresh and that destroys the whole window arrangement thing. I'm including a picture here to show you what I'm talking about

This picture is a screenshot of the program in action. I'm actually using a period to submit tweets at this moment just for testing but here you can see what the mouse is printing out (that's the bs text which appears after the tweet)
http://dl.dropbox.com/u/2208202/twtr.jpg

The second problem I have is with usernames and passwords. My idea was to store usernames and passwords in a textfile and load them into a map at the beginning of the program everytime a user wants to use it. I have no idea how to do this though or how to seperate the input from this textfile. Has anyone here done this or experience with storing username and password in a kind of "cheap" way that doesn't require alot of memory.

last and not least, here is a link to my github where I store this project. I'm planning on completing it in the following week. Feel free to take it and turn it upside down. I'm also sort of a beginner so I'm always looking for suggestion for better coding, so please don't hesitate to comment on this project.

gitHub link:
https://github.com/enkitosh/Ncurses-twitter-App
https://enkitosh@github.com/enkitosh/Ncurses-twitter-App.git
for the username I'd advice MySQL, it's simple to use abd does what you need...
Topic archived. No new replies allowed.