Page 3 of 4

Re: Make your own FTP Chat

Posted: Tue Apr 05, 2011 3:57 am
by Napster1488
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....

Re: Make your own FTP Chat

Posted: Thu Apr 07, 2011 9:44 am
by volttide
I make a LAN chat download here
LAN Chat.zip

Re: Make your own FTP Chat

Posted: Thu Apr 07, 2011 11:12 am
by mandai
Is there any FTP support in that app?

Re: Make your own FTP Chat

Posted: Sat Apr 09, 2011 12:52 am
by BlakPilar
Just to point it out, as I see many people doing this for no reason at all, you can do
Code: Select all
If RichTextBox2.Text <> RichTextBox1.Text Then  RichTextBox1.Text = RichTextBox2.Text
instead of
Code: Select all
If RichTextBox2.Text = RichTextBox1.Text Then  Else  : RichTextBox1.Text = RichTextBox2.Text
EDIT: It's good programming practice to rename your controls so they're not something like "RichTextBox1".

Re: Make your own FTP Chat

Posted: Wed May 04, 2011 6:49 pm
by rocky4126
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.

Re: Make your own FTP Chat

Posted: Fri May 20, 2011 7:53 pm
by JustFashion
Hello,
can u help me how can i make commands?
like irc /ban /kick /unban etc..

Re: Make your own FTP Chat

Posted: Fri May 20, 2011 11:03 pm
by mandai
You could make a script that lets the FTP server follow those commands.

Re: Make your own FTP Chat

Posted: Sun May 22, 2011 8:40 pm
by rocky4126
@justfashion:
Code: Select all
    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
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)

Re: Make your own FTP Chat

Posted: Wed May 25, 2011 3:52 am
by Bogoh67
instead of using a hidden rtb can i also use a public string or does it have to be rtf styled

Re: Make your own FTP Chat

Posted: Wed May 25, 2011 4:58 am
by smashapps
You could use a public string, or even a setting I'm sure it would work fine