Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redundant...?
#1
Okay, so I was scrolling through the code in the server, and I found this:

Code:
Private Sub mnuKickPlayer_Click()
Dim Name As String

    Name = frmServer.lvwInfo.SelectedItem.SubItems(3)
    If Not Name = "Not Playing" Then
        Call AlertMsg(FindPlayer(Name), "You have been kicked by the server owner!")
        CloseSocket (FindPlayer(Name))
    End If
End Sub

However the specific code in question is:
Code:
Call AlertMsg(FindPlayer(Name), "You have been kicked by the server owner!")
        CloseSocket (FindPlayer(Name))

As you can see, it calls an Alert, but then it also calls a CloseSocket. However, AlertMsg, calls close socket, so wouldn't that be redundant? I'm sure even if it is redundant, it isn't doing much to slow down the game, or if at all. Just wondering.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)