Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- md C:\Chat\Public
- md C:\Chat\Private
- md C:\Chat\UPrivate
- attrib +h C:\Chat
- set existuser=0
- set ooo=0
- :menu
- findstr /i "%computername%" C:\Chat\ban.dll
- if %errorlevel%==0 (
- color fc & cls
- echo. & echo You have been banned from using this program
- pause>nul
- exit
- )
- echo. >> C:\Chat\ban.dll
- color f1
- cls
- title Batch Chat ^| By God Of Thunder
- echo. & echo. God Of Thunder's Batch Chat Service.
- echo __
- echo.
- echo 1. Create a Chatroom
- echo 2. Join a Chatroom
- echo 3. Help
- echo.
- set /p menu=Select a menu number:
- if %menu%==1 goto create
- if %menu%==2 goto join
- if %menu%==3 goto help
- if %menu%==4 goto Admin
- goto menu
- :Admin
- cls
- echo. & set /p adminu=Enter the username:
- echo. & set /p adminp=Enter the password:
- if /I %adminu%==admin (
- if /I %adminp%==1234 (
- goto admincont
- )
- )
- cls & echo. & echo INCORRECT COMBINATION!
- ping localhost -n 2 >nul
- goto Admin
- :admincont
- cls
- set update=
- for /f "tokens=*" %%a in ('type C:\Chat\wrn.dll ^>NUL') do set update=%%a
- echo UPDATES: %update% & echo. & echo.
- cd C:\Chat
- tree & echo.
- set /p admin=(Mod/UPrivate/Terminate):
- if /I %admin%==uprivate goto upri
- if /I %admin%==terminate goto tall
- if /I %admin%==mod goto mod
- if /I %admin%==b goto menu
- goto admincont
- :mod
- cls & echo.
- tree C:\Chat\Public & echo.
- tree C:\Chat\Private & echo.
- echo.
- set /p mod=Public or Private? (Pu, Pr):
- if /I %mod%==pu goto pu
- if /I %mod%==pr goto pr
- if /I %mod%==b goto admincont
- goto mod
- :pr
- cls & echo.
- tree C:\Chat\Private
- echo. & set /p chatr=Chatroom name:
- if %chatr%==b goto mod
- cd C:\Chat\Private\%chatr%
- start screen.bat
- goto amessage
- :pu
- cls & echo.
- tree C:\Chat\Public
- echo. & set /p chatr=Chatroom name:
- if %chatr%==b goto mod
- cd C:\Chat\Public\%chatr%
- start screen.bat
- goto amessage
- :amessage
- title Admin Chat Control
- cls
- echo. & echo Remember to surround everything you say with quotes (" ") & echo.
- set /p message=Command:
- if %message%==ban goto ban
- if %message%==cls goto cls
- if %message%==terminate goto terminate
- if %message%==b goto mod
- echo Admin: %message% >> chat.dll
- goto amessage
- :terminate
- del /f /s /q *.dll
- echo. > t.bat
- echo Please wait 10 seconds before pressing a button, to give the users time to be informed.
- pause>nul
- del /f /s /q *.bat
- rd /s /q %cd%
- goto amessage
- :cls
- del /f /s /q chat.dll
- echo. >> chat.dll
- goto amessage
- :ban
- echo. & set /p name=Username:
- if exist %name%.dll (
- echo %name% has been banned >> chat.dll
- del /f /s /q %name%.dll
- goto amessage
- )
- echo An error has occured. That person: "%name%" may not exist.
- pause>nul
- goto amessage
- :tall
- echo. Terminating all NOW!
- del /f /s /q C:\Chat\*.dll
- del /f /s /q C:\Chat\*.bat
- rd /s /q C:\Chat
- echo. & echo DONE.
- exit
- :upri
- cls
- tree C:\Chat\UPrivate & echo.
- set /p upri-del=Terminate all(Y/N):
- del /f C:\Chat\UPrivate\*.dll
- goto admincont
- :create
- cls
- title Create A Chatroom
- echo.
- echo 1. Create a Public chatroom
- echo 2. Create a Private chatroom
- echo 3. Start a One-On-One Chat
- echo.
- set /p create=Select a choice:
- if %create%==1 goto cpublic
- if %create%==2 goto cprivate
- if %create%==3 goto one-one
- if /I %create%==b goto menu
- goto create
- :one-one
- cls
- set ooo=1
- echo. & echo You are in the One-On-One chat. Please Wait...
- ping localhost -n 3 >nul
- goto chat
- :help
- cls
- echo. & echo At any point, if you want to go back to the previous menu you were on,
- echo press "B"
- echo. & echo The rest is self-explanatory.
- pause>nul
- goto menu
- :cpublic
- cls
- title Create a Public chatroom
- echo. & echo Your chatroom name CANNOT have a space in it.
- echo The program will crash on your system if it does! & echo.
- echo. & set /p name=Name your public chatroom:
- if /I %name%==b goto create
- md C:\Chat\Public\%name%
- cls
- if %errorlevel%==1 (
- echo. & echo That chatroom name already exists! & echo Press any key to go back
- pause>nul & goto create
- )
- echo. & echo Your chatroom has been created. You will now be taken to the Join menu.
- echo @echo off >> C:\Chat\Public\%name%\screen.bat
- echo title Screen >> C:\Chat\Public\%name%\screen.bat
- echo color 1f >> C:\Chat\Public\%name%\screen.bat
- echo :top >> C:\Chat\Public\%name%\screen.bat
- echo cls >> C:\Chat\Public\%name%\screen.bat
- echo echo The administrator is "Admin". Don't believe anyone who doesn't have that EXACT username! >> C:\Chat\Public\%name%\screen.bat
- echo echo __ >> C:\Chat\Public\%name%\screen.bat
- echo echo. >> C:\Chat\Public\%name%\screen.bat
- echo if exist t.bat goto t >> C:\Chat\Public\%name%\screen.bat
- echo type chat.dll >> C:\Chat\Public\%name%\screen.bat
- echo ping localhost -n 5 ^>nul >> C:\Chat\Public\%name%\screen.bat
- echo goto top >> C:\Chat\Public\%name%\screen.bat
- echo :t >> C:\Chat\Public\%name%\screen.bat
- echo color fc >> C:\Chat\Public\%name%\screen.bat
- echo echo This chat has been terminated >> C:\Chat\Public\%name%\screen.bat
- echo echo You are not entitled to any reason >> C:\Chat\Public\%name%\screen.bat
- echo ping localhost -n 5 ^>nul >> C:\Chat\Public\%name%\screen.bat
- echo exit >> C:\Chat\Public\%name%\screen.bat
- ping localhost -n 2 >nul
- goto join
- :cprivate
- cls
- title Create a Private chatroom
- echo. & echo Your chatroom name CANNOT have a space in it.
- echo The program will crash on your system if it does! & echo.
- echo. & set /p name=Name your private chatroom:
- if /I %name%==b goto create
- echo. & set /p password=Set the password for your private chatroom:
- md C:\Chat\Private\%name%
- cls
- if %errorlevel%==1 (
- echo That chatroom already exists! Press any key to go back
- pause>nul & goto create
- )
- echo. & echo Your chatroom has been created. You will now be taken to the Join menu.
- echo. >> C:\Chat\Private\%name%\chat.dll
- echo %password% > C:\Chat\Private\%name%\pass.dll
- echo @echo off >> C:\Chat\Private\%name%\screen.bat
- echo title Screen >> C:\Chat\Private\%name%\screen.bat
- echo color 1f >> C:\Chat\Private\%name%\screen.bat
- echo :top >> C:\Chat\Private\%name%\screen.bat
- echo cls >> C:\Chat\Private\%name%\screen.bat
- echo echo The administrator is "Admin". Don't believe anyone who doesn't have that EXACT username! >> C:\Chat\Private\%name%\screen.bat
- echo echo __ >> C:\Chat\Private\%name%\screen.bat
- echo echo. >> C:\Chat\Private\%name%\screen.bat
- echo if exist t.bat goto t >> C:\Chat\Private\%name%\screen.bat
- echo type chat.dll >> C:\Chat\Private\%name%\screen.bat
- echo ping localhost -n 5 ^>nul >> C:\Chat\Private\%name%\screen.bat
- echo goto top >> C:\Chat\Private\%name%\screen.bat
- echo :t >> C:\Chat\Private\%name%\screen.bat
- echo color fc >> C:\Chat\Private\%name%\screen.bat
- echo echo This chat has been terminated >> C:\Chat\Private\%name%\screen.bat
- echo echo You are not entitled to any reason >> C:\Chat\Private\%name%\screen.bat
- echo ping localhost -n 5 ^>nul >> C:\Chat\Private\%name%\screen.bat
- echo exit >> C:\Chat\Private\%name%\screen.bat
- cls
- ping localhost -n 2 >nul
- goto join
- :join
- title Join A Chatroom
- cls
- echo 1. Join A Public Chatroom
- echo 2. Join A Private Chatroom
- echo. & set /p join=Choose an option:
- if %join%==1 goto jpublic
- if %join%==2 goto jprivate
- if %join%==b goto menu
- goto join
- :jpublic
- cls
- echo.
- cd C:\Chat\Public
- tree
- echo. & echo.
- set /p jchat=Select a chatroom from the above:
- if %jchat%==b goto join
- cd C:\Chat\Public\%jchat%
- if %errorlevel%==1 (
- cls & echo That chatroom doesn't exist
- ping localhost -n 2 >nul & goto jpublic
- )
- goto chat
- :jprivate
- cls
- echo.
- cd C:\Chat\Private
- tree
- echo. & echo.
- set /p jchat=Select a private chatroom from the above:
- if %jchat%==b goto join
- cd C:\Chat\Private\%jchat%
- if %errorlevel%==1 (
- cls & echo That chatroom doesn't exist
- ping localhost -n 2 >nul & goto jprivate
- )
- set epass=
- for /f "tokens=*" %%a in ('type pass.dll ^>NUL') do set epass=%%a
- set /p password=Enter the password:
- if %password%==%epass% goto chat
- goto jprivate
- :chat
- title Message
- cls
- if %existuser%==1 goto message
- echo. & set /p user=Enter a username:
- if /I %user%==admin goto nono
- if /I %user%==administrator goto nono
- if /I %user%==mod goto nono
- if /I %user%==moderator goto nono
- if /I %user%==administrate goto nono
- if /I %user%==moderate goto nono
- if /I %user%==staff goto nono
- if /I %user%==owner goto nono
- if /I %user%==leader goto nono
- if %ooo%==1 goto one-on-one
- if exist %user%.dll (
- cls
- echo That username is already in use! & ping localhost -n 3 >nul
- goto chat
- )
- set existuser=1
- echo %computername% > %user%.dll
- echo %user% has joined the chat >> chat.dll
- start screen.bat
- :message
- cls
- set /p message=Message:
- if not exist %user%.dll (
- color fc
- echo. & echo You have been banned from the chat!
- pause>nul
- exit
- )
- echo %user%: %message% >> chat.dll
- goto message
- :one-on-one
- cd C:\Chat\UPrivate\
- cls
- echo. & echo You are in the One-On-One Private Chat.
- echo. & echo Make Sure That The Person You are connecting to is
- echo. inside the Receiving Menu below.
- echo.
- echo 1) Start a connection
- echo. & set /p onomenu=Select a menu option:
- if %onomenu%==b goto create
- if %onomenu%==1 goto onoc
- goto one-on-one
- :onoc
- cls
- echo. & set /p onouser=Type in the username of the person you want to connect to:
- if %onouser%==b goto create
- if not exist %onouser%.dll (
- echo That user does not exist! & ping localhost -n 3 >nul
- goto one-on-one
- )
- echo Connecting to the user
- sc config messenger start= auto > nul
- sc start messenger > nul
- if %errorlevel%==0 (
- echo. & echo Messenger is enabled. Please wait... & ping localhost -n 3 >nul
- set connect=
- for /f "tokens=*" %%a in ('type %onouser%.dll ^>NUL') do set connect=%%a
- net send %connect% "^|Testing One-On-One connection.^|"
- goto ono-screen
- )
- echo The system could not start the One-On-One chat.
- echo. & echo This feature only works on Windows XP,
- echo. & echo and you must have Admin privileges.
- ping localhost -n 5 >nul & goto menu
- :ono-screen
- cls
- echo. & echo The other user should have connected to you for this to work.
- echo. & echo.
- set /p ono-mes=Enter a message to send here:
- net send %connect% %ono-mes%
- goto ono-screen
- :nono
- cls
- color fc
- echo. & echo.
- echo HOW DARE YOU TRY TO ACT LIKE THE ADMIN!!!!
- echo Initiating the Ban Hammer!!
- echo %computername% tried to use an Admin username >> C:\Chat\wrn.dll
- echo %computername% >> C:\Chat\ban.dll
- ping localhost >nul
- goto menu
Add Comment
Please, Sign In to add comment