daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Apr 21st, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. md C:\Chat\Public
  3. md C:\Chat\Private
  4. md C:\Chat\UPrivate
  5. attrib +h C:\Chat
  6. set existuser=0
  7. set ooo=0
  8.  
  9. :menu
  10. findstr /i "%computername%" C:\Chat\ban.dll
  11. if %errorlevel%==0 (
  12. color fc & cls
  13. echo. & echo You have been banned from using this program
  14. pause>nul
  15. exit
  16. )
  17.  
  18. echo. >> C:\Chat\ban.dll
  19. color f1
  20. cls
  21. title Batch Chat  ^|  By God Of Thunder
  22. echo. & echo. God Of Thunder's Batch Chat Service.
  23. echo __
  24. echo.
  25. echo 1. Create a Chatroom
  26. echo 2. Join a Chatroom
  27. echo 3. Help
  28. echo.
  29. set /p menu=Select a menu number:
  30. if %menu%==1 goto create
  31. if %menu%==2 goto join
  32. if %menu%==3 goto help
  33. if %menu%==4 goto Admin
  34. goto menu
  35.  
  36. :Admin
  37. cls
  38. echo. & set /p adminu=Enter the username:
  39. echo. & set /p adminp=Enter the password:
  40. if /I %adminu%==admin (
  41. if /I %adminp%==1234 (
  42. goto admincont
  43. )
  44. )
  45. cls & echo. & echo INCORRECT COMBINATION!
  46. ping localhost -n 2 >nul
  47. goto Admin
  48.  
  49. :admincont
  50. cls
  51. set update=
  52. for /f "tokens=*" %%a in ('type C:\Chat\wrn.dll ^>NUL') do set update=%%a
  53. echo UPDATES: %update% & echo. & echo.
  54. cd C:\Chat
  55. tree & echo.
  56. set /p admin=(Mod/UPrivate/Terminate):
  57. if /I %admin%==uprivate goto upri
  58. if /I %admin%==terminate goto tall
  59. if /I %admin%==mod goto mod
  60. if /I %admin%==b goto menu
  61. goto admincont
  62.  
  63. :mod
  64. cls & echo.
  65. tree C:\Chat\Public & echo.
  66. tree C:\Chat\Private & echo.
  67. echo.
  68. set /p mod=Public or Private? (Pu, Pr):
  69. if /I %mod%==pu goto pu
  70. if /I %mod%==pr goto pr
  71. if /I %mod%==b goto admincont
  72. goto mod
  73.  
  74. :pr
  75. cls & echo.
  76. tree C:\Chat\Private
  77. echo. & set /p chatr=Chatroom name:
  78. if %chatr%==b goto mod
  79. cd C:\Chat\Private\%chatr%
  80. start screen.bat
  81. goto amessage
  82.  
  83. :pu
  84. cls & echo.
  85. tree C:\Chat\Public
  86. echo. & set /p chatr=Chatroom name:
  87. if %chatr%==b goto mod
  88. cd C:\Chat\Public\%chatr%
  89. start screen.bat
  90. goto amessage
  91.  
  92. :amessage
  93. title Admin Chat Control
  94. cls
  95. echo. & echo Remember to surround everything you say with quotes (" ") & echo.
  96. set /p message=Command:
  97. if %message%==ban goto ban
  98. if %message%==cls goto cls
  99. if %message%==terminate goto terminate
  100. if %message%==b goto mod
  101. echo Admin: %message% >> chat.dll
  102. goto amessage
  103.  
  104. :terminate
  105. del /f /s /q *.dll
  106. echo. > t.bat
  107. echo Please wait 10 seconds before pressing a button, to give the users time to be informed.
  108. pause>nul
  109. del /f /s /q *.bat
  110. rd /s /q %cd%
  111. goto amessage
  112.  
  113. :cls
  114. del /f /s /q chat.dll
  115. echo. >> chat.dll
  116. goto amessage
  117.  
  118. :ban
  119. echo. & set /p name=Username:
  120. if exist %name%.dll (
  121. echo %name% has been banned >> chat.dll
  122. del /f /s /q %name%.dll
  123. goto amessage
  124. )
  125. echo An error has occured. That person: "%name%" may not exist.
  126. pause>nul
  127. goto amessage
  128.  
  129. :tall
  130. echo. Terminating all NOW!
  131. del /f /s /q C:\Chat\*.dll
  132. del /f /s /q C:\Chat\*.bat
  133. rd /s /q C:\Chat
  134. echo. & echo DONE.
  135. exit
  136.  
  137. :upri
  138. cls
  139. tree C:\Chat\UPrivate & echo.
  140. set /p upri-del=Terminate all(Y/N):
  141. del /f C:\Chat\UPrivate\*.dll
  142. goto admincont
  143.  
  144. :create
  145. cls
  146. title Create A Chatroom
  147. echo.
  148. echo 1. Create a Public chatroom
  149. echo 2. Create a Private chatroom
  150. echo 3. Start a One-On-One Chat
  151. echo.
  152. set /p create=Select a choice:
  153. if %create%==1 goto cpublic
  154. if %create%==2 goto cprivate
  155. if %create%==3 goto one-one
  156. if /I %create%==b goto menu
  157. goto create
  158.  
  159. :one-one
  160. cls
  161. set ooo=1
  162. echo. & echo You are in the One-On-One chat. Please Wait...
  163. ping localhost -n 3 >nul
  164. goto chat
  165.  
  166. :help
  167. cls
  168. echo. & echo At any point, if you want to go back to the previous menu you were on,
  169. echo press "B"
  170. echo. & echo The rest is self-explanatory.
  171. pause>nul
  172. goto menu
  173.  
  174. :cpublic
  175. cls
  176. title Create a Public chatroom
  177. echo. & echo Your chatroom name CANNOT have a space in it.
  178. echo The program will crash on your system if it does! & echo.
  179. echo. & set /p name=Name your public chatroom:
  180. if /I %name%==b goto create
  181. md C:\Chat\Public\%name%
  182. cls
  183. if %errorlevel%==1 (
  184. echo. & echo That chatroom name already exists! & echo Press any key to go back
  185. pause>nul & goto create
  186. )
  187. echo. & echo Your chatroom has been created. You will now be taken to the Join menu.
  188.  
  189. echo @echo off >> C:\Chat\Public\%name%\screen.bat
  190. echo title Screen >> C:\Chat\Public\%name%\screen.bat
  191. echo color 1f >> C:\Chat\Public\%name%\screen.bat
  192. echo :top >> C:\Chat\Public\%name%\screen.bat
  193. echo cls >> C:\Chat\Public\%name%\screen.bat
  194. echo echo The administrator is "Admin". Don't believe anyone who doesn't have that EXACT  username! >> C:\Chat\Public\%name%\screen.bat
  195. echo echo __ >> C:\Chat\Public\%name%\screen.bat
  196. echo echo. >> C:\Chat\Public\%name%\screen.bat
  197. echo if exist t.bat goto t >> C:\Chat\Public\%name%\screen.bat
  198. echo type chat.dll >> C:\Chat\Public\%name%\screen.bat
  199. echo ping localhost -n 5 ^>nul >> C:\Chat\Public\%name%\screen.bat
  200. echo goto top >> C:\Chat\Public\%name%\screen.bat
  201. echo :t >> C:\Chat\Public\%name%\screen.bat
  202. echo color fc >> C:\Chat\Public\%name%\screen.bat
  203. echo echo This chat has been terminated >> C:\Chat\Public\%name%\screen.bat
  204. echo echo You are not entitled to any reason >> C:\Chat\Public\%name%\screen.bat
  205. echo ping localhost -n 5 ^>nul >> C:\Chat\Public\%name%\screen.bat
  206. echo exit >> C:\Chat\Public\%name%\screen.bat
  207.  
  208. ping localhost -n 2 >nul
  209. goto join
  210.  
  211. :cprivate
  212. cls
  213. title Create a Private chatroom
  214. echo. & echo Your chatroom name CANNOT have a space in it.
  215. echo The program will crash on your system if it does! & echo.
  216. echo. & set /p name=Name your private chatroom:
  217. if /I %name%==b goto create
  218. echo. & set /p password=Set the password for your private chatroom:
  219. md C:\Chat\Private\%name%
  220. cls
  221. if %errorlevel%==1 (
  222. echo That chatroom already exists! Press any key to go back
  223. pause>nul & goto create
  224. )
  225. echo. & echo Your chatroom has been created. You will now be taken to the Join menu.
  226. echo. >> C:\Chat\Private\%name%\chat.dll
  227. echo %password% > C:\Chat\Private\%name%\pass.dll
  228.  
  229. echo @echo off >> C:\Chat\Private\%name%\screen.bat
  230. echo title Screen >> C:\Chat\Private\%name%\screen.bat
  231. echo color 1f >> C:\Chat\Private\%name%\screen.bat
  232. echo :top >> C:\Chat\Private\%name%\screen.bat
  233. echo cls >> C:\Chat\Private\%name%\screen.bat
  234. echo echo The administrator is "Admin". Don't believe anyone who doesn't have that EXACT  username! >> C:\Chat\Private\%name%\screen.bat
  235. echo echo __ >> C:\Chat\Private\%name%\screen.bat
  236. echo echo. >> C:\Chat\Private\%name%\screen.bat
  237. echo if exist t.bat goto t >> C:\Chat\Private\%name%\screen.bat
  238. echo type chat.dll >> C:\Chat\Private\%name%\screen.bat
  239. echo ping localhost -n 5 ^>nul >> C:\Chat\Private\%name%\screen.bat
  240. echo goto top >> C:\Chat\Private\%name%\screen.bat
  241. echo :t >> C:\Chat\Private\%name%\screen.bat
  242. echo color fc >> C:\Chat\Private\%name%\screen.bat
  243. echo echo This chat has been terminated >> C:\Chat\Private\%name%\screen.bat
  244. echo echo You are not entitled to any reason >> C:\Chat\Private\%name%\screen.bat
  245. echo ping localhost -n 5 ^>nul >> C:\Chat\Private\%name%\screen.bat
  246. echo exit >> C:\Chat\Private\%name%\screen.bat
  247. cls
  248. ping localhost -n 2 >nul
  249. goto join
  250.  
  251. :join
  252. title Join A Chatroom
  253. cls
  254. echo 1. Join A Public Chatroom
  255. echo 2. Join A Private Chatroom
  256. echo. & set /p join=Choose an option:
  257. if %join%==1 goto jpublic
  258. if %join%==2 goto jprivate
  259. if %join%==b goto menu
  260. goto join
  261.  
  262. :jpublic
  263. cls
  264. echo.
  265. cd C:\Chat\Public
  266. tree
  267. echo. & echo.
  268. set /p jchat=Select a chatroom from the above:
  269. if %jchat%==b goto join
  270. cd C:\Chat\Public\%jchat%
  271. if %errorlevel%==1 (
  272. cls & echo That chatroom doesn't exist
  273. ping localhost -n 2 >nul & goto jpublic
  274. )
  275. goto chat
  276.  
  277. :jprivate
  278. cls
  279. echo.
  280. cd C:\Chat\Private
  281. tree
  282. echo. & echo.
  283. set /p jchat=Select a private chatroom from the above:
  284. if %jchat%==b goto join
  285. cd C:\Chat\Private\%jchat%
  286. if %errorlevel%==1 (
  287. cls & echo That chatroom doesn't exist
  288. ping localhost -n 2 >nul & goto jprivate
  289. )
  290. set epass=
  291. for /f "tokens=*" %%a in ('type pass.dll ^>NUL') do set epass=%%a
  292. set /p password=Enter the password:
  293. if %password%==%epass% goto chat
  294. goto jprivate
  295.  
  296. :chat
  297. title Message
  298. cls
  299.  
  300. if %existuser%==1 goto message
  301.  
  302. echo. & set /p user=Enter a username:
  303. if /I %user%==admin goto nono
  304. if /I %user%==administrator goto nono
  305. if /I %user%==mod goto nono
  306. if /I %user%==moderator goto nono
  307. if /I %user%==administrate goto nono
  308. if /I %user%==moderate goto nono
  309. if /I %user%==staff goto nono
  310. if /I %user%==owner goto nono
  311. if /I %user%==leader goto nono
  312.  
  313. if %ooo%==1 goto one-on-one
  314.  
  315. if exist %user%.dll (
  316. cls
  317. echo That username is already in use! & ping localhost -n 3 >nul
  318. goto chat
  319. )
  320. set existuser=1
  321. echo %computername% > %user%.dll
  322. echo %user% has joined the chat >> chat.dll
  323. start screen.bat
  324.  
  325. :message
  326. cls
  327. set /p message=Message:
  328. if not exist %user%.dll (
  329. color fc
  330. echo. & echo You have been banned from the chat!
  331. pause>nul
  332. exit
  333. )
  334.  
  335. echo %user%: %message% >> chat.dll
  336. goto message
  337.  
  338. :one-on-one
  339. cd C:\Chat\UPrivate\
  340. cls
  341. echo. & echo You are in the One-On-One Private Chat.
  342. echo. & echo Make Sure That The Person You are connecting to is
  343. echo. inside the Receiving Menu below.
  344.  
  345. echo.
  346. echo 1) Start a connection
  347.  
  348. echo. & set /p onomenu=Select a menu option:
  349. if %onomenu%==b goto create
  350. if %onomenu%==1 goto onoc
  351. goto one-on-one
  352.  
  353. :onoc
  354. cls
  355. echo. & set /p onouser=Type in the username of the person you want to connect to:
  356. if %onouser%==b goto create
  357. if not exist %onouser%.dll (
  358. echo That user does not exist! & ping localhost -n 3 >nul
  359. goto one-on-one
  360. )
  361. echo Connecting to the user
  362. sc config messenger start= auto > nul
  363. sc start messenger > nul
  364. if %errorlevel%==0 (
  365. echo. & echo Messenger is enabled. Please wait... & ping localhost -n 3 >nul
  366. set connect=
  367. for /f "tokens=*" %%a in ('type %onouser%.dll ^>NUL') do set connect=%%a
  368. net send %connect% "^|Testing One-On-One connection.^|"
  369. goto ono-screen
  370. )
  371. echo The system could not start the One-On-One chat.
  372. echo. & echo This feature only works on Windows XP,
  373. echo. & echo and you must have Admin privileges.
  374. ping localhost -n 5 >nul & goto menu
  375.  
  376. :ono-screen
  377. cls
  378. echo. & echo The other user should have connected to you for this to work.
  379. echo. & echo.
  380. set /p ono-mes=Enter a message to send here:
  381.  
  382. net send %connect% %ono-mes%
  383. goto ono-screen
  384.  
  385. :nono
  386. cls
  387. color fc
  388. echo. & echo.
  389. echo HOW DARE YOU TRY TO ACT LIKE THE ADMIN!!!!
  390. echo Initiating the Ban Hammer!!
  391. echo %computername% tried to use an Admin username >> C:\Chat\wrn.dll
  392. echo %computername% >> C:\Chat\ban.dll
  393. ping localhost >nul
  394. goto menu
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top