mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-08-09 01:25:00 +00:00
CHAT updates
This commit is contained in:
Binary file not shown.
@@ -32,18 +32,19 @@ import inet
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
const VERSION = 3
|
|
||||||
const txtline = $07D0
|
const txtline = $07D0
|
||||||
const inbuf = $0200
|
const inbuf = $0200
|
||||||
const instr = $01FF
|
const instr = $01FF
|
||||||
|
|
||||||
byte[4] serverIP
|
byte[4] serverIP
|
||||||
|
word[] fileinfo
|
||||||
|
word version
|
||||||
word port, timeout
|
word port, timeout
|
||||||
word update_list, update_len
|
word update_list, update_len
|
||||||
byte response
|
byte response
|
||||||
byte hellopkt = $DA, $7E, VERSION, VERSION >> 8, $00, $00, $A2, 'H'
|
byte hellopkt = $DA, $7E, 0, 0, $00, $00, $A2, 'H'
|
||||||
byte[9] handle = ""
|
byte[9] handle = ""
|
||||||
byte chatpkt = $DA, $7E, VERSION, VERSION >> 8, $00, $01, $A2, 'C'
|
byte chatpkt = $DA, $7E, 0, 0, $00, $01, $A2, 'C'
|
||||||
byte[33] msg
|
byte[33] msg
|
||||||
//
|
//
|
||||||
// DEBUG
|
// DEBUG
|
||||||
@@ -113,6 +114,9 @@ def recvUDP(ipsrc, portsrc, data, len, param)
|
|||||||
break;
|
break;
|
||||||
is 'E'
|
is 'E'
|
||||||
puts("Server error!"); putln
|
puts("Server error!"); putln
|
||||||
|
break
|
||||||
|
otherwise
|
||||||
|
puts("Unkwown server packet:"); putc(response)
|
||||||
wend
|
wend
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -178,6 +182,21 @@ def kbstr
|
|||||||
until inlen == $FF
|
until inlen == $FF
|
||||||
return instr
|
return instr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
//
|
||||||
|
// CHAT session
|
||||||
|
//
|
||||||
|
fileinfo = heapmark()
|
||||||
|
fileinfo->0 = $0A
|
||||||
|
fileinfo=>1 = "VERSION"
|
||||||
|
if !syscall($C4, fileinfo)
|
||||||
|
version = fileinfo=>5 // AUX type has version #
|
||||||
|
else
|
||||||
|
version = 1
|
||||||
|
fin
|
||||||
|
hellopkt:2 = version
|
||||||
|
chatpkt:2 = version
|
||||||
|
puts("CHAT cliet version:"); puti(version); putln
|
||||||
if !iNet:initIP()
|
if !iNet:initIP()
|
||||||
return -1
|
return -1
|
||||||
fin
|
fin
|
||||||
@@ -187,7 +206,7 @@ repeat
|
|||||||
if ^instr
|
if ^instr
|
||||||
if iNet:resolveIP(instr, @serverIP)
|
if iNet:resolveIP(instr, @serverIP)
|
||||||
repeat
|
repeat
|
||||||
puts("Enter chat handle (7 characters or less)\n")
|
puts("Enter chat handle (7 characters or less)")
|
||||||
gets(':'+$80)
|
gets(':'+$80)
|
||||||
until ^instr > 0 and ^instr < 8
|
until ^instr > 0 and ^instr < 8
|
||||||
memcpy(@handle, instr, ^instr + 1)
|
memcpy(@handle, instr, ^instr + 1)
|
||||||
|
@@ -10,8 +10,10 @@
|
|||||||
<file name="UPDATE" type="0xFE" aux="0x1000" mask="0x0080"/>
|
<file name="UPDATE" type="0xFE" aux="0x1000" mask="0x0080"/>
|
||||||
<file name="CHAT" type="0xFE" aux="0x1000" mask="0x0100"/>
|
<file name="CHAT" type="0xFE" aux="0x1000" mask="0x0100"/>
|
||||||
<file name="AUTORUN" type="0x06" aux="0x0000" mask="0x0200"/>
|
<file name="AUTORUN" type="0x06" aux="0x0000" mask="0x0200"/>
|
||||||
<current level="3"/>
|
<file name="VERSION" type="0x06" aux="4" mask="0x0400"/>
|
||||||
|
<current level="4"/>
|
||||||
<version level="1" updates="0x0000"/>
|
<version level="1" updates="0x0000"/>
|
||||||
<version level="2" updates="0x0180"/>
|
<version level="2" updates="0x0180"/>
|
||||||
<version level="3" updates="0x0380"/>
|
<version level="3" updates="0x0380"/>
|
||||||
|
<version level="4" updates="0x0408"/>
|
||||||
</chat>
|
</chat>
|
||||||
|
@@ -3,7 +3,7 @@ import sys, struct, socket, select
|
|||||||
|
|
||||||
server = ("localhost", 0x6502)
|
server = ("localhost", 0x6502)
|
||||||
myhandle = "Python"
|
myhandle = "Python"
|
||||||
VERSION = 3
|
VERSION = 4
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
server = (sys.argv[1], 0x6502)
|
server = (sys.argv[1], 0x6502)
|
||||||
|
Binary file not shown.
Binary file not shown.
0
src/chatsrc/chatserver/clientfiles/VERSION
Normal file
0
src/chatsrc/chatserver/clientfiles/VERSION
Normal file
@@ -722,6 +722,9 @@ def wizServiceIP
|
|||||||
if ir
|
if ir
|
||||||
wiz = @wizChannel
|
wiz = @wizChannel
|
||||||
for i = 0 to 3
|
for i = 0 to 3
|
||||||
|
//
|
||||||
|
// Socket activity
|
||||||
|
//
|
||||||
if ir & (1 << i)
|
if ir & (1 << i)
|
||||||
wizregs = wiz=>channel_regs
|
wizregs = wiz=>channel_regs
|
||||||
wizdata = wiz=>channel_rxmem
|
wizdata = wiz=>channel_rxmem
|
||||||
@@ -811,11 +814,29 @@ def wizServiceIP
|
|||||||
pokereg(wiz=>channel_regs + WIZ_SnCR, $10) // CLOSE
|
pokereg(wiz=>channel_regs + WIZ_SnCR, $10) // CLOSE
|
||||||
wend
|
wend
|
||||||
fin
|
fin
|
||||||
wend
|
wend
|
||||||
fin
|
fin
|
||||||
wiz = wiz + t_channel
|
wiz = wiz + t_channel
|
||||||
next
|
next
|
||||||
fin
|
if ir & $80
|
||||||
|
//
|
||||||
|
// IP conflict
|
||||||
|
//
|
||||||
|
pokereg(WIZ_IR, $80)
|
||||||
|
fin
|
||||||
|
if ir & $40
|
||||||
|
//
|
||||||
|
// Destination unreachable
|
||||||
|
//
|
||||||
|
pokereg(WIZ_IR, $40)
|
||||||
|
fin
|
||||||
|
if ir & $20
|
||||||
|
//
|
||||||
|
// PPOE connection close
|
||||||
|
//
|
||||||
|
pokereg(WIZ_IR, $20)
|
||||||
|
fin
|
||||||
|
fin
|
||||||
end
|
end
|
||||||
//
|
//
|
||||||
// Set the local IP addresses
|
// Set the local IP addresses
|
||||||
|
Reference in New Issue
Block a user