Batch Server Chatroom

bnetclanbot54

New Member
Messages
2
Reaction score
0
Points
0
Hello there,

Me and my friend coded a chatroom in cmd-batch language and are trying to use the directories on our site as a sub-server. Basically we keep getting an error when registering via through the Chat Client.

Upon registration the user will input their username and password then a confirmation password. When approved, the bat will write a file to the server directory as a batch. The file name is the username and within the file is the user password. Here is the register code:

Code:
set /p newname="Enter new username:"
if "%newname%"=="%newname%" goto inputname
:inputname
>pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\"
popd
if exist "universal" goto skip
if not exist "universal" goto noskip
:noskip
md "universal"
goto skip
:skip
>pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\universal\"
popd
if exist "%newname%.bat" goto namexist
if not exist "%newname%.bat" goto skip2
:skip2
echo set realusername=%newname%> "%newname%.bat"
goto next
:next
echo.
set /p pswd=Enter new Password:
if "%pswd%"=="%pswd%" goto inputpass
:inputpass
>pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\"
popd
echo set password=%pswd%>> "%newname%.bat"
goto next1
:namexist
echo.
echo The entered username already exists.
echo Press any key to return. . .
pause >nul
cls
goto register
:next1
cls
color 02
echo.
echo Your account has been successfully created!
echo.
pause
goto init

However when we try to register using the server, we get this error.

Code:
'"\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\"' is not recognized
 as an internal or external command,
operable program or batch file.
'"\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\universal\"' is not
 recognized as an internal or external command,
operable program or batch file.

Also in our chat viewer we get an "Access Denied".
Basically the viewer connects to the server chat.txt file that stores the chat discussions and pings to the server. I even changed the file permissions for chat.txt on our server to everything enabled.
 

anonymous02

New Member
Messages
1
Reaction score
0
Points
1
Hello i made some few changes to your code by adding "echo" to it here is an example of what it really looks like here

@echo off
title Team chat
color 4f
echo ==============BROSCHAT===============
set /p newname="Enter new username:"
if "%newname%"=="%newname%" goto inputname
:inputname
echo >pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\"
popd
if exist "universal" goto skip
if not exist "universal" goto noskip
:noskip
md "universal"
goto skip
:skip
echo >pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\universal\"
popd
if exist "%newname%.bat" goto namexist
if not exist "%newname%.bat" goto skip2
:skip2
echo set realusername=%newname%> "%newname%.bat"
goto next
:next
echo.
set /p pswd=Enter new Password:
if "%pswd%"=="%pswd%" goto inputpass
:inputpass
echo >pushd "\\69.175.122.xxx\home\clanbnow\data_alias\database\user_db\"
popd
echo set password=%pswd%>> "%newname%.bat"
goto next1
:namexist
echo.
echo The entered username already exists.
echo Press any key to return. . .
pause >nul
cls
goto register
:next1
cls
color 02
echo.
echo Your account has been successfully created!
echo.
pause
goto init



[here]
 

Attachments

  • Chat.PNG
    Chat.PNG
    10.3 KB · Views: 1
Top