mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Small updates
This commit is contained in:
parent
6110f6e3a3
commit
d1d37fb13e
@ -196,7 +196,7 @@ else
|
||||
fin
|
||||
hellopkt:2 = version
|
||||
chatpkt:2 = version
|
||||
puts("CHAT cliet version:"); puti(version); putln
|
||||
puts("CHAT client version:"); puti(version); putln
|
||||
if !iNet:initIP()
|
||||
return -1
|
||||
fin
|
||||
|
@ -10,10 +10,12 @@
|
||||
<file name="UPDATE" type="0xFE" aux="0x1000" mask="0x0080"/>
|
||||
<file name="CHAT" type="0xFE" aux="0x1000" mask="0x0100"/>
|
||||
<file name="AUTORUN" type="0x06" aux="0x0000" mask="0x0200"/>
|
||||
<file name="VERSION" type="0x06" aux="4" mask="0x0400"/>
|
||||
<current level="4"/>
|
||||
<file name="VERSION" type="0x06" aux="6" mask="0x0400"/>
|
||||
<current level="6"/>
|
||||
<version level="1" updates="0x0000"/>
|
||||
<version level="2" updates="0x0180"/>
|
||||
<version level="3" updates="0x0380"/>
|
||||
<version level="4" updates="0x0408"/>
|
||||
<version level="5" updates="0x0440"/>
|
||||
<version level="6" updates="0x0580"/>
|
||||
</chat>
|
||||
|
@ -3,7 +3,7 @@ import sys, struct, socket, select
|
||||
|
||||
server = ("localhost", 0x6502)
|
||||
myhandle = "Python"
|
||||
VERSION = 4
|
||||
VERSION = 6
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
server = (sys.argv[1], 0x6502)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -13,13 +13,12 @@ chat_vers = []
|
||||
def client_add(address, port, handle):
|
||||
global client_list
|
||||
client_list[address] = (port, handle)
|
||||
print "Welcome, ", handle, "@", address, ":", port
|
||||
|
||||
def broadcast(handle, msg):
|
||||
global client_list
|
||||
if msg:
|
||||
print handle, ": ", msg
|
||||
else:
|
||||
print "Welcome, ", handle
|
||||
bcastmsg = struct.pack('<HHHBc8p32p', 0x7EDA, VERSION, 0, 0xCA, 'C', handle, msg)
|
||||
for c in client_list:
|
||||
client = (c, client_list[c][0])
|
||||
|
@ -81,9 +81,9 @@ byte[4] ones = $FF, $FF, $FF, $FF
|
||||
//
|
||||
// Default static net IP addresses
|
||||
//
|
||||
byte localdns = 0,0,0,0
|
||||
byte localgw = 192,168,123,1
|
||||
byte localip = 192,168,123,10
|
||||
byte localdns = 8,8,8,8
|
||||
byte localgw = 192,168,1,1
|
||||
byte localip = 192,168,1,10
|
||||
byte localnet = 255,255,255,0
|
||||
//
|
||||
// Pre-configured DHCP packet
|
||||
@ -252,7 +252,7 @@ repeat
|
||||
optsSRV = 255
|
||||
DHCP.dhcp_secs.1 = retry
|
||||
iNet:sendUDP(portDHCP, 0, DHCP_SERVER_PORT, @DHCP, @optsSRV - @DHCP + 1)
|
||||
for timeout = 1 to 1000
|
||||
for timeout = 0 to 1000
|
||||
iNet:serviceIP()
|
||||
if optsOP.2 == DHCP_ACK
|
||||
break
|
||||
@ -263,8 +263,6 @@ until retry > 4 or optsOP.2 == DHCP_ACK
|
||||
iNet:closeUDP(portDHCP)
|
||||
iNet:setInterfaceIP(@localip, @localnet, @localgw)
|
||||
puts(@boundstr);putip(@localip);putc('/');putip(@localnet);putln
|
||||
if localdns:0 | localdns:2
|
||||
iNet:setDNS(@localdns)
|
||||
puts(@dnsstr);putip(@localdns);putln
|
||||
fin
|
||||
iNet:setDNS(@localdns)
|
||||
puts(@dnsstr);putip(@localdns);putln
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user