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
#2
Yeah, I was just wondering. I'm sorta surprised I spotted that, I feel so special now.
Reply
#3
DFA Wrote:shouldnt be surprised :-)
mirage source is one of the shittiest source codes in the history of programming, thats why its so easy to update and improve, and it explains the massive changelog.

Yes, but I'm one of the shittiest programmers in the history of programming, that's why I fail so hard to fix stuff, and add new features.
Reply
#4
Nean Wrote:
DFA Wrote:shouldnt be surprised :-)
mirage source is one of the shittiest source codes in the history of programming, thats why its so easy to update and improve, and it explains the massive changelog.

Yes, but I'm one of the shittiest programmers in the history of programming, that's why I fail so hard to fix stuff, and add new features.

Everybody is the shittiest programmer when they first start.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)