Jump to content
SubSpace Forum Network

Needed: GPL C/C++ Chatnet client


Recommended Posts

Posted
I can't seem to find any chatnet clients that are open source and don't require any external dependencies (not java or python ect.) It would be nice to be able to connect to non-discretion-enabled zones using chatnet through Discretion. Perhaps this would be a nice project for someone to work on?
Posted
Would it have to be written in C/C++ or could it not be written in another language that can be directly linked with C (e.g. free pascal) Pascal programs are statically linked so don't normally require any externals beyond operation specific ones.
Posted
It doesn't even need to be linked to Discretion (it can be it's own executable). As long as it works without having to install a 30MB runtime environment I'll be happy. It would probably be passed on the command like the zone ip and port to connect to, and the username / password would be read from a file.
Posted

I think you will need dependencies if you want to have real-time chat and input. For example cccc is dependant on ncurses for a terminal/console interface (it's fairly easy to write an ncurses emulation layer, which I did to make it work on psp). If you want a GUI you're going to be dependant on a windowing library.

 

You can use cccc for whatever you want (it comes with source) and I can send you my ncurses wrapper if you want it.

Posted (edited)
I think you will need dependencies if you want to have real-time chat and input. If you want a GUI you're going to be dependant on a windowing library.

It will be dependant on the opertating system API Windows/X/MAX OSX, but the actual libary is build into the exe.

 

The version i am creating uses the gui. It is dependant on the windowing libary that comes with freepascal, however the libary itself is cross-platform. This libary, and dependant libaries are statically linked into the executable, so when distributing the exe, its already included as part of the exe. This leads to larger exe sizes but eliminates the need for external libaries to be distributed with the exe. When I post up the alpha it will be a bit more clear. I don't thinik i'm explaining it very well. There is a port for ncurses for windows somewhere as i was looking into it when I was starting this project.

Edited by doc flabby
Posted

looks good. It also crashes if you send a message before you connect to a zone. Add this to TForm1.FormCreate to load the data from a file (any maybe make it auto connect if you want) and get version 0.2 out and I'll get it into discretion.

 

// load a data from input.txt

  !@#$%^&*ignFile(input_file, 'input.txt');
  {$I-} // disable file io error check
  Reset(input_file);	 // try to open the file
  {$I+} // enable file io error check

  if (IOResult = 0) then
 begin
  
   Readln(input_file, input_name);
   Readln(input_file, input_pw);
   Readln(input_file, input_ip);
   Readln(input_file, input_port);
   CloseFile(input_file);
   
   Erase(input_file);
  
   Form1.UsernameBox.Text:= input_name;
   Form1.passwordBox.Text:= input_pw;
   Form1.HostBox.Text:= input_ip;
   Form1.PortBox.Text:= input_port;
end;

 

also, after I close it in Lazarus it says execution stopped and then this guy pops up. any idea?

 

laz_error.PNG

Posted (edited)

I can make it use command line parameters, that will work better, temp file is horrible smile.gif

 

I'll have a go at fixing all the bugs, the send before connect is a big one lol. Also it really needs an option to have a auto command at login (for chats etc)

 

If that error only appears when running it from inside lazerus, it might be to do with the project is set to compile without debugging symbols, or it might be a bug in lazerus.

Edited by doc flabby

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...