UrlGuy
Jan 21st, 2006, 07:08 AM
Hi,
I have a simple program on a remote server listening for connections on TCP port 1980.
This is for gameserver management.
When it recieves for example 'ban,ip,username,reason' on port 1980, it will ban that player.
I'm trying to make a app in Winsock so I can ban players from my desktop..
What I have now is the following code;
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then MsgBox "You didnt fill out all fields", vbCritical, "Error!"
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 1980
Winsock1.SendData "ban," + Text2.Text + "," + Text2.Text + "," + Text4.Text
MsgBox Text3.Text + " has been banned!"
End Sub
Private Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then MsgBox "You didnt fill out all fields", vbCritical, "Error!"
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 1980
Winsock1.SendData "unban," + Text3.Text + "," + Text2.Text + "," + Text4.Text
MsgBox Text2.Text + " has been unbanned!"
End Sub
But when I click one of my buttons I get something like "Wrong protocol or connection state.."
Can anyone help me with this?
Thanks in advance!
I have a simple program on a remote server listening for connections on TCP port 1980.
This is for gameserver management.
When it recieves for example 'ban,ip,username,reason' on port 1980, it will ban that player.
I'm trying to make a app in Winsock so I can ban players from my desktop..
What I have now is the following code;
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then MsgBox "You didnt fill out all fields", vbCritical, "Error!"
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 1980
Winsock1.SendData "ban," + Text2.Text + "," + Text2.Text + "," + Text4.Text
MsgBox Text3.Text + " has been banned!"
End Sub
Private Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then MsgBox "You didnt fill out all fields", vbCritical, "Error!"
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 1980
Winsock1.SendData "unban," + Text3.Text + "," + Text2.Text + "," + Text4.Text
MsgBox Text2.Text + " has been unbanned!"
End Sub
But when I click one of my buttons I get something like "Wrong protocol or connection state.."
Can anyone help me with this?
Thanks in advance!