Skip to content

Commit

Permalink
masterserver and gui icons
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord committed Mar 15, 2015
1 parent abe3fd8 commit 4b19e9e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions AOprivateServer.pbp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<section name="data">
<explorer view="" pattern="8"/>
<log show="1"/>
<lastopen date="2015-03-11 17:30" user="Sven" host="SPC"/>
<lastopen date="2015-03-15 20:22" user="Sven" host="SPC"/>
</section>
<section name="files">
<file name="main.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="cf1acfa5cc3b093b69ded92f82cb210b"/>
<fingerprint md5="93a4861a48cf3e7d8118e601f0a038a4"/>
</file>
<file name="Common.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
Expand All @@ -24,7 +24,7 @@
</file>
</section>
<section name="targets">
<target name="Standard-Ziel" enabled="1" default="0">
<target name="Standard-Ziel" enabled="1" default="1">
<inputfile value="main.pb"/>
<outputfile value="build/serverD"/>
<compiler version="PureBasic 5.11 (Windows - x86)"/>
Expand All @@ -35,7 +35,7 @@
../stoneddiscord.ico
</icon>
<format exe="default" cpu="2"/>
<compilecount enable="1" value="467"/>
<compilecount enable="1" value="468"/>
<buildcount enable="1" value="93"/>
<versioninfo enable="1">
<field0 value="2,%COMPILECOUNT,%BUILDCOUNT,0"/>
Expand Down Expand Up @@ -67,7 +67,7 @@
<options thread="1"/>
<format exe="console" cpu="0"/>
</target>
<target name="console" enabled="1" default="1">
<target name="console" enabled="1" default="0">
<inputfile value="main.pb"/>
<outputfile value="build/serverDco"/>
<compiler version="PureBasic 5.11 (Windows - x86)"/>
Expand All @@ -77,7 +77,7 @@
owner.ico
</icon>
<format exe="console" cpu="0"/>
<compilecount enable="1" value="424"/>
<compilecount enable="1" value="425"/>
<buildcount enable="1" value="93"/>
<versioninfo enable="1">
<field0 value="2,%COMPILECOUNT,%BUILDCOUNT,0"/>
Expand Down
7 changes: 3 additions & 4 deletions base/masterserver.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[list]
0 = 46.188.16.205
1 = 54.72.209.44
2 = 37.120.168.157
3 = 127.0.0.1
0 = 54.93.210.149
1 = 46.188.16.205
2 = 54.72.209.44
37 changes: 19 additions & 18 deletions main.pb
Original file line number Diff line number Diff line change
Expand Up @@ -738,37 +738,36 @@ ProcedureDLL MasterAdvert(msport)
If NetworkClientEvent(msID)=#PB_NetworkEvent_Data
msinfo=ReceiveNetworkData(msID,*null,100)
If msinfo=-1
tick=200
sr=-1
Else
msrec$=PeekS(*null,msinfo)
If Left(msrec$,7) ="CHECK#%"
tick=0
If Left(msrec$,7) ="PONG#%"
sr=1
EndIf
EndIf
EndIf

If tick>=200
WriteLog("Masterserver adverter timer exceeded, reconnecting",Server)
CloseNetworkConnection(msID)
If tick>6000
sr=SendNetworkString(msID,"PING#%")
EndIf
If sr=-1
msID=OpenNetworkConnection(master$,27016)

If msID
SendNetworkString(msID,"SCC#"+Str(port)+"#"+name$+"#"+desc$+"#%")
tick=0
Debug "SCC#"+Str(port)+"#"+name$+"#"+desc$+"#%"
sr=SendNetworkString(msID,"SCC#"+Str(msport)+"#"+name$+"#"+desc$+"#%")
sr=0
EndIf
EndIf

Else
msID=OpenNetworkConnection(master$,27016)
If msID
Debug "SCC#"+Str(port)+"#"+name$+"#"+desc$+"#%"
SendNetworkString(msID,"SCC#"+Str(msport)+"#"+name$+"#"+desc$+"#%")
tick=0
sr=SendNetworkString(msID,"SCC#"+Str(msport)+"#"+name$+"#"+desc$+"#%")
sr=1
EndIf
EndIf

Delay(100)
tick+1
Delay(100)
Until public=0

WriteLog("Masterserver adverter thread stopped",Server)
Expand Down Expand Up @@ -1515,6 +1514,8 @@ Procedure HandleCommand(*usagePointer.Client)
EndIf
Wend
UnlockMutex(ListMutex)
Default
WriteLog(rawreceive$,*usagePointer)
EndSelect

If reply$<>""
Expand All @@ -1531,10 +1532,10 @@ CompilerIf #CONSOLE=0
lstate=GetGadgetState(#Listview_0)
ClearGadgetItems(#Listview_0)
i=0
listicon=0
LockMutex(ListMutex)
ResetMap(Clients())
While NextMapElement(Clients())
listicon=0
If Clients()\perm
listicon=1
EndIf
Expand Down Expand Up @@ -1651,7 +1652,7 @@ CompilerIf #CONSOLE=0
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
OpenConsole("serverD")
CompilerEndIf

If ReceiveHTTPFile("http://weedlan.de/serverd/serverd.txt","serverd.txt")
OpenPreferences("serverd.txt")
PreferenceGroup("Version")
Expand Down Expand Up @@ -2053,8 +2054,8 @@ CompilerIf #CONSOLE=0

CompilerEndIf
; IDE Options = PureBasic 5.11 (Windows - x86)
; CursorPosition = 1653
; FirstLine = 1631
; CursorPosition = 1534
; FirstLine = 1521
; Folding = ----
; EnableXP
; EnableCompileCount = 0
Expand Down

0 comments on commit 4b19e9e

Please sign in to comment.