Make your own FTP Chat
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
When you´re German then go to www.funpic.de there u can create Website which also includes a FTP.
When registering at www.uploaded.to then u can also upload files to account trough ftp maybe u can use that too....
When registering at www.uploaded.to then u can also upload files to account trough ftp maybe u can use that too....
I make a LAN chat download here
You do not have the required permissions to view the files attached to this post.
Just to point it out, as I see many people doing this for no reason at all, you can do
Code: Select all
instead of
If RichTextBox2.Text <> RichTextBox1.Text Then RichTextBox1.Text = RichTextBox2.Text
Code: Select all
EDIT: It's good programming practice to rename your controls so they're not something like "RichTextBox1".If RichTextBox2.Text = RichTextBox1.Text Then Else : RichTextBox1.Text = RichTextBox2.Text
btw, 000webhost aren't advisable for stuff like this, I've been with them for a while, they caused alot of issues. Instead, http://x10hosting.com is good, their servers got new hardware recently too increasing performance, I've used em for a while now and they've not let me down.

Hello,
can u help me how can i make commands?
like irc /ban /kick /unban etc..
can u help me how can i make commands?
like irc /ban /kick /unban etc..
You could make a script that lets the FTP server follow those commands.
@justfashion:
Code: Select all
I've thrown a bit of my code in there, hope it helps. goto the sub: processcommands and add the /kick etc in there. I'm still working on that part, but the fact that I'm making it into a server + client app takes priority. I'm also using Multi-Threaded FTP connections if anyone wants to know how to stop the error where it seems to crash when trying to connect (It claims the client is not logged in according to FileZilla) Dim client As New Net.WebClient
Dim iscommand As New Boolean
Dim name1 As New String(My.Settings.nick)
Dim privs As String
Dim kick As String
Dim clear As String
Dim admin As String
Dim subrank As String
Dim rank As System.Drawing.Color
Public Sub checkcommands(ByVal input As System.String)
If (input.StartsWith("/")) Then
iscommand = True
Else
iscommand = False
End If
End Sub
Public Sub processcommand(ByVal command As System.String)
If command.StartsWith("/nick") Then
Dim oldname As String
oldname = name1
My.Settings.nick = command.Substring(6)
name1 = My.Settings.nick
Dim users As String
client.Credentials = New Net.NetworkCredential("root", "***")
users = client.DownloadString("ftp://127.0.0.1/server.users")
users = users.Replace(oldname, name1)
client.UploadString("ftp://127.0.0.1/server.users", users)
getprivs(name1)
End If
If command = "/cls" And clear = "1" Then
client.Credentials = New Net.NetworkCredential("root", "***")
client.UploadString("ftp://127.0.0.1/server.messages", name1 + " Cleared the chat log")
MsgBox("DONE!")
ElseIf command = "/cls" And clear = "0" Then
MsgBox("Your not permitted to do this! DEBUG INFO: Required Permission value: 1 | Your Value: " & clear)
End If
If command = "/sanick" And admin = "1" Then
client.Credentials = New Net.NetworkCredential("root", "***")
Dim oldname As String
Dim newname As String
Dim strarray As Array
strarray = command.Split(" ")
oldname = strarray.GetValue(0)
newname = strarray.GetValue(1)
Dim str As String
str = client.DownloadString("ftp://127.0.0.1/server.users")
str = str.Replace(oldname, newname)
client.UploadString("ftp://127.0.0.1/server.users", str)
End If
End Sub
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
Button1.PerformClick()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
name1 = My.Settings.nick
checkcommands(TextBox1.Text)
If iscommand = True Then
processcommand(TextBox1.Text)
TextBox1.Clear()
Exit Sub
End If
Try
client.Credentials = New Net.NetworkCredential("root", "***")
client.UploadString("ftp://127.0.0.1/server.messages", "[" & TimeOfDay & "] " & name1 & ": " & TextBox1.Text & vbNewLine & RichTextBox2.Text & vbNewLine)
RichTextBox2.Clear()
Catch ex As Exception
MsgBox("Error, this error is being taken care of.", MsgBoxStyle.Critical, "Error!")
End Try
Try
client.Credentials = New Net.NetworkCredential("root", "***")
RichTextBox2.Text = client.DownloadString("ftp://127.0.0.1/server.messages")
If RichTextBox2.Text = RichTextBox1.Text Then Else : RichTextBox1.Text = RichTextBox2.Text
Catch ex As Exception
End Try
TextBox1.Text = ""
End Sub
Sub getprivs(ByVal name As String)
client.Credentials = New Net.NetworkCredential("root", "***")
Dim one As String
Dim onearray As Array
one = client.DownloadString("ftp://127.0.0.1/server.privs")
onearray = one.Split(" ")
For Each one In onearray
If one.StartsWith(name) Then
Dim split As Array
split = one.Split(",")
kick = split.GetValue(1)
clear = split.GetValue(2)
admin = split.GetValue(3)
subrank = split.GetValue(4)
Select Case subrank
Case 1
rank = Color.Red
Case 2
rank = Color.Blue
Case 3
rank = Color.Green
Case Else
rank = Color.Black
End Select
End If
Next
End Sub

instead of using a hidden rtb can i also use a public string or does it have to be rtf styled
You could use a public string, or even a setting I'm sure it would work fine
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
Copyright Information
Copyright © Codenstuff.com 2020 - 2023