-
Notifications
You must be signed in to change notification settings - Fork 0
/
2B2T Alert System - Notifier.bat
63 lines (47 loc) · 1.94 KB
/
2B2T Alert System - Notifier.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
REM -----------READ CURRENT POSITION----------------------------------------
type %appdata%\.minecraft\logs\latest.log > templog.txt
for /f "tokens=* delims= " %%a in (templog.txt) do (set posRaw=%%a)
set posFil=%posRaw:~50,3%
REM ----------SHOW SENDING SCREEN-------------------------------------------
title 2B2T Alert System - Notifier
cls
echo.
echo -----------------------------
echo 2B2T Queue Status Alert
echo -----------------------------
echo.
echo.
echo Sending Mail...
echo Position: %posFil%
echo.
echo.
echo Program inspired by:
echo R2bEEaton
echo Program created by:
echo KyGuy2002
echo.
echo Version: 1.0
REM ----------SEND MAIL-------------------------------------------
>2b2t.vbs echo Const schema = "http://schemas.microsoft.com/cdo/configuration/"
>>2b2t.vbs echo Const cdoBasic = 1
>>2b2t.vbs echo Const cdoSendUsingPort = 2
>>2b2t.vbs echo Set oMsg = CreateObject("CDO.Message")
>>2b2t.vbs echo oMsg.From = "YOUR GMAIL HERE"
>>2b2t.vbs echo oMsg.To = "YOUR EMAIL HERE"
>>2b2t.vbs echo oMsg.TextBody = "Your position in queue is: %posFil%."
>>2b2t.vbs echo Set oConf = oMsg.Configuration
>>2b2t.vbs echo oConf.Fields(schema ^& "smtpserver") = "smtp.gmail.com"
>>2b2t.vbs echo oConf.Fields(schema ^& "smtpserverport") = 465
>>2b2t.vbs echo oConf.Fields(schema ^& "sendusing") = cdoSendUsingPort
>>2b2t.vbs echo oConf.Fields(schema ^& "smtpauthenticate") = cdoBasic
>>2b2t.vbs echo oConf.Fields(schema ^& "smtpusessl") = True
>>2b2t.vbs echo oConf.Fields(schema ^& "sendusername") = "YOUR GMAIL HERE"
>>2b2t.vbs echo oConf.Fields(schema ^& "sendpassword") = "YOUR GMAIL PASSWORD HERE"
>>2b2t.vbs echo oConf.Fields.Update
>>2b2t.vbs echo oMsg.Send
start 2b2t.vbs
ping localhost -n 2 >nul
del 2b2t.vbs
del templog.txt
exit