SpiffyTek
/
SMACheck
Archived
1
0
Fork 0

First working version

Still needs some input validation and the "INFO" panel might not be final
This commit is contained in:
MadMakz 2012-09-21 14:06:28 +02:00
parent d95ae45e3c
commit 733450ed8b
4 changed files with 83 additions and 19 deletions

View File

@ -12,13 +12,13 @@
;#AutoIt3Wrapper_Res_ProductVersion=x.x.x.x ; Broken, use #AutoIt3Wrapper_Res_Field=ProductVersion|x.x.x as workarround.
#AutoIt3Wrapper_Res_Field=ProductVersion|Freeware
#AutoIt3Wrapper_Res_Fileversion=1.0.0.1
#AutoIt3Wrapper_Res_Fileversion=1.0.0.3
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=P ;(Y/N/P) AutoIncrement FileVersion After Aut2EXE is finished. default=N. P=Prompt, Will ask at Compilation time if you want to increase the versionnumber
#AutoIt3Wrapper_Res_Language=1031 ;Resource Language code . german = 1031, english (U.S.) = 1033. default 2057=English (United Kingdom). For a List see http://technet.microsoft.com/en-us/library/dd346950.aspx
#AutoIt3Wrapper_OutFile=..\..\COMPILED\SMACheck.exe
#AutoIt3Wrapper_OutFile_X64=..\..\COMPILED\SMACheck_x64.exe
#AutoIt3Wrapper_Icon=.\src\ico\SMACheck.ico
#AutoIt3Wrapper_Icon=.\resources\gfx\placeholder.ico
#AutoIt3Wrapper_Res_Field=OriginalFileName|SMACheck.exe
;#AutoIt3Wrapper_res_file_add=I:\SVN\_Mercurial\ZNC Tool\src\bg.jpg, rt_rcdata, img_bg; http://www.autoitscript.com/forum/topic/51103-resources-udf/
@ -33,27 +33,39 @@
;############################################################################################
Global $VERSION = "1.0.0 alpha 1"
#NoTrayIcon
#include <_XMLDomWrapper.au3>
#include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include "includes/functions.inc.au3"
Global $oXML = ObjCreate("Microsoft.XMLHTTP")
$oXML.Open("GET", "http://api.smacbans.com/xml/getbanninfo_multiple/STEAM_0:0:34038101/", 0)
$oXML.Send
Global $sFile = _TempFile(@TempDir, '~', '.xml')
FileWrite($sFile, $oXML.responseText)
;; GUi
$GUi = GUICreate("SMACheck", 370, 177, 353, 206)
$gTitle = GUICtrlCreateLabel("SMACheck", 0, 0, 369, 52, $SS_CENTER)
GUICtrlSetFont(-1, 30, 400, 0, "Tahoma")
$gSteamID = GUICtrlCreateInput("", 112, 64, 145, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$gButton_Submit = GUICtrlCreateButton("Check", 144, 104, 83, 25, $BS_CENTER)
$gCopyright = GUICtrlCreateLabel("©2012 SMACbans.com && SpiffyTek", 0, 159, 369, 17, $SS_CENTER)
GUICtrlSetFont(-1, 8, 400, 0, "Tahoma")
$gVersion = GUICtrlCreateLabel("v" & $VERSION, 280, 30, 82, 17)
GUISetState(@SW_SHOW)
If _XMLFileOpen($sFile) Then
Global $pStatus = _XMLGetValue('/isbanned/singleBan/status')
EndIf
If $pStatus[1] = "Y" Then
Global $bReason = _XMLGetValue('/isbanned/singleBan/reason')
Global $bNick = _XMLGetValue('/isbanned/singleBan/nickname')
Global $bTime = _XMLGetValue('/isbanned/singleBan/banTime')
EndIf
MsgBox(64, "INFO", $pStatus[1] & @LF & $bTime[1] & @LF & $bReason[1] & @LF & $bNick[1])
FileDelete($sFile)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gButton_Submit
$iSteamID = GUICtrlRead($gSteamID)
_GetStatusFromSMACb($iSteamID)
EndSwitch
WEnd

View File

@ -102,5 +102,21 @@
</properties>
<components/>
</object>
<object type="TALabel" name="gVersion">
<properties>
<property name="Left" vt="Int16">280</property>
<property name="Top" vt="Int8">30</property>
<property name="Width" vt="Int8">82</property>
<property name="Height" vt="Int8">17</property>
<property name="Align" vt="Ident">alCustom</property>
<property name="Caption" vt="String">v1.0.0</property>
<property name="TabOrder" vt="Int8">4</property>
<property name="HaveVariable" vt="False">False</property>
<property name="CtrlStyle" vt="Int32">1342308608</property>
<property name="CtrlExStyle" vt="Int8">0</property>
<property name="Resizing" vt="Set"/>
</properties>
<components/>
</object>
</components>
</object>

View File

@ -1,3 +1,39 @@
;; SMAC XML APi
Func _GetStatusFromSMACb($steamid)
Global $oXML = ObjCreate("Microsoft.XMLHTTP")
$oXML.Open("GET", "http://api.smacbans.com/xml/getbanninfo_multiple/" & $steamid & "/", 0)
$oXML.Send
Global $sFile = _TempFile(@TempDir, '~', '.xml')
FileWrite($sFile, $oXML.responseText)
If _XMLFileOpen($sFile) Then
Global $pStatus = _XMLGetValue('/isbanned/singleBan/status')
EndIf
If $pStatus[1] = "Y" Then
Local $bReason = _XMLGetValue('/isbanned/singleBan/reason')
Local $bNick = _XMLGetValue('/isbanned/singleBan/nickname')
Local $bTime = _XMLGetValue('/isbanned/singleBan/banTime')
EndIf
FileDelete($sFile)
If $pStatus[1] = "Y" Then
Local $oStatus = "SteamID is Banned"
MsgBox(64, "INFO", "Status: " & $oStatus & @LF & "Nick: " & $bNick[1] & @LF & "Reason: " & $bReason[1] & @LF & "Time: " & $bTime[1])
Else
Local $oStatus = "SteamID is not banned"
MsgBox(64, "INFO", "Status: " & $oStatus)
EndIf
EndFunc
;; SteamID Convert
Dim Const $COMM_ID_START = 76561197960265728
Func _CommunityIDToSteamID($sComID)

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB