Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' ### K-Under Online Bot ###
- ' 13.10.2011 20:00 Uhr Projekt gestartet
- ' Funktionen geplant:
- ' Updater, Anti-Admin, Steuernick, MyBB Login, Changelog, kleine Statistik
- ' Projekt arbeitet mit der KNLib
- 'KNLib importieren
- Imports KNLib
- Imports System.Net
- Public Class Form1
- #Region "Variablen"
- Private MyBB_Username As String = String.Empty
- Private Nickname As String = String.Empty
- Private Password As String = String.Empty
- Private Channel As String = String.Empty
- Private Proxy As String = String.Empty
- Private Steuernick As String = String.Empty
- Private Uhrzeit As String = String.Empty
- Private Anti_Admin As Boolean = False
- Private Steuernick_verwenden As Boolean = False
- Private Update_vorhanden As Boolean = False
- Private Channel_wechseln As Boolean = False
- Private James_vollspammen As Boolean = False
- Private proxy_nutzen As Boolean = False
- Private aktuelle_Version As String = "1.0"
- Private neuste_Version As String = String.Empty
- Private Autor As String = "schmitz_dev@live.de"
- Dim applet As Applet
- Dim WithEvents client As KSClient
- #End Region
- Sub send_to_knuddels(ByVal text As String)
- End Sub
- Sub write_log(ByVal name As String, ByVal text As String, ByVal Color As Color, ByVal font As FontStyle)
- Uhrzeit_aktualisieren()
- RichTextBox_chatlog.SelectionFont = New Font(RichTextBox_chatlog.Font, FontStyle.Bold)
- RichTextBox_chatlog.AppendText("[" & Uhrzeit & "] ")
- RichTextBox_chatlog.SelectionFont = New Font(RichTextBox_chatlog.Font, font)
- RichTextBox_chatlog.SelectionColor = Color
- RichTextBox_chatlog.AppendText(name & ": " & text & vbNewLine)
- End Sub
- Sub Uhrzeit_aktualisieren()
- Uhrzeit = My.Computer.Clock.LocalTime.Hour & ":" & My.Computer.Clock.LocalTime.Minute & ":" & My.Computer.Clock.LocalTime.Second
- End Sub
- Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
- Environment.Exit(0)
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- CheckForIllegalCrossThreadCalls = False
- If CheckBox_proxynutzen.Checked = True Then
- proxy_nutzen = True
- Else
- proxy_nutzen = False
- End If
- End Sub
- Private Sub Button_login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_login.Click
- RichTextBox_chatlog.Clear()
- Nickname = TextBox_nickname.Text
- Password = TextBox_passwort.Text
- Channel = TextBox_Channel.Text
- set_values()
- write_on_login()
- Dim Knuddels_System As New ChatSystem
- Select Case ComboBox_Chatsystem.Text
- Case "DE"
- Knuddels_System = ChatSystem.DE
- Case "AT"
- Knuddels_System = ChatSystem.AT
- Case "CH"
- Knuddels_System = ChatSystem.CH
- Case "COM"
- Knuddels_System = ChatSystem.COM
- Case "MFC"
- Knuddels_System = ChatSystem.MFC
- End Select
- If proxy_nutzen = False Then
- client.Connect(Knuddels_System)
- Else
- Try
- Dim Proxy As String = TextBox_proxy.Text
- Dim ProxyIP As String = String.Empty
- Dim ProxyPort As String = String.Empty
- ProxyIP = Proxy.Split(":")(0)
- ProxyPort = Proxy.Split(":")(1)
- client.Connect(Knuddels_System, ProxyIP, ProxyPort)
- Catch ex As Exception
- MessageBox.Show("Es ist ein Fehler aufgetreten!")
- End Try
- End If
- client.Login(Nickname, Password, Channel)
- End Sub
- Sub set_values()
- If CheckBox_proxynutzen.Checked = True Then
- proxy_nutzen = True
- Else
- proxy_nutzen = False
- End If
- If CheckBox_Steuernick.Checked = True Then
- Steuernick_verwenden = True
- Steuernick = TextBox_steuernick.Text
- Else
- End If
- If CheckBox_AntiAdmin.Checked = True Then
- Anti_Admin = True
- Else
- End If
- If CheckBox_channelwechseln.Checked = True Then
- Channel_wechseln = True
- Else
- End If
- If CheckBox_jamesspam.Checked = True Then
- James_vollspammen = True
- Else
- End If
- End Sub
- Sub write_on_login()
- write_log("Bot", "Einstellungen:", Color.Red, FontStyle.Bold)
- write_log("Bot", "Steuernick verwenden: " & Steuernick_verwenden, Color.Red, FontStyle.Bold)
- write_log("Bot", "Anti-Admin: " & Anti_Admin, Color.Red, FontStyle.Bold)
- write_log("Bot", "Channel wechseln: " & Channel_wechseln, Color.Red, FontStyle.Bold)
- write_log("Bot", "James vollspammen: " & James_vollspammen, Color.Red, FontStyle.Bold)
- write_log("Bot", "Verbinde zum Chatsystem " & ComboBox_Chatsystem.Text & ".", Color.Green, FontStyle.Bold)
- write_log("Bot", "Versuche einzuloggen...", Color.Green, FontStyle.Bold)
- write_log("Bot", "Logge " & Nickname & " in den Channel " & Channel & " ein. Nutze Proxy: " & proxy_nutzen, Color.Green, FontStyle.Bold)
- End Sub
- Private Sub CheckBox_proxynutzen_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox_proxynutzen.CheckedChanged
- If CheckBox_proxynutzen.Checked = True Then
- proxy_nutzen = True
- TextBox_proxy.Enabled = True
- Else
- proxy_nutzen = False
- TextBox_proxy.Enabled = False
- End If
- End Sub
- Private Sub RichTextBox_chatlog_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox_chatlog.TextChanged
- RichTextBox_chatlog.ScrollToCaret()
- End Sub
- Private Sub Button_logout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_logout.Click
- client.Disconnect()
- End Sub
- End Class
Add Comment
Please, Sign In to add comment