Wollte einen Chatt für eine homepage machen ..
hab da schomal sone klenö foalage aber das is bestimmt naja sagen wir mal 'bull-sh i ** † '
HWID System will ich bitte auch haben aber ich habe 0 ahnung wie das geht
Server Scrip :
Code:
HotKeySet("{Esc}","Ende")
$ip=@IPAddress1 ;<--- Local
$ip1=TCPNameToIP("thebmg.ath.cx") ;<--- Global
Global $max_zeichen=9999
Global $index[16]
TCPStartup()
$tcp=TCPListen($ip,27039)
While 1
$acc=TCPAccept($tcp)
If $acc<>-1 Then
$conid=Conect($acc)
If $conid<>-1 Then
TCPSend($index[$conid],"Accept")
Else
TCPSend($acc,"Full")
EndIf
$acc=-1
EndIf ;<-- Neuer Client
For $i= 0 To UBound($index)-1
If $index[$i]<>"" Then
$rec=TCPRecv($index[$i],$max_zeichen)
If $rec<>"" And $rec<>"Disconect" Then
For $j= 0 To UBound($index)-1
If $index[$j]<>"" Then TCPSend($index[$j],$rec)
Next
ElseIf $rec="Disconect" Then
DisConect($index[$i])
EndIf
EndIf
Next ;<-- Text senden/epfamgen
WEnd
Func Conect($con)
For $i= 0 to UBound($index)-1
If $index[$i]="" Then
$index[$i]=$con
Return $i
EndIf
Next
Return -1
EndFunc
Func DisConect($con)
For $i=0 To UBound($index)-1
If $index[$i]=$con Then
$index[$i]=""
Return 1
EndIf
Next
EndFunc
Func Ende ()
Exit
EndFunc
Client Script :
Code:
#Include <Date.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$1 = GUICreate("Chat Room", 507, 364, 192, 125)
$text = GUICtrlCreateEdit("", 5, 5, 490, 245, BitOR($ES_READONLY,$ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL))
GUICtrlSetBkColor($text,0xFFFFFF)
$send = GUICtrlCreateEdit("", 5, 252, 400, 108)
$go = GUICtrlCreateButton("Senden", 410, 270, 90, 30, $WS_GROUP)
$ex = GUICtrlCreateButton("Exit", 410, 318, 90, 30, $WS_GROUP)
GUISetState(@SW_HIDE,$1)
$ip=@IPAddress1 ;<--- Local
$ip1=TCPNameToIP("thebmg.ath.cx") ;<--- Global
TCPStartup()
$con=TCPConnect($ip,27039)
If $con = -1 Then
MsgBox(16, "Error","Server Offline!")
Exit
EndIf
Do
$rec=TCPRecv($con,10)
Until $rec<>""
If $rec="Full" Then
MsgBox(16,"Chat","Der Server ist voll"&@LF&"bitte versuchen sie es später nochein Mal")
Exit
EndIf
$112233 = FileRead("Regi..ini")
Do
$name=$112233
If @error=1 Then Ende()
If @error>0 Then MsgBox(0,"Chat","Bitte einen Namen eingeben")
Until $name <>""
GUISetState(@SW_SHOW,$1)
TCPSend($con,"### "&$name&" hat sich im Chat angemeldet ###")
Dim $hotkey[1][2]=[["{Enter}",$go]]
GUISetAccelerators($hotkey)
While 1
$msg=GUIGetMsg()
If $msg=$go Then Senden()
If $msg=$ex Then ende()
If $msg=-3 Then ende()
$rec=TCPRecv($con,9999)
If $rec<>"" Then GUICtrlSetData($text,GUICtrlRead($text)&$rec&@CRLF)
WEnd
Func Senden()
If GUICtrlRead($send)<>"" Then
TCPSend($con,"["&$name&" "&@HOUR&":"&@MIN&"]: "&GUICtrlRead($send))
GUICtrlSetData($send,"")
Else
MsgBox(0,"Chat","Kein Text eingegeben")
EndIf
EndFunc
Func ende()
TCPSend($con,"### "&$name&" hat den Chatt verlassen ###")
TCPSend($con,"Disconect")
Exit
EndFunc
und habe da mal son regestrierungs programm oda so ' im anhang ist alles !'






