Jump to content

help with messenger server


Recommended Posts

i am mpdifying the cobra 0.3.6 messenger to fit my needs.

but there is still a small bug which shows every offline user as Administtrator instead of the actual offline user.

here is the code which diyplays the users status and the name.

$Split = StringSplit($Data," ")
                                If $Split[0] = 2 Then
                                    For $i = 0 to $MaxConnections-1
                                If ($Index[$i] > -1) AND $Email[$Index[$i]] = $Split[2] Then
                                ; User is online.
                                    TCPSend($Socket[$n],$ACKNOWLEDGE & " " & $DispName[$Index[$i]])
                                    ExitLoop
                                ElseIf $i = $MaxConnections-1 Then
                                ; User is offline.
                                         TCPSend($Socket[$n],$DENIAL & " " & $DispName[$Index[$i]])
                                EndIf
                                    Next
                                Else
                                    TCPSend($Socket[$n],$ERROR)
                                EndIf
Edited by Quarter86
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...