--- sbbs/sbbs3/chat/chat.cpp 2018/04/24 16:39:34 1.1 +++ sbbs/sbbs3/chat/chat.cpp 2018/04/24 16:41:13 1.1.1.2 @@ -2,13 +2,13 @@ /* Local sysop chat module (GUI Borland C++ Builder Project for Win32) */ -/* $Id: chat.cpp,v 1.1 2018/04/24 16:39:34 root Exp $ */ +/* $Id: chat.cpp,v 1.1.1.2 2018/04/24 16:41:13 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -38,6 +38,7 @@ //--------------------------------------------------------------------------- #include +#include // sprintf #pragma hdrstop USERES("chat.res"); USEFORM("MainFormUnit.cpp", MainForm); @@ -84,15 +85,21 @@ WINAPI WinMain(HINSTANCE, HINSTANCE, LPS if(argv!=NULL) argv[len]=0; - if(!user_name[0]) + if(!user_name[0]) { + char errmsg[512]; + sprintf(errmsg,"Invalid command-line: '%s'",cmdline); + Application->MessageBox(errmsg + ,"Synchronet Chat",MB_OK|MB_ICONEXCLAMATION); return 0; + } node_num=(atoi(node_number)); try { Application->Initialize(); - Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Title = "Synchronet Sysop Chat"; + Application->CreateForm(__classid(TMainForm), &MainForm); Application->Run(); } catch (Exception &exception)