View previous topic :: View next topic |
Author |
Message |
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Tue May 07, 2002 2:23 pm Post subject: VDS Open Source Project - Instant Messaging - Interested? |
|
|
Hello,
I was thinking of doing an open source project with VDS for an Instant Messaging application integrated with an Mail client using VDSIPP.DLL.
The application would have the following features:
- Instant messaging functionnalities similar to MSN Messenger.
- Chat possibilies with multiple users at the same time
- Buddie list
- TaskIcon notification of incoming messages
- POP email client (Support for HTML formatted emails)
- SMTP Functionnalities
- A bit of nice visual effects such as Flash and sounds
- I would supply the machine for hosting the server part.
And maybe more... but for now thats enought ...
The protocol for the Instant messaging part would be UDP I think
So if your interested to participate post your ideas/comments...
This open source project would be a VDS community project. So if there's enought people willing to work on this project, I will possibly do a webpage for the project.
Thanks
|
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue May 07, 2002 3:28 pm Post subject: |
|
|
You know you can count me in! _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Hortalonus Valued Contributor
Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed May 08, 2002 4:13 pm Post subject: |
|
|
Open source VDS... I like it! Sweet idea! |
|
Back to top |
|
|
Tsunami1988 Contributor
Joined: 15 Aug 2002 Posts: 70 Location: The Netherlands
|
Posted: Fri Aug 16, 2002 1:20 pm Post subject: |
|
|
That's a great idea! |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Aug 16, 2002 1:37 pm Post subject: |
|
|
I'm interested! |
|
Back to top |
|
|
Eclipse Newbie
Joined: 19 Sep 2002 Posts: 8
|
Posted: Tue Oct 08, 2002 3:04 pm Post subject: Still available? |
|
|
I would like to help with this too.
Is it still a open project?
Bry |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Tue Oct 08, 2002 3:16 pm Post subject: |
|
|
Well its still open of course, right now Im investigating the possibility of using a VDS client that will enable a realtime chats with a list of users online.
The VDS client will connect to a CGI script on a server.
I currently dont have time now to work on that. Skit started working on a converted version of my Flash client. He converted it to VDS but there seems to be problems with the refreshing of the messages list and users lists. Still under investigation.
STay tuned... |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Oct 09, 2002 2:27 pm Post subject: |
|
|
Here is the example Marty told about.
The script uses CGI, so you can communicate with it by using
internet http,post,1,http://www.extremesenses.com/cgi-bin/vdschat.cgi,command=whateveryoulike
The commands are the following:
todo=get : This will get all the posted messages
todo=post&name=yournickname&text=yourtext : This will post a new message.
You can always use the name=yournickname command to identify yourself to the server.
Everytime you make a connection to the server it will send an online list and a list with all the messages.
You have to parse them to use it. (See the example code)
Note that VDS/vdsipp.dll doesn't support to stay connected to a CGI server, so the online list doesn't work like it should. The only thing I know to solve that is to make your own CGI client with TCP/IP...
Code: |
external vdsipp.dll
%%nickname = @input(What is your nickname?)
internet http,create,1
internet http,threads,1,on
internet http,protocol,1,1
internet http,useragent,1,"VDSWORLD Chat"
DIALOG CREATE,VDSWORLD Chat,-1,0,295,197
DIALOG ADD,EDIT,eMessages,4,4,286,164,,,MULTI,WRAP,READONLY,SCROLL
DIALOG ADD,EDIT,eMessage,172,4,218,19
DIALOG ADD,BUTTON,bSend,172,226,64,18,Send,,DEFAULT
DIALOG SHOW
goto Timer
:Evloop
wait event,1
%%event = @event()
goto %%event
:Timer
rem Checks for new messages
internet http,post,1,http://www.extremesenses.com/cgi-bin/vdschat.cgi,todo=get&name=%%nickname
goto evloop
:bSendBUTTON
rem Sends a new message
internet http,post,1,http://www.extremesenses.com/cgi-bin/vdschat.cgi,todo=post&name=%%nickname&text=@dlgtext(eMessage)
dialog set,eMessage,
goto evloop
:Http1onpostdone
rem If there is a new message this code will parse all the extra stuff out of it and sets the message into eMessages
%%data = @trim(@internet(http,content,1))
%%backupmessage = @trim(@internet(http,content,1))
%%messages =
repeat
if @equal(@substr(%%data,1,1),@chr(10))
%%messages = %%messages@cr()@chr(10)
else
%%messages = %%messages@substr(%%data,1,1)
end
%%data = @strdel(%%data,1,1)
until @equal(@len(%%data),0)
repeat
%%messages = @strins(@strdel(%%messages,@pos(>+,%%messages),@succ(@pos(>+,%%messages))),@pos(>+,%%messages),"> ")
until @greater(1,@pos(>+,%%messages))
%%messages = @strdel(%%messages,1,@fadd(@pos(messages,%%messages),8))
%%messages = @strdel(%%messages,@diff(@len(%%messages),10),@len(%%messages))
dialog set,eMessages,%%messages
goto evloop
:Close
rem Added the following line to avoid VDS from crashing
internet http,destroy,1
exit |
|
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Wed Oct 09, 2002 3:02 pm Post subject: |
|
|
Well here`s the CGI part to complete Skits post...
Maybe it can help complete the VDS code.
I think its a good start for the project.
The VDS code of Skit was based on the chat client made in flash that I have. You can try out the flash client by downloading this:
Unzip and drag the SWF file to an opened Web browser window
CGI Code for the server part:
Code: | #!/usr/bin/perl
#
#VDSWORLD LIVE CHAT
# Setup the Variables
$basedir="/home/virtual/site1/fst/var/www/cgi-bin";
$messagefile="messages.dat";
$userfile="users.dat";
#$emotefile="emote.dat";
print "Content-type: text/plain\n\n";
if (!$ARGV[0]) {
if($ENV{'REQUEST_METHOD'} eq 'GET') {
$ARGV[0] = $ENV{'QUERY_STRING'};
} else {
read(STDIN, $ARGV[0], $ENV{'CONTENT_LENGTH'});
}
}
if ($ARGV[0]) {
%FORM;
&get_arg;
if ($FORM{'todo'} eq 'get' ) {
&get_messages;
}
if ($FORM{'todo'} eq 'post' ) {
&post_message;
}
if ($FORM{'todo'} eq 'namesearch' ) {
&name_search;
}
} else {
print "no parameters!\n";
}
#### Initialize Arguments ##################################
sub get_arg {
@pairs = split(/&/, $ARGV[0]);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$FORM{$name} = $value;
}
}
#### Name Search ##################################
sub name_search {
$infile=0;
open (USERLIST,"<$basedir/$userfile") || die $!;
@users = <USERLIST>;
close (USERLIST);
open (USER,">>$basedir/$userfile") || die $!;
print "Content-type: text/html\n\n";
foreach $pair (@users) {
($username,$lastpoll,$datestamp)=split(/\,,,,,,,,,,,/,$pair);
if ($username eq $FORM{'name'}) {
print "&namefree=false";
$infile=1;
}
}
if ($infile==0) {
&stamp;
print "&namefree=true";
print USER "$FORM{'name'},,,,,,,,,,,$timestamp,,,,,,,,,,,$datestamp\n";
}
close (USER);
&clean_userlist;
open (INROOM,"<$basedir/$userfile") || die $!;
@inchat = <INROOM>;
close (INROOM);
$people=0;
foreach $one (@inchat) {
$people++;
}
if ($people==1) {
open (MESSAGES,">$basedir/$messagefile") || die $!;
print MESSAGES "";
close (MESSAGES);
}
print "&eof=true";
}
#### Get messages ##################################
sub get_messages {
&get_userlist;
open (MESSAGES,"<$basedir/$messagefile") || die $!;
@text = <MESSAGES>;
close (MESSAGES);
print "&messages=";
foreach $line (@text) {
$line =~ s/ /+/g;
$line =~ s/%/%25/g;
$line =~ s/&/%26/g;
#$line =~ s/?/%51/g;
print $line;
}
print "&eot=true";
}
#### Post messages ##################################
sub post_message {
open (MESSAGES,">>$basedir/$messagefile") || die $!;
print MESSAGES "<$FORM{'name'}> $FORM{'text'}\n";
close (MESSAGES);
&get_messages;
}
#### Get list of current users ##################################
sub get_userlist {
&clean_userlist;
open (INROOM,"<$basedir/$userfile") || die $!;
@inchat = <INROOM>;
close (INROOM);
$people=0;
print "&userlist=";
foreach $one (@inchat) {
($username,$lastpoll)=split(/\,,,,,,,,,,,/,$one);
print "$username\n";
$people++;
}
}
#### Clean user list ##################################
sub clean_userlist {
open (USERLIST,"<$basedir/$userfile") || die $!;
@users = <USERLIST>;
close (USERLIST);
&stamp;
$inlist=0;
open (NEWLIST,">$basedir/$userfile") || die $!;
foreach $set (@users) {
($username,$lastpoll,$lastdate)=split(/\,,,,,,,,,,,/,$set);
chop($lastdate);
if ($lastpoll+7 >= $timestamp && $lastdate eq $datestamp) {
if ($username eq $FORM{'name'}) {
print NEWLIST "$username,,,,,,,,,,,$timestamp,,,,,,,,,,,$datestamp\n";
$inlist=1;
} else {
print NEWLIST "$username,,,,,,,,,,,$lastpoll,,,,,,,,,,,$lastdate\n";
}
}
}
if ($inlist==0) {
print NEWLIST "$FORM{'name'},,,,,,,,,,,$timestamp,,,,,,,,,,,$datestamp\n";
}
close (NEWLIST);
}
#### Get timestamp ##################################
sub stamp {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$totalseconds=$sec+$min*60+$hour*3600;
$timestamp = $totalseconds;
$datestamp = "$mday $mon $year";
chop($timestamp) if ($timestamp =~ /\n$/);
chop($timestamp) if ($datestamp =~ /\n$/);
}
exit; |
Last edited by marty on Thu Apr 12, 2012 2:05 am; edited 1 time in total |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Tue Oct 22, 2002 8:43 pm Post subject: |
|
|
Hi,
Did anyone tried the code, modified it , does it work well?
Just asking since there were a lot of people interested working on this open source project.
Thanks |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Nov 28, 2002 9:15 am Post subject: |
|
|
What's the status of this project???? Anything for testing yet? If not, then
does everyone have a IRC Client sitting around? I'm in the mood for
setting up a week end chat-a-thon soon. I wonder if the VDS IRC Server
is still alive and kicking......
-Garrett |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Thu Nov 28, 2002 1:02 pm Post subject: |
|
|
I dont like IRC (thats my personnal opinion ) thats why Im try to find ways to do an IM for VDSWORLD and my future VDSPORTAL... So I installed a PHP made Instant Messaging system. I wanted to convert the client to VDS but have no time for this right now.
If you want to try it feel free to do it:
BTW I didnt code that I wish I new PHP better...
Also if you want to use a live chat system other than IRC there's always the flash client I posted in this thread that still works, its a flash client connecting to my server. It really works well actually.. and very simple to use too...
Unzip and drag the SWF file to an opened Web browser window
Have a nice day... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|