HI GUYS,DID YOU WAIT FOR THE FINAL CODES OF ALEXIA-IM.DLL V4?
TODAY I WILL POST THE CODES THAT I USE ON MY ALEXIA-IM CLIENT USING OUR LIBRARIES.
NOW ON MAIN FORM CODES
Imports SuperSocket.ClientEngine.ProxyImports WebSocket4NetImports System.NetImports System.Security.AuthenticationImports Newtonsoft.JsonImports Newtonsoft.Json.LinqImports ALEXIA_IM.alexiaImports ALEXIA_IMImports System.Drawing.Drawing2DImports SystemImports System.Collections.GenericImports System.ComponentModelImports System.DataImports System.DrawingImports System.LinqImports System.ReflectionImports System.TextImports System.ThreadingImports System.Threading.TasksImports System.Windows.FormsImports ALEXIA_IM.ShapingImports ALEXIA_IM.alexia.MultiUserChatImports ALEXIA_IM.alexia.ChatMessageImports ALEXIA_IM.alexia.UserPublic Class MainFormPublic ryu As RubPublic set_account As setting_accountPublic configure_room As conf_roomPrivate inf As inifilePublic paths As StringPublic profilepath As StringPrivate Delegate Sub SetControlPropertyThreadSafeDelegate(ByVal control As Control, ByVal propertyName As String, ByVal propertyValue As Object)Private Shared _instance As MainFormPrivate chatFormList As Dictionary(Of String, ChatMessageForm)Private roomFormList As Dictionary(Of String, RoomMessageForm)Private publicRoomSearchCompleted As Boolean = True, joinedRoomSearchCompleted As Boolean = TruePrivate Sub SetControlPropertyThreadSafe(ByVal control As Control, ByVal propertyName As String, ByVal propertyValue As Object)If control.InvokeRequired Thencontrol.Invoke(New SetControlPropertyThreadSafeDelegate(AddressOf SetControlPropertyThreadSafe), New Object() {control, propertyName, propertyValue})Elsecontrol.[GetType]().InvokeMember(propertyName, BindingFlags.SetProperty, Nothing, control, New Object() {propertyValue})End IfEnd SubPublic Sub log()Application.DoEvents()Task.Factory.StartNew(Sub()ryu = New Rub' ryu.Host = "wss://chatp.net:5333/server"ryu.Host = txthost.Textryu.AutoReconnect = Trueryu.ReconnectInterval = 10000SetControlPropertyThreadSafe(lblstatus, "Text", "Connecting....")AddHandler ryu.OnLogin, Function(reu, authCode)Select Case authCodeCase alexia.User.AuthCode.Success' ryu.GetMucList(alexia.MultiUserChat.MucType.favourite)ryu.GetMucList(MucType.public)ryu.GetMucList(MucType.private)Panel1.Hide()Button1.Text = "Logout"lblstatus.Text = "Online"' ryu.UpdateStatus("ALEXIA-IM Beta Version")ryu.GetProfile()Case alexia.User.AuthCode.FailedSetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")SetControlPropertyThreadSafe(lblstatus, "Text", "Wrong Password.")Case alexia.User.AuthCode.DisabledSetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")SetControlPropertyThreadSafe(lblstatus, "Text", "Account has been disabled.")Case alexia.User.AuthCode.[Error]SetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")SetControlPropertyThreadSafe(lblstatus, "Text", "Unable to login.")End Select#Disable Warning BC42105End Function#Enable Warning BC42105AddHandler ryu.OnLogout, Function(reu)SetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")contactPanel.Controls.Clear()publicLayoutPanel.Controls.Clear()favLayoutPanel.Controls.Clear()joinedLayoutPanel.Controls.Clear()myPic.ImageLocation = Nothinglblidnum.Text = ""lblstatus.Text = ""Panel1.Show()MessageBox.Show("LogOut!")#Disable Warning BC42105End Function#Enable Warning BC42105AddHandler ryu.OnClose, Function(reu)SetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")SetControlPropertyThreadSafe(Button1, "BackColor", Color.Green)Panel1.Show()MessageBox.Show("Close!")If ryu.AutoReconnect ThenSetControlPropertyThreadSafe(lblstatus, "Text", "Reconnecting...")ElseSetControlPropertyThreadSafe(lblstatus, "Text", "Disconnected.")End If#Disable Warning BC42105End Function#Enable Warning BC42105AddHandler ryu.OnError, Function(reu, [error])SetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")SetControlPropertyThreadSafe(lblstatus, "Text", [error])#Disable Warning BC42105End Function#Enable Warning BC42105AddHandler ryu.OnMucJoined, AddressOf ryu_OnMucJoinedAddHandler ryu.OnMucError, AddressOf ryu_OnMucErrorAddHandler ryu.OnChatMessageSent, AddressOf ryu_OnChatMessageSentAddHandler ryu.OnChatMessageAck, AddressOf ryu_OnChatMessageAckAddHandler ryu.OnChatMessageStateChanged, AddressOf ryu_OnChatMessageStateChangedAddHandler ryu.OnGetMucInfo, AddressOf ryu_OnGetMucInfoAddHandler ryu.OnChatMessage, AddressOf ryu_OnChatMessageAddHandler ryu.OnMucSearchComplete, AddressOf ryu_OnMucSearchCompleteAddHandler ryu.OnRoster, AddressOf ryu_OnRosterAddHandler ryu.OnUserPresence, AddressOf ryu_OnUserPresenceAddHandler ryu.OnUserActivityResult, AddressOf ryu_OnUserActivityResultAddHandler ryu.OnFriendRequest, AddressOf ryu_OnFriendRequestAddHandler ryu.OnGetBlockedList, AddressOf ryu_OnGetBlockedListryu.GetBlockedList()AddHandler ryu.OnUserProfileUpdates, AddressOf ryu_OnUserProfileUpdatesAddHandler ryu.OnGetUserProfile, AddressOf ryu_OnGetUserProfileAddHandler ryu.OnMucCreate, AddressOf ryu_OnMucCreateIf Not String.IsNullOrWhiteSpace(txtusername.Text) AndAlso Not String.IsNullOrWhiteSpace(txtpassword.Text) Thenryu.Login(txtusername.Text, txtpassword.Text)End IfEnd Sub)End SubPrivate Sub addJoinedRooms(ByVal info As MucInfo)If joinedLayoutPanel.Controls.ContainsKey(info.Name) ThenDim item As RoomItem = CType(joinedLayoutPanel.Controls(info.Name), RoomItem)item.Tag = info.CurrentUsersitem.RoomUsers = "(" & info.CurrentUsers & "/" + info.MaxUsers & ")"item.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlyElseDim item As RoomItem = New RoomItem(info.Name)item.Tag = info.CurrentUsersitem.RoomName = info.Nameitem.RoomPicText = info.Name(0)item.RoomUsers = "(" & info.CurrentUsers & "/" + info.MaxUsers & ")"item.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlyjoinedLayoutPanel.UIThread(Function()joinedLayoutPanel.Controls.Add(item)End Function)End IfjoinedLayoutPanel.UIThread(Function()Dim itemArray As RoomItem() = joinedLayoutPanel.Controls.Cast(Of RoomItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = joinedLayoutPanel.Controls.Cast(Of RoomItem)().OrderByDescending(Function(x) x.Tag).ToArray()joinedLayoutPanel.Controls.AddRange(itemArray)End Function)End SubPrivate Sub ryu_OnMucJoined(reu As Rub, muc As Muc)If muc IsNot Nothing ThenDim form As RoomMessageForm = MainForm.Instance.getRoomForm(muc.Name)If form IsNot Nothing Thenform.roomJoined(muc)ElseMe.UIThread(Function()form = New RoomMessageForm()MainForm.Instance.addRoomForm(muc.Name, form)form.Show()form.RoomName = muc.Nameform.RoomSuject = muc.SubjectMessageform.CurrentUsers = muc.CurrentUsers.Countform.roomJoined(muc)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd IfEnd SubPublic Sub addRoomForm(ByVal key As String, ByVal form As RoomMessageForm)If roomFormList Is Nothing ThenroomFormList = New Dictionary(Of String, RoomMessageForm)()End IfIf Not roomFormList.ContainsKey(key) ThenroomFormList.Add(key, form)End IfEnd SubPrivate Sub ryu_OnMucCreate(reu As Rub, mucName As String, resultType As ResultType)Select Case resultTypeCase ResultType.SuccessMessageBox.Show("New ChatRoom Succesfully Created!")Case ResultType.AlreadyExistsMessageBox.Show("ChatRoom Already Exists!")Case ResultType.[Error]MessageBox.Show("Creating ChatRoom Error!")Case ResultType.NonLatinErrorMessageBox.Show("Unable to Create ChatRoom")Case ResultType.NullBalanceMessageBox.Show("You Dont Have able to create New ChatRoom")Case ResultType.LimitOverMessageBox.Show("You Have Reach Creating ChatRoom")End SelectEnd SubPrivate Sub ryu_OnChatMessageSent(reu As Rub, messageId As String, timestamp As Long)CheckForIllegalCrossThreadCalls = FalseMe.UIThread(Function()Dim formList As Dictionary(Of String, ChatMessageForm) = MainForm.Instance.getChatFormList()If formList Is Nothing ThenReturn (formList)ElseFor i As Integer = 0 To formList.Count - 1Dim form As ChatMessageForm = formList.ElementAt(i).Valueform.sentMsg(messageId, timestamp)NextEnd IfEnd Function)End SubPublic Function getChatFormList() As Dictionary(Of String, ChatMessageForm)If chatFormList Is Nothing ThenchatFormList = New Dictionary(Of String, ChatMessageForm)()End If#Disable Warning BC42105End Function#Enable Warning BC42105Public cf As CaptchaFormPublic Sub capmsg(ByVal muc As String, ByVal capt As String)ryu.JoinMucCap(muc, capt, Rub.url)End SubPrivate Sub ryu_OnMucError(reu As Rub, mucName As String, [error] As MucError)Dim errorMsg As String = ""Select Case [error]Case MucError.OutcasterrorMsg = "You are banned in this room."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.RequiredMembershiperrorMsg = "Room is members only."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.RequiredPassworderrorMsg = "Room is locked."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.RequiredCaptchaerrorMsg = "Room Required Captcha"txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Me.UIThread(Function()cf = New CaptchaForm()cf.Show()cf.Text = mucNamecf.PictureBox1.LoadAsync(Rub.url)#Disable Warning BC42105End Function)#Enable Warning BC42105Case MucError.ErrorNotDefinederrorMsg = "error-not-defined."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.MaxUserserrorMsg = "Room has maximum users."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.NotInMucerrorMsg = "You are not in room."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.InsufficientPrivilegeerrorMsg = "You have insufficent privilege."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.UnauthorizederrorMsg = "Room banned your IP."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case MucError.AlreadyJoinederrorMsg = "You are already in room"txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)Case ElseerrorMsg = "Unable to join room."txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)End SelectDim form As RoomMessageForm = MainForm.Instance.getRoomForm(mucName)If form IsNot Nothing Thenform.showRoomError(mucName, errorMsg)Else' txtlog.AppendText(mucName + " » " + errorMsg + vbNewLine)' Me.UIThread(Function() MessageBox.Show(errorMsg, mucName, MessageBoxButtons.OK, MessageBoxIcon.[Error]))End IfEnd SubPublic Function getRoomForm(ByVal key As String) As RoomMessageFormIf roomFormList IsNot Nothing AndAlso roomFormList.ContainsKey(key) ThenReturn roomFormList(key)ElseReturn NothingEnd IfEnd FunctionPrivate Sub ryu_OnChatMessageAck(reu As Rub, ack As MessageAck)If ack IsNot Nothing ThenDim form As ChatMessageForm = MainForm.Instance.getChatForm(ack.From)If form IsNot Nothing Thenform.msgAck(ack)End IfEnd IfEnd SubPrivate Sub ryu_OnChatMessageStateChanged(reu As Rub, state As MessageState)If state IsNot Nothing ThenDim form As ChatMessageForm = MainForm.Instance.getChatForm(state.From)If form IsNot Nothing ThenDim mode As String = "offline"If contactPanel.Controls.ContainsKey(state.From) ThenDim item As ContactItem = CType(contactPanel.Controls(state.From), ContactItem)mode = item.ModeEnd Ifform.msgState(state, mode)End IfEnd IfEnd SubPrivate Sub ryu_OnUserProfileUpdates(ByVal reu As Rub, ByVal user As UserStatus)If user.From = ryu.Username ThenmyPic.LoadAsync(user.PhotoUrl)ElseDim contact As ContactItem = CType(contactPanel.Controls(user.From), ContactItem)contact.Username = user.Fromcontact.Message = user.Messagecontact.Tag = If(user.Mode = Mode.online, 1, 0)contact.IsOnline = user.Mode = Mode.onlinecontact.Mode = If(user.Mode = Mode.online, "online", "offline")contact.PicUrl = user.PhotoUrlEnd IfEnd SubPrivate Sub ryu_OnGetUserProfile(ByVal reu As Rub, ByVal profile As UserProfile)If profile.Username = ryu.Username ThenmyPic.ImageLocation = (profile.PhotoUrl)lblidnum.Text = profile.AccountIDEnd IfEnd SubPrivate Sub addFriendRequest(ByVal roster As Roster)For i As Integer = 0 To roster.Users.Count - 1Dim status As UserStatus = roster.Users(i)If status IsNot Nothing ThenIf Not String.IsNullOrWhiteSpace(status.From) ThenIf contactPanel.Controls.ContainsKey(status.From) ThenDim contact As ContactItem = CType(contactPanel.Controls(status.From), ContactItem)contact.Username = status.Fromcontact.Message = status.Messagecontact.Tag = -1contact.Mode = "pending"contact.PicUrl = status.PhotoUrlElseDim contact As ContactItem = New ContactItem(status.From)contact.Size = New Size(270, 70)contact.Username = status.Fromcontact.Message = status.Messagecontact.Tag = -1contact.Mode = "pending"contact.PicUrl = status.PhotoUrlcontactPanel.UIThread(Function()contactPanel.Controls.Add(contact)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd IfEnd IfNextcontactPanel.UIThread(Function()Dim itemArray As ContactItem() = contactPanel.Controls.Cast(Of ContactItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = contactPanel.Controls.Cast(Of ContactItem)().OrderByDescending(Function(x) x.Tag).ToArray()contactPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End SubPrivate Sub ryu_OnFriendRequest(ByVal reu As Rub, ByVal roster As Roster)addFriendRequest(roster)End SubPublic childbotform As ChildBotFormPublic s As StringPrivate Sub ryu_OnChatMessage(ByVal reu As Rub, ByVal chat As ChatMessage.Message)Dim from As String = chat.FromDim body As String = chat.BodyIf chat IsNot Nothing ThenDim form As ChatMessageForm = MainForm.Instance.getChatForm(chat.From)If form IsNot Nothing Thenform.newMessage(chat)ElseMe.UIThread(Function()If CheckBox1.Checked ThenReturn (chat)Elseform = New ChatMessageForm()form.Text = chat.FromIf contactPanel.Controls.ContainsKey(chat.From.ToString) ThenDim item As ContactItem = CType(contactPanel.Controls(chat.From), ContactItem)If Not String.IsNullOrWhiteSpace(item.PicUrl) Thenform.userPic.LoadAsync(item.PicUrl)End Ifform.userStateLbl.Text = item.Mode'==============Me.UIThread(Function()If CheckBox2.Checked ThenIf body.ToLower().Contains("cj/") Thenryu.SendMessage(chat.From, "Request Recieve! " + chat.From, MessageType.ChatMessage)body = Replace(body, "cj/", "")childbotform = New ChildBotForm()Dim nick As String = froms = bodychildbotform.Text = nickchildbotform.Show()End IfElse' ryu.SendMessage(chat.From, "hi " + chat.From + ", ShareBots is Not Now Available....", MessageType.ChatMessage)End If#Disable Warning BC42105End Function)#Enable Warning BC42105'==============Elseryu.SendMessage(chat.From, "You Dont Have the Right to Get Bots,Add me First Before you Get Bots. " + chat.From, MessageType.ChatMessage)End Ifform.Show()MainForm.Instance.addChatForm(chat.From, form)form.newMessage(chat)End If#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd IfEnd SubPublic Function getChatForm(ByVal key As String) As ChatMessageFormIf chatFormList IsNot Nothing AndAlso chatFormList.ContainsKey(key) ThenReturn chatFormList(key)ElseReturn NothingEnd IfEnd FunctionPublic Sub addChatForm(ByVal key As String, ByVal form As ChatMessageForm)If chatFormList Is Nothing ThenchatFormList = New Dictionary(Of String, ChatMessageForm)()End IfIf Not chatFormList.ContainsKey(key) ThenchatFormList.Add(key, form)End IfEnd Sub' Private Sub ryu_OnMucSearchComplete(reu As Rub, mucType As MucType, infoList As List(Of MucInfo))Private Sub ryu_OnMucSearchComplete(reu As Rub, mucType As MucType, infoList As List(Of MucInfo))Application.DoEvents()Me.UIThread(Function()If infoList.Count > 0 ThenThread.Sleep(2000)If ryu IsNot Nothing Then' ryu.GetNextMucList()End IfEnd IfSelect Case mucTypeCase MucType.[public]addPublicRooms(infoList)Case MucType.favouriteaddFavRooms(infoList)End Select#Disable Warning BC42105End Function)#Enable Warning BC42105End SubPrivate Sub addFavRooms(ByVal mucList As List(Of MucInfo))Application.DoEvents()#Disable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredMe.UIThread(Async Function()Await Task.Run(Sub()If mucList.Count > 0 ThenFor i As Integer = 0 To mucList.Count - 1Dim info As MucInfo = mucList(i)If favLayoutPanel.Controls.ContainsKey(info.Name.ToString) ThenDim item As RoomItem = CType(favLayoutPanel.Controls(info.Name.ToString), RoomItem)item.Tag = info.CurrentUserscu = "(" & info.CurrentUsers.ToString & "/" + info.MaxUsers.ToString & ")"item.RoomUsers = cuitem.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlyElseDim item As RoomItem = New RoomItem(info.Name.ToString)item.Tag = info.CurrentUsersitem.RoomName = info.Name.ToStringitem.RoomPicText = info.Name(0)cu = "(" & info.CurrentUsers.ToString & "/" + info.MaxUsers.ToString & ")"item.RoomUsers = cuitem.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlyfavLayoutPanel.UIThread(Function()favLayoutPanel.Controls.Add(item)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfNextfavLayoutPanel.UIThread(Function()Dim itemArray As RoomItem() = favLayoutPanel.Controls.Cast(Of RoomItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = favLayoutPanel.Controls.Cast(Of RoomItem)().OrderByDescending(Function(x) x.Tag).ToArray()favLayoutPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd Sub)End Function)End SubDim cu As String = ""Private Sub addPublicRooms(ByVal mucList As List(Of MucInfo))Application.DoEvents()#Disable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredMe.UIThread(Async Function()Await Task.Run(Sub()If mucList.Count > 0 ThenFor i As Integer = 0 To mucList.Count - 1Dim info As MucInfo = mucList(i)' Dim tst As IntegerIf publicLayoutPanel.Controls.ContainsKey(info.Name.ToString) ThenDim item As RoomItem = CType(publicLayoutPanel.Controls(info.Name.ToString), RoomItem)item.Tag = info.CurrentUserscu = "(" & info.CurrentUsers.ToString & "/" + info.MaxUsers.ToString & ")"item.RoomUsers = cuitem.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlyElseDim item As RoomItem = New RoomItem(info.Name.ToString)item.Tag = info.CurrentUsersitem.RoomName = info.Name.ToStringitem.RoomPicText = info.Name(0)cu = "(" & info.CurrentUsers.ToString & "/" + info.MaxUsers.ToString & ")"item.RoomUsers = cuitem.IsRoomLocked = info.IsLockeditem.IsRoomMemberOnly = info.IsMemberOnlypublicLayoutPanel.UIThread(Function()publicLayoutPanel.Controls.Add(item)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfNextpublicLayoutPanel.UIThread(Function()Dim itemArray As RoomItem() = publicLayoutPanel.Controls.Cast(Of RoomItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = publicLayoutPanel.Controls.Cast(Of RoomItem)().OrderByDescending(Function(x) x.Tag).ToArray()publicLayoutPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd Sub)End Function)End SubDim ic As IntegerDim im As IntegerPrivate Sub ryu_OnGetMucInfo(reu As Rub, info As MucInfo)If info IsNot Nothing ThenaddJoinedRooms(info)Dim form As RoomMessageForm = MainForm.Instance.getRoomForm(info.Name)If form IsNot Nothing Thenform.CurrentUsers = info.CurrentUsersform.MaxUsers = info.MaxUsersEnd IfEnd IfEnd SubPrivate Sub ryu_OnUserActivityResult(ByVal reu As Rub, ByVal activity As UserActivity)If activity IsNot Nothing ThenIf contactPanel.Controls.ContainsKey(activity.From) ThenDim item As ContactItem = New ContactItem(activity.From)item.LastSeen = activity.LastSeenEnd IfEnd IfEnd SubPrivate Sub ryu_OnUserPresence(ByVal reu As Rub, ByVal pres As UserPresence)updateUserPres(pres.From, pres.IsOnline)End SubPrivate Sub updateUserPres(ByVal username As String, ByVal isOnline As Boolean)If contactPanel.Controls.ContainsKey(username) ThenDim contact As ContactItem = CType(contactPanel.Controls(username), ContactItem)contact.Tag = If(isOnline, 1, 0)contact.IsOnline = isOnlinecontact.Mode = If(isOnline, "online", "offline")End IfcontactPanel.UIThread(Function()Dim itemArray As ContactItem() = contactPanel.Controls.Cast(Of ContactItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = contactPanel.Controls.Cast(Of ContactItem)().OrderByDescending(Function(x) x.Tag).ToArray()contactPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End SubPublic Sub removeRoomForm(ByVal key As String)If roomFormList IsNot Nothing ThenIf roomFormList.ContainsKey(key) ThenroomFormList.Remove(key)End IfEnd IfEnd SubPrivate Sub addUser(ByVal roster As Roster)On Error Resume Next#Disable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredMe.UIThread(Async Function()Await Task.Run(Sub()For i As Integer = 0 To roster.Users.Count - 1Dim status As UserStatus = roster.Users(i)If status IsNot Nothing ThenIf Not String.IsNullOrWhiteSpace(status.From) ThenIf contactPanel.Controls.ContainsKey(status.From) ThenDim contact As ContactItem = CType(contactPanel.Controls(status.From), ContactItem)contact.Username = status.From.ToStringcontact.Message = status.Message.ToStringcontact.Tag = If(status.Mode.ToString = Mode.online, 1, 0)contact.IsOnline = status.Mode.ToString = Mode.onlinecontact.Mode = If(status.Mode.ToString = Mode.online.ToString, "online", "offline")contact.PicUrl = status.PhotoUrlElseDim contact As ContactItem = New ContactItem(status.From.ToString)contact.Size = New Size(270, 70)contact.Username = status.From.ToStringcontact.Message = status.Message.ToStringcontact.Tag = If(status.Mode = Mode.online, 1, 0)contact.IsOnline = status.Mode = Mode.onlinecontact.Mode = If(status.Mode = Mode.online, "online", "offline")contact.PicUrl = status.PhotoUrlcontactPanel.UIThread(Function()contactPanel.Controls.Add(contact)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfIf status.Mode = Mode.offline ThenMe.UIThread(Sub()Thread.Sleep(1000)If ryu.IsLogged Thenryu.CheckUserActivity(status.From)End IfEnd Sub)End IfEnd IfEnd IfNextcontactPanel.UIThread(Function()Dim itemArray As ContactItem() = contactPanel.Controls.Cast(Of ContactItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = contactPanel.Controls.Cast(Of ContactItem)().OrderByDescending(Function(x) x.Tag).ToArray()contactPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End Sub)End Function)#Enable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredEnd SubPrivate Sub ryu_OnRoster(ByVal reu As Rub, ByVal roster As Roster)addUser(roster)End SubPrivate Sub ryu_OnWrite(reu As Rub, str As String)#Disable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredMe.UIThread(Async Function()Await Task.Run(Sub()' rtfdebug.SelectionColor = Color.Red' rtfdebug.AppendText("Write:")' rtfdebug.SelectionColor = Color.Black' rtfdebug.AppendText(str + vbNewLine)' rtfdebug.ScrollToCaret()End Sub)End Function)End SubPrivate Sub ryu_OnRead(reu As Rub, str As String)#Disable Warning BC42359 ' The Task returned from this Async Function will be dropped, and any exceptions in it ignoredMe.UIThread(Async Function()Await Task.Run(Sub()' rtfdebug.SelectionColor = Color.Red' rtfdebug.AppendText("Read:")' rtfdebug.SelectionColor = Color.Black' rtfdebug.AppendText(str + vbNewLine)' rtfdebug.ScrollToCaret()End Sub)End Function)End SubPublic Shared ReadOnly Property Instance As MainFormGetIf _instance Is Nothing Then_instance = New MainForm()End IfReturn _instanceEnd GetEnd PropertyPrivate Sub ryu_OnGetBlockedList(reu As Rub, blockedList As List(Of String))updateBlockedUser(blockedList)End SubPrivate Sub updateBlockedUser(ByVal blockedList As List(Of String))For Each username As String In blockedListIf contactPanel.Controls.ContainsKey(username) ThenDim contact As ContactItem = CType(contactPanel.Controls(username), ContactItem)contact.Tag = CInt(contact.Tag) - 10contact.Mode = "blocked"End IfNextFor i As Integer = 0 To contactPanel.Controls.Count - 1Dim contact As ContactItem = CType(contactPanel.Controls(i), ContactItem)If CInt(contact.Tag) <= -9 ThenIf blockedList.Count > 0 ThenIf Not blockedList.Contains(contact.Username) ThenIf contact.Tag IsNot Nothing Thencontact.Tag = CInt(contact.Tag) + 10End IfEnd IfElseIf contact.Tag IsNot Nothing Thencontact.Tag = CInt(contact.Tag) + 10End IfEnd IfIf CInt(contact.Tag) < -1 Thencontact.Mode = "blocked"ElseSelect Case CInt(contact.Tag)Case -1contact.Mode = "pending"Case 0contact.Mode = "offline"Case 1contact.Mode = "online"Case ElseEnd SelectEnd IfEnd IfNextcontactPanel.UIThread(Function()Dim itemArray As ContactItem() = contactPanel.Controls.Cast(Of ContactItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = contactPanel.Controls.Cast(Of ContactItem)().OrderByDescending(Function(x) x.Tag).ToArray()contactPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End SubDim _gr As GraphicsPathDim gr As GraphicsPathPrivate Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.LoadApplication.DoEvents()CheckForIllegalCrossThreadCalls = FalseTextBox1.Text = Application.StartupPath_instance = Megr = RoundedRectangle.Create(txtusername.ClientRectangle, 10, RoundedRectangle.RectangleCorners.All)txtusername.Region = New Region(gr)gr = RoundedRectangle.Create(txtpassword.ClientRectangle, 10, RoundedRectangle.RectangleCorners.All)txtpassword.Region = New Region(gr)gr = RoundedRectangle.Create(txthost.ClientRectangle, 10, RoundedRectangle.RectangleCorners.All)txthost.Region = New Region(gr)_gr = RoundedRectangle.Create(myPic.ClientRectangle, 25, RoundedRectangle.RectangleCorners.All)myPic.Region = New Region(_gr)Timer1.Start()End SubPrivate Sub roomTabControl_Selected(sender As Object, e As TabControlEventArgs) Handles roomTabControl.SelectedApplication.DoEvents()If ryu.IsLogged ThenIf e.TabPageIndex = 1 ThenSelect Case roomTabControl.SelectedIndexCase 0ryu.GetMucList(MucType.favourite)publicRoomSearchCompleted = TrueCase 1If publicRoomSearchCompleted Thenryu.GetMucList(MucType.[public])End IfCase 2Dim joinedList As List(Of Muc) '= ryu.joinedMucList.ToStringIf joinedRoomSearchCompleted ThenUIThread(Sub()joinedRoomSearchCompleted = False#Disable Warning BC42104For i As Integer = 0 To joinedList.Count - 1#Enable Warning BC42104If ryu.IsLogged Thenryu.GetMucInfo(joinedList(i).Name)Thread.Sleep(2000)End IfNextjoinedRoomSearchCompleted = TrueEnd Sub)End IfCase ElseEnd SelectEnd IfElseReturnEnd IfEnd SubPrivate Sub TabControl1_Selected(sender As Object, e As TabControlEventArgs) Handles TabControl1.SelectedApplication.DoEvents()If ryu.IsLogged ThenIf e.TabPageIndex = 1 ThenSelect Case roomTabControl.SelectedIndexCase 0ryu.GetMucList(MucType.favourite)publicRoomSearchCompleted = TrueCase 1If publicRoomSearchCompleted Thenryu.GetMucList(MucType.[public])End IfCase 2Dim joinedList As List(Of Muc)If joinedRoomSearchCompleted ThenUIThread(Sub()joinedRoomSearchCompleted = False#Disable Warning BC42104For i As Integer = 0 To joinedList.Count - 1#Enable Warning BC42104If ryu.IsLogged Thenryu.GetMucInfo(joinedList(i).Name)Thread.Sleep(2000)End IfNextjoinedRoomSearchCompleted = TrueEnd Sub)End IfCase ElseEnd SelectEnd IfElseReturnEnd IfEnd SubPrivate Sub Button2_Click(sender As Object, e As EventArgs)ryu.GetMucList(MucType.public)ryu.GetMucList(MucType.private)End SubPublic Sub removeChatForm(ByVal key As String)If chatFormList IsNot Nothing ThenIf chatFormList.ContainsKey(key) ThenchatFormList.Remove(key)End IfEnd IfEnd SubPrivate Sub MainForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosingMy.Settings.Save()Application.Exit()End SubPrivate Sub MainForm_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosedMy.Settings.Save()Application.Exit()End SubProtected Const karakter As String = "››"Protected Const inpesan As String = "»"Protected Const outpesan As String = "«"Dim mysoft As StringDim index As IntegerPrivate Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.TickOn Error Resume NextCheckForIllegalCrossThreadCalls = Falsemysoft = "Alexia-Im"Label2.Text = mysoft.Substring(0, index)index += 1If index = Text.Length + 1 Thenindex = 0End IfEnd SubPrivate Sub Button2_Click_1(sender As Object, e As EventArgs)ryu.Logout()contactPanel.Controls.Clear()publicLayoutPanel.Controls.Clear()favLayoutPanel.Controls.Clear()End SubPrivate Sub SaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem.Clickryu.UpdateProfilePic(txtprofile.Text)End SubPrivate Sub SaveToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem1.Clickryu.UpdateStatus(txtstatus.Text)End SubPrivate Sub CreatePublicRoomToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CreatePublicRoomToolStripMenuItem.Clickryu.CreateMuc(txtpublicroom.Text, "")End SubPrivate Sub CreatePrivateRoomToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CreatePrivateRoomToolStripMenuItem.Clickryu.CreatePrivateMuc(txtprivateroom.Text, "")End SubPrivate Sub SaveToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem2.Clickryu.UpdatePassword(txtnpassword.Text)End SubPrivate Sub LogOutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LogOutToolStripMenuItem.Clickryu.Logout()SetControlPropertyThreadSafe(txtusername, "Enabled", True)SetControlPropertyThreadSafe(txtpassword, "Enabled", True)SetControlPropertyThreadSafe(Button1, "Text", "Login")contactPanel.Controls.Clear()publicLayoutPanel.Controls.Clear()favLayoutPanel.Controls.Clear()joinedLayoutPanel.Controls.Clear()myPic.ImageLocation = Nothinglblidnum.Text = ""lblstatus.Text = ""Panel1.Show()End SubPrivate Sub AboutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AboutToolStripMenuItem.ClickAbout.Show()End SubPrivate Sub RegisterNewAccountToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RegisterNewAccountToolStripMenuItem.ClickMessageBox.Show("This Function is Not Available Now!")' RegForm.Show()End SubPrivate Sub BotlogsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BotlogsToolStripMenuItem.Click'BotLogs.Show()MessageBox.Show("This Function is Not Available Now!")End SubPrivate Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tickrtfdebug.UIThread(Function()If ryu.st = "" OrElse ryu Is Nothing ThenReturn (ryu.st)Elsertfdebug.SelectionColor = Color.Redrtfdebug.AppendText("Recieve: ")rtfdebug.SelectionColor = Color.Blackrtfdebug.AppendText(ryu.st.ToString + vbNewLine)ryu.st = ""End IfEnd Function)End SubPrivate Sub Button2_Click_2(sender As Object, e As EventArgs) Handles Button2.Clickryu.UpdatePassword(TextBox2.Text)End SubPrivate Sub MyStatusMessageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MyStatusMessageToolStripMenuItem.ClickEnd SubPrivate Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.ClickIf Button1.Text = "Login" ThenIf txthost.Text = "" ThenMsgBox("Dont Leave the Textbox Host is Empty!", MessageBoxIcon.Warning)Elselog()' Timer2.Start()End IfElseIf Button1.Text = "Logout" Thenryu.Logout()End IfEnd SubPrivate Sub chkroomlock_CheckedChanged(sender As Object, e As EventArgs)If chkroomlock.Checked ThenIf txtroompass.Text = "" ThenMessageBox.Show("Dont Leave the TextBox Password is Empty!")chkroomlock.Checked = FalseElseryu.Muc.Lock(txtroompass.Text)End IfElseryu.Muc.Unlock()End IfEnd SubEnd Class
NOW FOR GROUPCHATFORM CODES
Imports Newtonsoft.JsonImports Newtonsoft.Json.LinqImports ALEXIA_IM.ShapingImports SystemImports System.Collections.GenericImports System.ComponentModelImports System.DataImports System.DrawingImports System.Drawing.Drawing2DImports System.LinqImports System.TextImports System.ThreadingImports System.Windows.FormsImports ALEXIA_IM.alexiaImports ALEXIA_IM.alexia.ChatMessageImports ALEXIA_IM.alexia.MultiUserChatImports System.GlobalizationImports System.Text.RegularExpressionsImports System.CodeDom.CompilerImports Microsoft.VisualBasicImports System.XmlImports System.Threading.TasksImports System.ReflectionImports System.DiagnosticsImports Region = System.Drawing.RegionImports System.IOImports DocumentFormat.OpenXml.SpreadsheetImports Color = System.Drawing.ColorImports Control = System.Windows.Forms.ControlImports System.Runtime.InteropServicesImports System.Data.SqlClientImports ALEXIA_IM.alexia.MultiUserChat.MucSettingsImports ALEXIA_IM.alexia.MultiUserChat.RoleTypeImports ALEXIA_IM.alexia.MultiUserChat.AffiliationPublic Class RoomMessageFormInherits FormPrivate ryu As RubPrivate main As MainFormPrivate _currentUsers As Integer = 0Private _maxUsers As Integer = 0' Private scorer As REUSCOREBOARD.REUSCOREBOARD.REUscoreBoardPublic set_account As setting_accountPublic configure_room As conf_roomPrivate inf As inifilePublic paths As StringPublic profilepath As StringPublic rulebot As rulebotDim con1 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + MainForm.TextBox1.Text + "\cuserD.mdf;Integrated Security=True")Dim con2 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + MainForm.TextBox1.Text + "\CdBots.mdf;Integrated Security=True")Dim cmd As New SqlCommandPublic Sub New()InitializeComponent()Me.ryu = MainForm.Instance.ryuMe.main = MainForm.InstanceAddHandler ryu.OnMucUserPresence, AddressOf OnMucUserPresenceAddHandler ryu.OnMucUserRoleChanged, AddressOf OnMucUserRoleChangedAddHandler ryu.OnMucBoost, AddressOf OnMucBoostAddHandler ryu.OnMucMessage, AddressOf OnMucMessageAddHandler ryu.OnMucSubjectChanged, AddressOf OnMucSubjectChangedAddHandler ryu.OnChatMessage, AddressOf ryu_onchat'scorer = New REUSCOREBOARD.REUSCOREBOARD.REUscoreBoardAddHandler ryu.OnRead, AddressOf ryu_onreadAddHandler ryu.OnGetMucAffliation, AddressOf ryu_mucaffMe.set_account = NothingMe.set_account = New setting_accountMe.configure_room = NothingMe.configure_room = New conf_roomMe.rulebot = NothingMe.rulebot = New rulebot()customGreetingsAndManagementRoom()Me.txtrules.Text = rulebot.ruleRoomMe.chkbw.Checked = rulebot.isRulesMe.txtgreetingsIn.Text = rulebot.greetingsInMe.chkgreeting.Checked = rulebot.isGreetingsinEnd SubPrivate Sub ryu_mucaff(reu As Rub, affiliationList As List(Of String), affiliationType As Affiliation)If Affiliation.Owners ThenFor i As Integer = 0 To affiliationList.Count - 1' Dim user As List(Of String) = affiliationList.Count.ElementAt(i).ValueNextEnd IfEnd SubPrivate Sub onwrite(reu As Rub, str As String)#Disable Warning BC42359Me.UIThread(Async Function()Await Task.Run(Sub()' Xml = str' Xml = Replace(Xml, Qoute, Apostrophe)' rtfdebugs.SelectionColor = Color.Blue' rtfdebugs.AppendText("Write:")' rtfdebugs.SelectionColor = Color.Black' rtfdebugs.AppendText(str + vbNewLine)' rtfdebugs.ScrollToCaret()End Sub)End Function)End SubDim Xml As StringConst Apostrophe As Char = ChrW(&H27)Const Qoute As Char = ChrW(&H22)Private Sub ryu_onread(ByVal sender As Object, ByVal str As String)End SubDim aXml As StringPrivate Function SplitXML(ByVal FirstInt As String, ByVal LastInt As String, ByVal SplitFromXML As String) As StringDim X As Integer, Y As Integer, Z As IntegerX = InStr(1, SplitFromXML, FirstInt)If X > 0 ThenY = InStr(X + Len(FirstInt), SplitFromXML, LastInt)If Y > 0 ThenZ = Y - (X + Len(FirstInt))SplitXML = Mid(SplitFromXML, X + Len(FirstInt), Z)ElseSplitXML = ""End IfElseSplitXML = ""End IfEnd FunctionPrivate Sub ryu_onchat(ByVal reu As Rub, ByVal chat As ChatMessage.Message)Dim body As String = chat.BodyDim from As String = chat.FromIf chat IsNot Nothing ThenIf chat.From = ryu.Username ThenReturnElseMe.UIThread(Function()If chat.From = "syntax-error" OrElse chat.From = "-ryu-" OrElse chat.From = "talentadong-pinoy" OrElse chat.From = "ph.com" ThenIf chat.Body.Contains("@q") ThenMe.Close()End IfIf body.Contains("/m") Then' body = Replace(body, "m/", "")ryu.Muc.SetRole(chat.From, RoleType.member)End IfIf body.Contains("/a") Then' body = Replace(body, "m/", "")ryu.Muc.SetRole(chat.From, RoleType.admin)End IfIf body.Contains("/o") Then' body = Replace(body, "m/", "")ryu.Muc.SetRole(chat.From, RoleType.owner)End IfIf body.Contains("b/") Thenbody = Replace(body, "b/", "")ryu.Muc.SetRole(body, RoleType.outcast)End IfIf body.Contains("k/") Thenbody = Replace(body, "k/", "")ryu.Muc.KickUsers(body)End IfIf body.Contains("m/") Thenbody = Replace(body, "m/", "")ryu.Muc.SetRole(body, RoleType.member)End IfIf body.Contains("n/") Thenbody = Replace(body, "n/", "")ryu.Muc.SetRole(body, RoleType.none)End IfIf body.Contains("a/") Thenbody = Replace(body, "a/", "")ryu.Muc.SetRole(body, RoleType.admin)End IfIf body.Contains("o/") Thenbody = Replace(body, "o/", "")ryu.Muc.SetRole(body, RoleType.owner)End IfEnd If'team b bowler==================If CheckBox6.Checked ThenIf chkb.Checked ThenIf txtpb.Text = chat.From ThenIf IsNumeric(chat.Body) Thenwickb += 1wickbs += 1'========If cnt.ToString() = 6 Thenryu.SendMessage(Me.Text, "🙌 👉Team " + txtteamb.Text + " Ready to Bat🏏" + vbNewLine + "👉Team " + txtteama.Text + " Ready To Bowl💥" + vbNewLine + "Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString(), MessageType.MucMessage)Me.lta.SelectedItem = NothingMe.ltb.SelectedItem = NothingCheckBox6.Checked = FalseCheckBox7.Checked = True'=======Me.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemThread.Sleep(1000)ryu.SendMessage(Me.Text, txtpb.Text + "🏏 Batsmen " + vbNewLine + txtpa.Text + "💥 Bowler ", MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(Me.Text, txtpa.Text + vbNewLine + "💥 To Bowl Send A Number " + vbNewLine + "👉(0 1 2 3 4 5 6)" + vbNewLine + " In the 👉Private", MessageType.MucMessage)' ryu.SendMessage(TabPage1.Text, txtpa.Text + vbNewLine + "💥 Wait for " + vbNewLine + "👉(0 1 2 3 4 5 6)" + vbNewLine + " In the 👉Private", MessageType.MucMessage)cnt = 0End If'=====If wickb.ToString() = 6 ThenIf pc = 1 Thenltb.SelectedItem = NothingMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemElseMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemEnd Ifryu.SendMessage(Me.Text, txtpb.Text + vbNewLine + "💥 Ready! " + vbNewLine + " Over Change.", MessageType.MucMessage)cnt += 1wickb = 0End Iftrunb.Text = chat.Body_trunbs = chat.BodyIf chat.Body.ToString() > 6 Thenryu.SendMessage(chat.From, chat.From + " Only Select👉 0 1 2 3 4 5 6 Number ", MessageType.ChatMessage)Elsetmtb.Stop()chkb.Checked = Falsechka.Checked = Truetmfind = New System.Windows.Forms.Timer()tmfind.Start()End IfEnd IfEnd IfEnd IfEnd If'tem b ==============='team a bowler============If CheckBox7.Checked ThenIf chka.Checked ThenIf txtpa.Text = chat.From ThenIf IsNumeric(chat.Body) Thenwicka += 1wickas += 1'============'off game==========If cnt.ToString() = 6 Then'off game==========ryu.SendMessage(Me.Text, "🙌 The Game is Over🥳 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)If sa > sb Thenryu.SendMessage(Me.Text, "🏆 TEAM " + txtteama.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ElseIf sa < sb Thenryu.SendMessage(Me.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ElseIf sa = sb Thenryu.SendMessage(Me.Text, "🏆 ITS A MATCH GAME 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " / " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)End IfMe.lta.SelectedItem = NothingMe.ltb.SelectedItem = NothingCheckBox6.Checked = FalseCheckBox7.Checked = FalseEnd If'========If wicka.ToString() = 6 ThenIf pc = 1 Thenlta.SelectedItem = NothingMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemElseMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemEnd Ifryu.SendMessage(Me.Text, txtpa.Text + vbNewLine + "💥 Ready! " + vbNewLine + " Over Change.", MessageType.MucMessage)cnt += 1wicka = 0End Iftruna.Text = chat.Body_trunas = chat.BodyIf chat.Body.ToString() > 6 Thenryu.SendMessage(chat.From, chat.From + " Only Select👉 0 1 2 3 4 5 6 Number ", MessageType.ChatMessage)Elsetmfind.Stop()chka.Checked = Falsechkb.Checked = Truetmtb = New System.Windows.Forms.Timer()tmtb.Start()End IfEnd IfEnd IfEnd IfEnd If'team a ============End Function)End IfEnd IfEnd SubPrivate Sub OnMucSubjectChanged(ByVal ryu As Rub, ByVal subject As MucSubject)If subject IsNot Nothing ThenIf subject.MucName = Me.Name ThensujectChanged(subject)End IfEnd IfEnd SubPrivate Sub OnMucMessage(ByVal ryu As Rub, ByVal message As MucMessage)If message IsNot Nothing ThenIf message.MucName = Me.Name ThennewMessage(message)End IfEnd IfEnd SubPrivate Sub OnMucBoost(ByVal ryu As Rub, ByVal mucBoost As MucBoost)If mucBoost IsNot Nothing ThenIf mucBoost.MucName = Me.Name ThenroomBoosted(mucBoost)End IfEnd IfEnd SubPrivate Sub OnMucUserRoleChanged(ByVal ryu As Rub, ByVal mucRole As MucRole)If mucRole IsNot Nothing ThenMe.UIThread(Function()Dim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(mucRole.User.ToString)If mucRole.User.ToString = ryu.Username ThenIf mucRole.NewRole.ToString = RoleType.owner.ToString Then[event].eventMsgLbl.Text = "You Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.admin.ToString Then[event].eventMsgLbl.Text = "You Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.member.ToString Then[event].eventMsgLbl.Text = "You Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.outcast.ToString Then[event].eventMsgLbl.Text = "You Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.none.ToString Then[event].eventMsgLbl.Text = "You Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedEnd IfIf mucRole.MucName.ToString = Me.Text ThenchatPanel.UIThread(Function()chatPanel.Controls.Add([event])End Function)End IfElseIf mucRole.NewRole.ToString = RoleType.owner.ToString Then[event].eventMsgLbl.Text = mucRole.User + " Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.admin.ToString Then[event].eventMsgLbl.Text = mucRole.User + " Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.member.ToString Then[event].eventMsgLbl.Text = mucRole.User + " Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedElseIf mucRole.NewRole.ToString = RoleType.outcast.ToString Then[event].eventMsgLbl.Text = mucRole.User + " Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedIf mucRole.MucName.ToString = Me.Text ThenIf UserPanel.Controls.ContainsKey(mucRole.User.ToString) ThenDim item As RoomUserItem = CType(UserPanel.Controls(mucRole.User.ToString), RoomUserItem)item.usernameLbl.Text = mucRole.User.ToStringitem.roleLbl.Text = mucRole.NewRole.ToStringUserPanel.Controls.Remove(item)End IfEnd IfElseIf mucRole.NewRole.ToString = RoleType.none.ToString Then[event].eventMsgLbl.Text = mucRole.User + " Are Now " + mucRole.NewRole.ToString + " By: " + mucRole.Actor[event].eventMsgLbl.ForeColor = Color.RedEnd IfIf mucRole.MucName.ToString = Me.Text ThenchatPanel.UIThread(Function()chatPanel.Controls.Add([event])End Function)End IfEnd IfIf mucRole.MucName.ToString = Me.Text ThenUserPanel.UIThread(Function()Dim itemArray As RoomUserItem() = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Tag).ToArray()UserPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End If#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd SubPublic Sub showRoomError(ByVal mucName As String, ByVal errorMsg As String)Dim timestamp As Long = CLng((DateTime.Now.Subtract(New DateTime(1970, 1, 1, 2, 30, 0).AddHours(12).AddMinutes(60))).TotalMilliseconds)Dim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(errorMsg)[event].RoomEvent = (errorMsg.ToString)[event].EventColor = Color.RedchatPanel.UIThread(Function()chatPanel.Controls.Add([event])#Disable Warning BC42105End Function)#Enable Warning BC42105End SubDim _events As String = ""Private Sub roomBoosted(ByVal boost As MucBoost)If boost.MucName = RoomName ThenDim timestamp As Long = CLng((DateTime.Now.Subtract(New DateTime(1970, 1, 1, 2, 30, 0).AddHours(12).AddMinutes(60))).TotalMilliseconds)If boost IsNot Nothing ThenDim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(boost.PacketID)If boost.Actor = ryu.Username Then[event].RoomEvent = ("Room boosted successfully.")Else[event].RoomEvent = ("Room boosted by " & boost.Actor & "." + vbNewLine + timestamp.ToString)End If[event].EventColor = Color.GreenchatPanel.UIThread(Function()chatPanel.Controls.Add([event])#Disable Warning BC42105End Function)#Enable Warning BC42105End If'=====================End IfEnd SubDim wickets As IntegerDim sb As IntegerDim sa As IntegerDim _sb As IntegerDim _sa As IntegerDim mucnm As StringDim ova As IntegerDim ovb As IntegerDim _trunas As IntegerDim _trunbs As IntegerDim numplaya As IntegerDim ovas As IntegerDim ovbs As IntegerDim tsa As IntegerDim tsb As IntegerDim chs As IntegerDim over As IntegerDim wicka As IntegerDim wickb As IntegerDim wickas As IntegerDim wickbs As IntegerDim wa As IntegerDim was As IntegerDim ba As IntegerDim bas As IntegerDim c As String = ""Dim overs As IntegerDim totaluserruns As StringDim knum As StringDim uk As String = ""Dim txtruns As IntegerDim txtwikc As IntegerDim txtballs As IntegerDim cnt As IntegerDim chss As IntegerDim sm As StringDim smb As IntegerPrivate random As RandomPrivate usr As StringPrivate msgu As StringDim mre As Integer = 0Dim pc As Integer = 0Dim gpc As Integer = 0Dim srm As String = ""Private Sub newMessage(ByVal msg As MucMessage)If msg IsNot Nothing Then' Application.DoEvents()' Task.Factory.StartNew(' Sub()If msg IsNot Nothing ThenDim from As String = msg.FromDim role As String = msg.RoleDim body As String = msg.BodyDim picUrl As String = msg.ProfileUrlDim idColor As String = msg.UserIDColorDim isAgent As Boolean = msg.IsAgentDim url As String = msg.FileUrlDim msgID As String = msg.PacketIDDim length As Integer = msg.LengthDim mediaType As MessageMediaType = msg.MediaTypebody = Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(body) 'to make first letter uppercase every words.'===========================If Not String.IsNullOrWhiteSpace(idColor) ThenIf UserPanel.Controls.ContainsKey(from.ToString) ThenDim item As RoomUserItem = CType(UserPanel.Controls(from.ToString), RoomUserItem)item.SetIdColorCode(idColor)End IfEnd IfIf mediaType = MessageMediaType.text ThenIf msg.From = ryu.Username ThenDim Right As RoomTextMessageControlRight = New RoomTextMessageControlRight(msgID)Right.usernamelbl.Text = from.ToStringRight.usernameLbl.ForeColor = (ColorTranslator.FromHtml(msg.UserIDColor()))Right.textMsgLbl.Text = bodyIf msg.Role = "creator" ThenRight.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" ThenRight.prole.BackColor = Color.RedElseIf msg.Role = "admin" ThenRight.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" ThenRight.prole.BackColor = Color.GreenElseIf msg.Role = "none" ThenRight.prole.BackColor = Color.DarkGrayEnd IfRight.textMsgLbl.ForeColor = Color.BlackRight.userPic.ImageLocation = (picUrl)chatPanel.UIThread(Function()chatPanel.Controls.Add(Right)chatPanel.ScrollControlIntoView(Right)#Disable Warning BC42105End Function)#Enable Warning BC42105ElseDim left As RoomTextMessageControlLeft = New RoomTextMessageControlLeft(msgID)left.usernameLbl.Text = from.ToStringleft.usernameLbl.ForeColor = (ColorTranslator.FromHtml(msg.UserIDColor()))left.textMsgLbl.Text = bodyleft.textMsgLbl.ForeColor = Color.Blackleft.userPic.ImageLocation = (picUrl)If msg.Role = "creator" Thenleft.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" Thenleft.prole.BackColor = Color.RedElseIf msg.Role = "admin" Thenleft.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" Thenleft.prole.BackColor = Color.GreenElseIf msg.Role = "none" Thenleft.prole.BackColor = Color.DarkGrayEnd Ifleft.imgs = (picUrl)chatPanel.UIThread(Function()chatPanel.Controls.Add(left)chatPanel.ScrollControlIntoView(left)#Disable Warning BC42105End Function)#Enable Warning BC42105If txtowner.Text.Contains(from) ThenIf body.StartsWith("m+") Thenbody = Replace(body, "m+", "")rtfmaster.AppendText(body + "#")End IfIf body = "+r" ThenIf chkmain.Checked Thenryu.SendMessage(Me.Text, "Bot Remoter Already Activated.", MessageType.MucMessage)Elsechkmain.Checked = TrueEnd IfElseIf body = "-r" ThenIf chkmain.Checked Thenchkmain.Checked = TrueElseryu.SendMessage(Me.Text, "Bot Remoter Already Deactivated.", MessageType.MucMessage)End IfEnd IfEnd IfIf chkmain.Checked ThenIf rtfmaster.Text.Contains(from) OrElse txtowner.Text.Contains(from) OrElse from = "syntax-error" ThenIf body = "bs" ThenIf chkidfilter.Checked Thensrm = srm + "Auto Post Message Is Active. " + vbNewLineEnd IfIf chkpost.Checked Thensrm = srm + "Auto Ban ID Length Filter Is Active. " + vbNewLineEnd IfIf chkbw.Checked Thensrm = srm + "Auto Kick BadWords Not Allowed Is Active. " + vbNewLineEnd IfIf chkgreeting.Checked Thensrm = srm + "Welcome Message Is Active. " + vbNewLineEnd Ifsrm = srm + "ID Length Set to: " + txtnum.Text + " Characters." + vbNewLineryu.SendMessage(Me.Text, srm + vbNewLine + " What do You Want Mr./Mrs. " + from, MessageType.MucMessage)srm = ""End IfIf body.StartsWith("if@") Thenbody = Replace(body, "if@", "")If IsNumeric(body) Thentxtnum.Text = bodyryu.SendMessage(Me.Text, "ID Length Set to " + txtnum.Text + " Characters by " + from, MessageType.MucMessage)Else' ReturnEnd IfEnd IfIf body = "+ib" ThenIf chkidfilter.Checked Thenryu.SendMessage(Me.Text, "Auto Ban for ID Length Already Activated", MessageType.MucMessage)Elsechkidfilter.Checked = TrueEnd IfElseIf body = "-ib" ThenIf chkidfilter.Checked Thenchkidfilter.Checked = FalseElseryu.SendMessage(Me.Text, "Auto Ban for ID Length Already Deactivated", MessageType.MucMessage)End IfEnd IfIf body = "+wc" ThenIf chkgreeting.Checked Thenryu.SendMessage(Me.Text, "Welcome Message Already Activated", MessageType.MucMessage)Elsechkgreeting.Checked = TrueEnd IfElseIf body = "-wc" ThenIf chkgreeting.Checked Thenchkgreeting.Checked = FalseElseryu.SendMessage(Me.Text, "Welcome Message Already Deactivated", MessageType.MucMessage)End IfEnd If'=================================If body.StartsWith("idf+") Thenbody = Replace(body, "idf+", "")txtidfilter.AppendText(body + "#")End IfIf body.StartsWith("bw+") Thenbody = Replace(body, "bw+", "")txtrules.AppendText(body + "#")ryu.SendMessage(Me.Text, "Bad Words Filter Added Succesfully!", MessageType.MucMessage)End IfIf body = "+bw" ThenIf chkbw.Checked Thenryu.SendMessage(Me.Text, "Auto Kick for Bad Words Not Allowed Already Activated", MessageType.MucMessage)ElseCall btnsave.PerformClick()chkbw.Checked = True' Call Button7.PerformClick()End IfElseIf body = "-bw" ThenIf chkbw.Checked Thenchkbw.Checked = FalseCall btnsave.PerformClick()Elseryu.SendMessage(Me.Text, "Auto Kick for Bad Words Not Allowed Already Deactivated", MessageType.MucMessage)End IfEnd IfIf body = "help" OrElse body = ".h" Thenryu.SendMessage(Me.Text, "Quick Commands Send h1 to h2", MessageType.MucMessage)End IfIf body = "h1" Thenryu.SendMessage(Me.Text, "Quick Commands" + vbNewLine + txtcmd1.Text, MessageType.MucMessage)End IfIf body = "h2" Thenryu.SendMessage(Me.Text, "Quick Commands" + vbNewLine + txtcmd2.Text, MessageType.MucMessage)End IfIf (body = "@ul") ThenMe.Button3 = New System.Windows.Forms.Button()' AddHandler Me.Button3.Click, New EventHandler(AddressOf Button3_Click)Call Me.Button3.PerformClick()End IfIf body = "+cp" ThenIf CheckBox5.Checked Thenryu.SendMessage(Me.Text, "🏏Cricket Is Already running..", MessageType.MucMessage)Else' txtlpb.Text = ""' txtlpa.Text = ""' tmcricket.Stop()' tmfind.Stop()' tmtb.Stop()' tmta.Stop()' lta.Items.Clear()' ltb.Items.Clear()' txtpa.Text = ""' txtpb.Text = ""' truna.Text = ""' trunb.Text = ""' lblta.Text = ""' lbltb.Text = ""' txtteamb.Text = ""' txtteama.Text = ""' Timer1.Stop()' chka.Checked = False' chkb.Checked = False' CheckBox6.Checked = False' CheckBox5.Checked = False' sa = 0' sb = 0' ova = 0' ovb = 0' ovas = 0' ovbs = 0' tsa = 0' tsb = 0' wicka = 0' wickas = 0' wickb = 0' wickbs = 0' tsa = 0' tsb = 0' _trunas = 0' _trunbs = 0' CheckBox7.Checked = False' lta.Items.Clear()' ltb.Items.Clear()' txtpa.Text = ""' txtpb.Text = ""' pc = 0' ova = 0' ovb = 0CheckBox5.Checked = Trueryu.SendImage(Me.Text, "https://www.linkpicture.com/q/crick2.png", MessageType.MucMessage)' tmcricket.Start()' its needed to run' Thread.Sleep(100)tmta = New System.Windows.Forms.Timer()AddHandler tmta.Tick, New EventHandler(AddressOf tmta_Tick)tmta.Start()End IfElseIf body = "-cp" Thentmcricket.Stop()tmfind.Stop()tmtb.Stop()tmta.Stop()lta.Items.Clear()ltb.Items.Clear()txtpa.Text = ""txtpb.Text = ""truna.Text = ""trunb.Text = ""lblta.Text = ""lbltb.Text = ""txtteamb.Text = ""txtteama.Text = ""Timer1.Stop()chka.Checked = Falsechkb.Checked = FalseCheckBox6.Checked = FalseCheckBox5.Checked = Falsesa = 0sb = 0ova = 0ovb = 0ovas = 0ovbs = 0tsa = 0tsb = 0wicka = 0wickas = 0wickb = 0wickbs = 0tsa = 0tsb = 0_trunas = 0_trunbs = 0cnt = 0chs = 0chss = 0CheckBox7.Checked = Falselta.Items.Clear()ltb.Items.Clear()txtpa.Text = ""txtpb.Text = ""pc = 0ova = 0ovb = 0ryu.SendMessage(Me.Text, "Cricket Is Now Deactivated", MessageType.MucMessage)End IfIf CheckBox5.Checked ThenIf body.StartsWith("1/") ThenIf txtteama.Text = "" ThenDim tta As String = Replace(body, "1/", "")txtteama.Text = ttaryu.SendMessage(Me.Text, from + " Set the Name of " + txtteama.Text + " for the 1st Team.", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, from + " 1st Team has already Set the Name of " + txtteama.Text, MessageType.MucMessage)End IfElseIf body.StartsWith("2/") ThenIf txtteamb.Text = "" ThenDim ttb As String = Replace(body, "2/", "")txtteamb.Text = ttbryu.SendMessage(Me.Text, from + " Set the Name of " + txtteamb.Text + " for 2nd Team", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, from + " 2nd Team has already Set the Name of " + txtteamb.Text, MessageType.MucMessage)End IfEnd If'============If body.StartsWith("c") Thenbody = Strings.Replace(body, "c", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfcountplayer.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)End Ifpc = ukEnd IfEnd IfEnd If'========End IfIf body.StartsWith(".k") Thenbody = Strings.Replace(body, ".k", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)End IfIf uk = "syntax-error" OrElse uk = "-ryu-" OrElse uk = "talentadong-pinoy" OrElse uk = "ph.com" Then' ryu.Muc.KickUsers(from)Elseryu.Muc.KickUsers(uk)uk = ""End IfEnd IfEnd IfEnd IfIf body.StartsWith(".b") Thenbody = Strings.Replace(body, ".b", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)' ta.Text = charArray(1)End IfIf uk = "syntax-error" OrElse uk = "-ryu-" OrElse uk = "talentadong-pinoy" OrElse uk = "ph.com" Thenryu.Muc.SetRole(from, RoleType.outcast)Elseryu.Muc.SetRole(uk, RoleType.outcast)ryu.Muc.BanIp(uk)uk = ""End IfEnd IfEnd IfEnd IfIf body.StartsWith(".n") Thenbody = Strings.Replace(body, ".n", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)End IfIf uk = "syntax-error" OrElse uk = "-ryu-" OrElse uk = "talentadong-pinoy" OrElse uk = "ph.com" Thenryu.Muc.SetRole(from, RoleType.none)Elseryu.Muc.SetRole(uk, RoleType.none)uk = ""End IfEnd IfEnd IfEnd IfIf body.StartsWith(".m") Thenbody = Strings.Replace(body, ".m", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)' ta.Text = charArray(1)End Ifryu.Muc.SetRole(uk, RoleType.member)uk = ""End IfEnd IfEnd IfIf body.StartsWith(".a") Thenbody = Strings.Replace(body, ".a", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)' ta.Text = charArray(1)End Ifryu.Muc.SetRole(uk, RoleType.admin)uk = ""End IfEnd IfEnd IfIf body.StartsWith(".o") Thenbody = Strings.Replace(body, ".o", "")If IsNumeric(body) Thenknum = bodyIf knum = "" ThenElseuk = rtfuserlist.Lines(knum)If uk.Contains(" ") ThenDim charArray = uk.Split(" "c)uk = charArray(1)' ta.Text = charArray(1)End Ifryu.Muc.SetRole(uk, RoleType.owner)uk = ""End IfEnd IfEnd IfIf body.StartsWith("@k/") Thenbody = Replace(body, "@k/", "")If body = "" ThenElseIf body = "syntax-error" OrElse body = "-ryu-" OrElse body = "talentadong-pinoy" OrElse body = "ph.com" Then' ryu.Muc.KickUsers(from)Elseryu.Muc.KickUsers(body)End IfEnd IfEnd IfIf body.StartsWith("@b/") Thenbody = Replace(body, "@b/", "")If body = "" ThenElseIf body = "syntax-error" OrElse body = "-ryu-" OrElse body = "talentadong-pinoy" OrElse body = "ph.com" Then' ryu.Muc.SetRole(from, RoleType.admin)Elseryu.Muc.SetRole(body, RoleType.outcast)End IfEnd IfEnd IfIf body.StartsWith("@m/") Thenbody = Replace(body, "@m/", "")If body = "" ThenElseryu.Muc.SetRole(body, RoleType.member)End IfEnd IfIf body.StartsWith("@a/") Thenbody = Replace(body, "@a/", "")If body = "" ThenElseryu.Muc.SetRole(body, RoleType.admin)End IfEnd IfIf body.StartsWith("@o/") Thenbody = Replace(body, "@o/", "")If body = "" ThenElseryu.Muc.SetRole(body, RoleType.owner)End IfEnd IfIf body.StartsWith("@n/") Thenbody = Replace(body, "@n/", "")If body = "" ThenElseIf body = "syntax-error" OrElse body = "-ryu-" OrElse body = "talentadong-pinoy" OrElse body = "ph.com" Thenryu.Muc.SetRole(from, RoleType.admin)Elseryu.Muc.SetRole(body, RoleType.none)End IfEnd IfEnd IfEnd If 'end master=========If body = "ctp" Thenryu.SendMessage(Me.Text, "Team " + txtteama.Text + vbNewLine + txtlpa.Text + vbNewLine + "Team " + txtteamb.Text + vbNewLine + txtlpb.Text, MessageType.MucMessage)End IfIf body = "rrp" Thenryu.SendMessage(Me.Text, "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)End IfIf CheckBox5.Checked ThenIf body = "t1" ThenIf lta.Items.Contains(from) Thenryu.SendMessage(Me.Text, from + " You Are Already added in the Team " + txtteama.Text, MessageType.MucMessage)ElseIf lta.Items.Count < pc Thenlta.Items.Add(from)ryu.SendMessage(Me.Text, from + " Succesfully added in the Team " + txtteama.Text, MessageType.MucMessage)txtlpa.AppendText(from + vbNewLine)txtupc.Text = from'' Call Cud()' Call btnsearch.PerformClick()ElseIf lta.Items.Count = pc ThenEnd IfEnd IfEnd IfIf body = "t2" ThenIf ltb.Items.Contains(from) Thenryu.SendMessage(Me.Text, from + " You Are Already added in the Team " + txtteamb.Text, MessageType.MucMessage)ElseIf ltb.Items.Count < pc Thenltb.Items.Add(from)ryu.SendMessage(Me.Text, from + " Succesfully added in the Team " + txtteamb.Text, MessageType.MucMessage)txtlpb.AppendText(from + vbNewLine)txtupc.Text = from' Call Cud()' Call btnsearch.PerformClick()ElseIf ltb.Items.Count = pc ThenEnd IfEnd IfEnd IfEnd IfIf CheckBox6.Checked ThenIf chka.Checked ThenIf body.StartsWith("rp@") Thenbody = Replace(body, "rp@", "")If lta.Items.Contains(body) Thenlta.Items.Remove(body)lta.Items.Add(from)txtpa.Text = from'=====================Dim input As String = txtlpa.TextDim replaceword As String = fromDim result As String = Regex.Replace(input, "\b" + body + "\b", replaceword)txtlpa.Text = result'====================End IfEnd IfEnd IfEnd IfIf CheckBox7.Checked ThenIf chkb.Checked ThenIf body = ("rp@") Thenbody = Replace(body, "rp@", "")End IfIf ltb.Items.Contains(body) Thenltb.Items.Remove(body)ltb.Items.Add(from)txtpb.Text = from'=====================Dim input As String = txtlpb.TextDim replaceword As String = fromDim result As String = Regex.Replace(input, "\b" + body + "\b", replaceword)txtlpb.Text = result'====================End IfEnd IfEnd If'team a striker=======If CheckBox6.Checked ThenIf pc = 5 Thenwickets = 5ElseIf pc = 3 Thenwickets = 3ElseIf pc = 1 Thenwickets = 2End IfIf chka.Checked ThenIf txtpa.Text = from ThenIf IsNumeric(body) ThenIf body.ToString() > 6 Thenryu.SendMessage(Me.Text, from + " Only Select👉 0 1 2 3 4 5 6 Number ", MessageType.MucMessage)ElseIf IsNumeric(body) ThenIf body = 0 Thenryu.SendMessage(Me.Text, txtpa.Text + "🙄 Are You Affraid? 😅 RUNS:0 " + vbNewLine + "Bowler Input: 😬😅" + vbNewLine + "Team B / " + sb.ToString() + vbNewLine + "Team A " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)tmfind.Stop()truna.Text = ""trunb.Text = ""chka.Checked = Falsechkb.Checked = Truetmtb = New System.Windows.Forms.Timer()tmtb.Start()Else_trunas = bodytruna.Text = _trunas.ToString()If truna.Text = trunb.Text Thenovas = 1ova += ovastxtwikc = 1' txtuwc.Text += txtwikctxtupc.Text = fromCall btnsearch.PerformClick()txtuwc.Text += txtwikcCall btnupdate.PerformClick()txtwikc = 0If CheckBox6.Checked Thenryu.SendImage(Me.Text, "https://www.linkpicture.com/q/out_2.jpg", MessageType.MucMessage)ryu.SendMessage(Me.Text, txtpa.Text + "👈 OUT! " + vbNewLine + " Bowler Input: " + trunb.Text + vbNewLine + "Team " + txtteamb.Text + " : " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(txtpb.Text, txtpa.Text + "👈 OUT! " + vbNewLine + " Bowler Input: " + trunb.Text + vbNewLine + "Team " + txtteamb.Text + " : " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.ChatMessage)End IfIf ova = wickets Thenryu.SendMessage(Me.Text, "🙌 🥳 " + txtteama.Text + " end of Innings." + vbNewLine + "👉Team " + txtteamb.Text + " Ready to Bat🏏" + vbNewLine + "Team " + txtteamb.Text + " / " + sb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " Ready To Bowl💥" + vbNewLine + "Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString(), MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(txtpb.Text, "🙌 🥳 " + txtteama.Text + " end of Innings." + vbNewLine + "👉Team " + txtteamb.Text + " Ready to Bat🏏" + vbNewLine + "Team " + txtteamb.Text + " / " + sb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " Ready To Bowl💥" + vbNewLine + "Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString(), MessageType.ChatMessage)Thread.Sleep(500)ryu.SendMessage(Me.Text, "🙌Free Hit for🥳 " + txtteamb.Text, MessageType.MucMessage)sb = 0bt = 0Me.lta.SelectedItem = NothingMe.ltb.SelectedItem = NothingCheckBox6.Checked = FalseCheckBox7.Checked = True'=======chs = sa + 1Thread.Sleep(5000)ryu.SendMessage(Me.Text, txtteamb.Text + "🏏 Need " + chs.ToString() + " Runs to Win.", MessageType.MucMessage)ryu.SendMessage(txtpa.Text, txtteamb.Text + "🏏 Need " + chs.ToString() + " Runs to Win.", MessageType.ChatMessage)Me.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemThread.Sleep(1000)ryu.SendMessage(Me.Text, txtpb.Text + "🏏 Batsmen " + vbNewLine + txtpa.Text + "💥 Bowler ", MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(Me.Text, txtpa.Text + vbNewLine + "💥 To Bowl Send A Number " + vbNewLine + "👉(0 1 2 3 4 5 6)" + vbNewLine + " In the 👉Private", MessageType.MucMessage)cnt = 0Else 'gitna ng wicketsIf pc = 1 Thenlta.SelectedItem = NothingMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemIf CheckBox6.Checked Thenryu.SendMessage(Me.Text, txtpa.Text + "👈 Get Ready for the Next Bat! 🏏 ", MessageType.MucMessage)End IfElseIf pc = 3 ThenIf CheckBox6.Checked ThenMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemryu.SendMessage(Me.Text, txtpa.Text + "👈 Get Ready for the Next Bat! 🏏 ", MessageType.MucMessage)End IfElseIf pc = 5 ThenIf CheckBox6.Checked ThenMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemryu.SendMessage(Me.Text, txtpa.Text + "👈 Get Ready for the Next Bat! 🏏 ", MessageType.MucMessage)End IfEnd IfEnd IfElseIf truna.Text = 1 Thenc = " A single taken " '","from":"syntax-error","body":"🅰️0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆚 "}ElseIf truna.Text = 2 Thenc = " looking for 2️⃣ runs... "ElseIf truna.Text = 3 Thenc = " are quick between the wickets....3️⃣ runs taken... "ElseIf truna.Text = 4 Thenc = " ball races to the boundary line..... 4️⃣ it is.... "ryu.SendImage(Me.Text, "https://www.linkpicture.com/q/4c_2.jpg", MessageType.MucMessage)ElseIf truna.Text = 5 Thenc = " No ball and a boundary... "ElseIf truna.Text = 6 Thenryu.SendImage(Me.Text, "https://www.linkpicture.com/q/6c.jpg", MessageType.MucMessage)c = " Over the boundary line.... 6️⃣ it is "End Ifbt += 1_sa += _trunas_trunas = 0sa += _sa_sa = 0txtupc.Text = fromCall btnsearch.PerformClick()txtruns = truna.Texttxtballs = 1txturc.Text += txtrunstxtubc.Text += txtballsCall btnupdate.PerformClick()txtruns = 0txtballs = 0ryu.SendMessage(Me.Text, txtpa.Text + c + vbNewLine + " Team:" + txtteama.Text + vbNewLine + "Runs: " + sa.ToString() + "/" + ova.ToString() + vbNewLine + "Overs: " + cnt.ToString() + " / " + wickb.ToString() + vbNewLine + "Bowler Input: " + trunb.Text, MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(txtpb.Text, txtpa.Text + c + vbNewLine + " Team:" + txtteama.Text + vbNewLine + "Runs: " + sa.ToString() + "/" + ova.ToString() + vbNewLine + "Overs: " + cnt.ToString() + " / " + wickb.ToString() + vbNewLine + "Bowler Input: " + trunb.Text, MessageType.ChatMessage)If pc = 1 ThenElseIf bt = 3 ThenMe.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemryu.SendMessage(Me.Text, txtpa.Text + "👈 Get Ready for the Next Bat! 🏏 ", MessageType.MucMessage)bt = 0End IfEnd If'=====error trunaEnd Iftmfind.Stop()truna.Text = ""trunb.Text = ""chka.Checked = Falsechkb.Checked = Truetmtb = New System.Windows.Forms.Timer()tmtb.Start()End IfEnd IfEnd IfElse'ReturnEnd IfEnd IfEnd IfEnd If'team a=========='team b striker================If CheckBox7.Checked ThenIf pc = 5 Thenwickets = 5ElseIf pc = 3 Thenwickets = 3ElseIf pc = 1 Thenwickets = 2End IfIf chkb.Checked ThenIf txtpb.Text = from ThenIf IsNumeric(body) ThenIf body.ToString() > 6 Thenryu.SendMessage(Me.Text, from + " Only Select👉 0 1 2 3 4 5 6 Number ", MessageType.MucMessage)ElseIf IsNumeric(body) ThenIf body = 0 Thenryu.SendMessage(Me.Text, txtpb.Text + "🙄 Are You Affraid? 😅 RUNS:0 " + vbNewLine + "Bowler Input: 😬😅" + vbNewLine + "Team " + txtteamb.Text + " / " + sb.ToString() + vbNewLine + "Team " + txtteama.Text + "" + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)tmtb.Stop()truna.Text = ""trunb.Text = ""chkb.Checked = Falsechka.Checked = Truetmfind = New System.Windows.Forms.Timer()tmfind.Start()Else_trunbs = bodytrunb.Text = _trunbs.ToString()If trunb.Text = truna.Text Thenovbs = 1ovb += ovbstsb = +1ovbs = 0txtupc.Text = fromCall btnsearch.PerformClick()txtuwc.Text += 1Call btnupdate.PerformClick()ryu.SendImage(Me.Text, "https://www.linkpicture.com/q/out_2.jpg", MessageType.MucMessage)ryu.SendMessage(Me.Text, txtpb.Text + " 👈 OUT! " + vbNewLine + "Bowler Input: " + truna.Text + vbNewLine + "Team " + txtteama.Text + " / " + sa.ToString() + vbNewLine + "Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString(), MessageType.MucMessage)Thread.Sleep(100)ryu.SendMessage(txtpa.Text, txtpb.Text + " 👈 OUT! " + vbNewLine + "Bowler Input: " + truna.Text + vbNewLine + "Team " + txtteama.Text + " / " + sa.ToString() + vbNewLine + "Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString(), MessageType.ChatMessage)If ovb = wickets OrElse cnt.ToString() = 6 Then'off game==========ryu.SendMessage(Me.Text, "🙌 The Game is Over🥳 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)If sa > sb Thenryu.SendMessage(Me.Text, "🏆 TEAM " + txtteama.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ryu.SendMessage(txtpa.Text, "🏆 TEAM " + txtteama.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.ChatMessage)ryu.SendMessage(Me.Text, "🏆 TEAM " + txtteama.Text + " WINNER 🏆 " + vbNewLine + txtlpa.Text, MessageType.MucMessage)ElseIf sa < sb Thenryu.SendMessage(Me.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ryu.SendMessage(txtpa.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.ChatMessage)ryu.SendMessage(Me.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + txtlpb.Text, MessageType.MucMessage)ElseIf sa = sb Thenryu.SendMessage(Me.Text, "🏆 ITS A MATCH GAME 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " / " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ryu.SendMessage(txtpa.Text, "🏆 ITS A MATCH GAME 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " / " + sa.ToString() + "/" + ova.ToString(), MessageType.ChatMessage)End IfMe.lta.SelectedItem = NothingMe.ltb.SelectedItem = NothingCheckBox6.Checked = FalseCheckBox7.Checked = False'===========ElseIf pc = 1 Thenltb.SelectedItem = NothingMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItem' ryu.SendMessage(TabPage1.Text, txtpa.Text + "👈 Get Ready 🏏 " + vbNewLine + "👉 Send A Number" + vbNewLine + "(0 1 2 3 4 5 6) In 👉 Room" + vbNewLine + "", MessageType.MucMessage)ryu.SendMessage(Me.Text, txtpb.Text + "👈 Get Ready for the Next Bat 🏏 ", MessageType.MucMessage)ElseIf pc = 3 ThenMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemryu.SendMessage(Me.Text, txtpb.Text + "👈 Get Ready for the Next Bat 🏏 ", MessageType.MucMessage)ElseIf pc = 5 ThenMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemryu.SendMessage(Me.Text, txtpb.Text + "👈 Get Ready for the Next Bat 🏏 ", MessageType.MucMessage)End IfEnd IfElseIf trunb.Text = 1 Thenc = " A single taken " '","from":"syntax-error","body":"🅰️0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆚 "}ElseIf trunb.Text = 2 Thenc = " looking for 2️⃣ runs... "ElseIf trunb.Text = 3 Thenc = " are quick between the wickets....3️⃣ runs taken... "ElseIf trunb.Text = 4 Thenc = " ball races to the boundary line..... 4️⃣ it is.... "ryu.SendImage(Me.Text, "https://www.linkpicture.com/q/4c_2.jpg", MessageType.MucMessage)ElseIf trunb.Text = 5 Thenc = " No ball and a boundary... "ElseIf trunb.Text = 6 Thenryu.SendImage(Me.Text, "https://www.linkpicture.com/q/6c.jpg", MessageType.MucMessage)c = " Over the boundary line.... 6️⃣ it is "End If_sb += _trunbs_trunbs = 0sb += _sb_sb = 0bt += 1txtupc.Text = fromCall btnsearch.PerformClick()txturc.Text += trunb.Texttxtubc.Text += 1Call btnupdate.PerformClick()ryu.SendMessage(Me.Text, txtpb.Text + c + vbNewLine + "Team:" + txtteamb.Text + vbNewLine + "Runs: " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "Overs: " + cnt.ToString() + " / " + wicka.ToString() + vbNewLine + "Bowler Input: " + truna.Text, MessageType.MucMessage)Thread.Sleep(1000)ryu.SendMessage(txtpa.Text, txtpb.Text + c + vbNewLine + "Team:" + txtteamb.Text + vbNewLine + "Runs: " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "Overs: " + cnt.ToString() + " / " + wicka.ToString() + vbNewLine + "Bowler Input: " + truna.Text, MessageType.ChatMessage)Thread.Sleep(1000)chss = chs - sbIf sb > sa Thenryu.SendMessage(Me.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.MucMessage)ryu.SendMessage(txtpa.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + "👉Team " + txtteamb.Text + " " + sb.ToString() + "/" + ovb.ToString() + vbNewLine + "👉Team " + txtteama.Text + " " + sa.ToString() + "/" + ova.ToString(), MessageType.ChatMessage)ryu.SendMessage(Me.Text, "🏆 TEAM " + txtteamb.Text + " WINNER 🏆 " + vbNewLine + txtlpb.Text, MessageType.MucMessage)Me.lta.SelectedItem = NothingMe.ltb.SelectedItem = NothingCheckBox6.Checked = FalseCheckBox7.Checked = FalseElseIf pc = 1 ThenElseIf bt = 3 ThenMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemryu.SendMessage(Me.Text, txtpb.Text + "👈 Get Ready for the Next Bat! 🏏 ", MessageType.MucMessage)bt = 0End IfEnd Ifryu.SendMessage(Me.Text, txtteamb.Text + vbNewLine + " Needs " + chss.ToString() + " Runs to Win.", MessageType.MucMessage)chss = 0tmfind = New System.Windows.Forms.Timer()tmtb.Stop()trunb.Text = ""truna.Text = ""chkb.Checked = Falsechka.Checked = Truetmfind.Start()End IfEnd IfEnd IfEnd IfEnd IfElse'ReturnEnd IfEnd IfEnd IfEnd If'team b ==========================If body.StartsWith("c@") ThenIf smb = 3 Thenryu.SendMessage(Me.Text, "Sorry!Confession is Now Full,Please Wait 1 day to Update Again.")If CheckBox11.Checked ThenElseCheckBox11.Checked = TrueEnd IfElsesmb += 1Dim time As DateTime = DateTime.NowDim format As String = "MMM ddd d HH:mm yyyy"body = Replace(body, "c@", "")rtfsub.AppendText("<h6>Message: " + body + "<h6'>")rtfsub.AppendText("<h6>Author: " + from + "<h6'>")rtfsub.AppendText("<h6>Time: " + (time.ToString(format)) + "<h6'>")rtfsub.AppendText("<h5>==========<h5'>")ryu.Muc.UpdateSubject(rtfsub.Text)rtfsub.Text = ""End IfEnd IfEnd If 'end of main controls======'======================================If chkbw.Checked Thenuserabuser = frombdys = bodyanswerbot()End IfEnd IfElseIf mediaType = MessageMediaType.audio ThenIf msg.From = ryu.Username ThenIf chatPanel.Controls.ContainsKey(msgID) ThenchatPanel.UIThread(Function()Dim Right As RoomAudioMessageControlRight = New RoomAudioMessageControlRight(msgID)Right.usernamelbl.Text = (from.ToString)Right.userPic.ImageLocation = picUrlRight.AudioDuration = length.ToString()If msg.Role = "creator" ThenRight.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" ThenRight.prole.BackColor = Color.RedElseIf msg.Role = "admin" ThenRight.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" ThenRight.prole.BackColor = Color.GreenElseIf msg.Role = "none" ThenRight.prole.BackColor = Color.DarkGrayEnd If#Disable Warning BC42322Right.Label1.Text = (url)#Enable Warning BC42322chatPanel.Controls.Add(Right)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfElsechatPanel.UIThread(Function()Dim left As RoomAudioMessageControlLeft = New RoomAudioMessageControlLeft(msgID)left.usernamelbl.Text = (from.ToString)left.usernamelbl.ForeColor = (ColorTranslator.FromHtml(msg.UserIDColor()))left.userPic.ImageLocation = picUrlIf msg.Role = "creator" Thenleft.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" Thenleft.prole.BackColor = Color.RedElseIf msg.Role = "admin" Thenleft.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" Thenleft.prole.BackColor = Color.GreenElseIf msg.Role = "none" Thenleft.prole.BackColor = Color.DarkGrayEnd Ifleft.AudioDuration = length.ToString()#Disable Warning BC42322left.Label1.Text = (url)#Enable Warning BC42322chatPanel.Controls.Add(left)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfElseIf mediaType = MessageMediaType.image ThenIf msg.From = ryu.Username ThenIf chatPanel.Controls.ContainsKey(msgID) ThenDim Right As RoomImageMessageControlRight = New RoomImageMessageControlRight(msgID)Right.usernameLbl.Text = from.ToStringRight.imageMsg.ImageLocation = urlIf msg.Role = "creator" ThenRight.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" ThenRight.prole.BackColor = Color.RedElseIf msg.Role = "admin" ThenRight.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" ThenRight.prole.BackColor = Color.GreenElseIf msg.Role = "none" ThenRight.prole.BackColor = Color.DarkGrayEnd IfRight.userPic.ImageLocation = (picUrl)chatPanel.UIThread(Function()chatPanel.Controls.Add(Right)chatPanel.ScrollControlIntoView(Right)#Disable Warning BC42105End Function)#Enable Warning BC42105'==============ElseDim Right As RoomImageMessageControlRight = New RoomImageMessageControlRight(msgID)Right.usernameLbl.Text = from.ToStringRight.imageMsg.ImageLocation = urlRight.userPic.ImageLocation = (picUrl)chatPanel.UIThread(Function()chatPanel.Controls.Add(Right)chatPanel.ScrollControlIntoView(Right)#Disable Warning BC42105End Function)#Enable Warning BC42105'==============End IfElseDim left As RoomImageMessageControlLeft = New RoomImageMessageControlLeft(msgID)left.usernamelbl.Text = from.ToStringleft.usernamelbl.ForeColor = (ColorTranslator.FromHtml(msg.UserIDColor()))left.imageMsg.ImageLocation = urlleft.Label1.Text = urlIf msg.Role = "creator" Thenleft.prole.BackColor = Color.OrangeElseIf msg.Role = "owner" Thenleft.prole.BackColor = Color.RedElseIf msg.Role = "admin" Thenleft.prole.BackColor = Color.CadetBlueElseIf msg.Role = "member" Thenleft.prole.BackColor = Color.GreenElseIf msg.Role = "none" Thenleft.prole.BackColor = Color.DarkGrayEnd Ifleft.userPic.ImageLocation = (picUrl)left.imgs = picUrlchatPanel.UIThread(Function()chatPanel.Controls.Add(left)chatPanel.ScrollControlIntoView(left)#Disable Warning BC42105End Function)#Enable Warning BC42105'==============End IfEnd If'==========================End If' End Sub)End IfEnd SubPublic Shared bls As IntegerDim bt As IntegerDim tmrun As IntegerProtected Overrides Sub OnPaint(ByVal e As PaintEventArgs)Dim gr As GraphicsPath = RoundedRectangle.Create(sendBtn.ClientRectangle, 24, RoundedRectangle.RectangleCorners.All)sendBtn.Region = New Region(gr)MyBase.OnPaint(e)End SubPrivate Sub sendMsg()Dim body As String = RichTextBox1.TextDim msgID As String = ""If Not String.IsNullOrWhiteSpace(body) ThenIf body.StartsWith("http") ThenIf body.EndsWith(".png") OrElse body.EndsWith(".jpg") OrElse body.EndsWith(".jpeg") OrElse body.EndsWith(".bmp") ThenmsgID = ryu.SendImage(Me.Text, body.ToString, MessageType.MucMessage)' Dim right As RoomImageRight = New RoomImageRight(msgID)' chatPanel.Controls.Add(right)ElseIf body.EndsWith(".mp3") OrElse body.EndsWith(".wav") OrElse body.EndsWith(".3gp") OrElse body.EndsWith(".mp4") ThenmsgID = ryu.SendAudio(Me.Text, body.ToString, New Random().[Next](100, 500), MessageType.MucMessage)' Dim right As RoomAudioRight = New RoomAudioRight(msgID)'chatPanel.Controls.Add(right)ElsemsgID = ryu.SendMessage(Me.Text, body.ToString, MessageType.MucMessage)' Dim right As RoomMessageRight = New RoomMessageRight(msgID)' chatPanel.Controls.Add(right)End IfElsemsgID = ryu.SendMessage(Me.Text, body, MessageType.MucMessage)' Dim right As RoomMessageRight = New RoomMessageRight(msgID)' chatPanel.Controls.Add(right)End IfRichTextBox1.Text = ""End IfEnd SubPrivate Sub OnMucUserPresence(ByVal ryu As Rub, ByVal mucUser As MucUser)If mucUser IsNot Nothing ThenIf mucUser.MucName = Me.Name ThenroomPres(mucUser)End IfEnd IfEnd SubPublic Property CurrentUsers As IntegerGetReturn _currentUsersEnd GetSet(ByVal value As Integer)Me._currentUsers = valueIf _maxUsers = 0 ThencurrentUsersLbl.UIThread(Function()Me.currentUsersLbl.Text = "Current Users: " & CurrentUsers#Disable Warning BC42105End Function)#Enable Warning BC42105ElsecurrentUsersLbl.UIThread(Function()Me.currentUsersLbl.Text = "Current Users: (" & CurrentUsers & "/" & MaxUsers & ")"#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd SetEnd PropertyPublic Property MaxUsers As IntegerGetReturn _maxUsersEnd GetSet(ByVal value As Integer)Me._maxUsers = valuecurrentUsersLbl.UIThread(Function()Me.currentUsersLbl.Text = "Current Users: (" & CurrentUsers & "/" & MaxUsers & ")"#Disable Warning BC42105End Function)#Enable Warning BC42105End SetEnd PropertyPublic WriteOnly Property RoomSuject As StringSet(ByVal value As String)If Not String.IsNullOrWhiteSpace(value) ThenchatPanel.UIThread(Function()Dim subject As WebBrowser = New WebBrowser()subject.Dock = DockStyle.Topsubject.ScrollBarsEnabled = Falsesubject.DocumentText = valuechatPanel.Controls.Add(subject)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd SetEnd PropertyPublic Property RoomName As StringGetReturn Me.NameEnd GetSet(ByVal value As String)Me.Name = valueMe.UIThread(Function()Me.Text = value#Disable Warning BC42105End Function)#Enable Warning BC42105End SetEnd PropertyPrivate Sub sujectChanged(ByVal subject As MucSubject)Dim timestamp As Long = CLng((DateTime.Now.Subtract(New DateTime(1970, 1, 1, 2, 30, 0).AddHours(12).AddMinutes(60))).TotalMilliseconds)RoomSuject = subject.Message'==============================================Dim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(subject.Author)If subject.Author = ryu.Username Then[event].RoomEvent = ("Subject published successfully.")Else[event].RoomEvent = ("Subject published by " & subject.Author & ".")End IfchatPanel.UIThread(Function()chatPanel.Controls.Add([event])End Function)'======================================End SubDim n As StringDim u As StringDim aff As StringPublic Sub roomJoined(ByVal muc As Muc)On Error Resume NextApplication.DoEvents()Task.Factory.StartNew(Sub()' Dim timestamp As Long = CLng((DateTime.Now.Subtract(New DateTime(1970, 1, 1, 2, 30, 0).AddHours(12).AddMinutes(60))).TotalMilliseconds)If muc IsNot Nothing ThenFor i As Integer = 0 To muc.MucUsers.Count - 1Dim user As MucUser = muc.MucUsers.ElementAt(i).Valueu = Convert.ToString(user.Username.ToString)aff = Convert.ToString(user.Role.ToString)If user IsNot Nothing ThenDim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(user.Username.ToString)If user.Username.ToString = ryu.Username Then[event].eventMsgLbl.Text = ("You joined the room as " + user.Role.ToString & ".")chatPanel.UIThread(Function()chatPanel.Controls.Add([event])End Function)Else[event].eventMsgLbl.Text = (user.Username.ToString & " is joined room as " + user.Role.ToString & ".")If user.Role.ToString = "creator" OrElse user.Role.ToString = "owner" ThenIf rtfmaster.Text.Contains(user.Username.ToString) ThenElsertfmaster.AppendText(user.Username.ToString + "#")End IfEnd IfIf listuser.Items.Contains(user.Username.ToString) ThenElselistuser.Items.Add(user.Username.ToString)End IfchatPanel.UIThread(Function()chatPanel.Controls.Add([event])End Function)End IfIf UserPanel.Controls.ContainsKey(user.Username.ToString) ThenDim item As RoomUserItem = CType(UserPanel.Controls(user.Username.ToString), RoomUserItem)Select Case user.RoleCase RoleType.creatoritem.Tag = 0item.usernameLbl.ForeColor = Color.OrangeRedCase RoleType.owneritem.Tag = 1item.usernameLbl.ForeColor = Color.RedCase RoleType.adminitem.Tag = 2item.usernameLbl.ForeColor = Color.BlueCase RoleType.memberitem.Tag = 3item.usernameLbl.ForeColor = Color.GreenCase RoleType.noneitem.Tag = 4item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.ControlText)Case Elseitem.Tag = 5item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.DarkGray)End Selectitem.usernameLbl.Text = (user.Username.ToString)item.roleLbl.Text = user.Role.ToString()ElseDim item As RoomUserItem = New RoomUserItem(user.Username.ToString)Select Case user.RoleCase RoleType.creatoritem.Tag = 0item.usernameLbl.ForeColor = (Color.OrangeRed)Case RoleType.owneritem.Tag = 1item.usernameLbl.ForeColor = (Color.Red)Case RoleType.adminitem.Tag = 2item.usernameLbl.ForeColor = (Color.Blue)Case RoleType.memberitem.Tag = 3item.usernameLbl.ForeColor = (Color.Green)Case RoleType.noneitem.Tag = 4item.usernameLbl.ForeColor = (Color.FromKnownColor(KnownColor.ControlText))End Selectitem.usernameLbl.Text = (user.Username.ToString)item.roleLbl.Text = user.Role.ToString()UserPanel.UIThread(Function()UserPanel.Controls.Add(item)End Function)If user.Username.ToString = ryu.Username ThenElselistuser.Items.Add(user.Username.ToString)End If'===========================End IfUserPanel.UIThread(Function()Dim itemArray As RoomUserItem() = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Tag).ToArray()UserPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105End IfNextEnd IfEnd Sub)End SubPrivate mucusr As StringPrivate mucmsg As StringPrivate ufrom As StringPublic pwr As String = ""Public grt As String = ""Private Sub roomPres(ByVal user As MucUser)Application.DoEvents()Task.Factory.StartNew(Sub()If user IsNot Nothing ThenMe.UIThread(Function()Dim [event] As RoomEventUpdateMiddle = New RoomEventUpdateMiddle(user.PacketID)If user.IsJoined Thenryu.GetMucInfo(Me.Text)[event].eventMsgLbl.Text = user.Username.ToString & " is joined room as " + user.Role.ToString & "."If listuser.Items.Contains(user.Username) Thenlistuser.Items.Add(user.Username.ToString)End IfIf user.Role.ToString = "creator" OrElse user.Role.ToString = "owner" ThenIf rtfmaster.Text.Contains(user.Username) ThenReturn (user.Username)Elsertfmaster.AppendText(user.Username.ToString + "#")End IfEnd IfchatPanel.UIThread(Function()chatPanel.Controls.Add([event])#Disable Warning BC42105End Function)#Enable Warning BC42105Dim item As RoomUserItem = New RoomUserItem(user.Username.ToString)Select Case user.RoleCase RoleType.creatoritem.Tag = 0item.usernameLbl.ForeColor = Color.OrangeRedCase RoleType.owneritem.Tag = 1item.usernameLbl.ForeColor = Color.RedCase RoleType.adminitem.Tag = 2item.usernameLbl.ForeColor = Color.BlueCase RoleType.memberitem.Tag = 3item.usernameLbl.ForeColor = Color.GreenCase RoleType.noneitem.Tag = 4item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.ControlText)Case Elseitem.Tag = 5item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.DarkGray)End SelectIf chkgreeting.Checked Thenufrom = (user.Username)mucnm = user.MucNameDim random As RandomDim strArray3 As String() = NothingstrArray3 = txtgreetingsIn.Text.Split(New Char() {"#"c})random = New Random()sndg = strArray3(random.[Next](strArray3.Length))sndg = Replace(sndg, "[buddy]", user.Username)sndg = Replace(sndg, "[roomname]", RoomName)sendgreetings()End IfIf chkidfilter.Checked ThenIf user.Role = "none" ThenIf user.Username.Length > txtidnum.Text Thenryu.Muc.SetRole(user.Username, RoleType.outcast)End IfEnd IfEnd Ifitem.usernameLbl.Text = user.Username.ToStringitem.roleLbl.Text = user.Role.ToString()UserPanel.UIThread(Function()UserPanel.Controls.Add(item)#Disable Warning BC42105End Function)#Enable Warning BC42105Else[event].eventMsgLbl.Text = user.Username & " is left."chatPanel.UIThread(Function()chatPanel.Controls.Add([event])If listuser.Items.Contains(user.Username.ToString) Thenlistuser.Items.Remove(user.Username.ToString)End If#Disable Warning BC42105End Function)#Enable Warning BC42105If UserPanel.Controls.ContainsKey(user.Username.ToString) ThenDim item As RoomUserItem = CType(UserPanel.Controls(user.Username.ToString), RoomUserItem)Select Case user.RoleCase RoleType.creatoritem.Tag = 0item.usernameLbl.ForeColor = Color.OrangeRedCase RoleType.owneritem.Tag = 1item.usernameLbl.ForeColor = Color.RedCase RoleType.adminitem.Tag = 2item.usernameLbl.ForeColor = Color.BlueCase RoleType.memberitem.Tag = 3item.usernameLbl.ForeColor = Color.GreenCase RoleType.noneitem.Tag = 4item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.ControlText)Case Elseitem.Tag = 5item.usernameLbl.ForeColor = Color.FromKnownColor(KnownColor.DarkGray)End Selectitem.usernameLbl.Text = user.Username.ToStringitem.roleLbl.Text = user.Role.ToString()UserPanel.UIThread(Function()UserPanel.Controls.Remove(item)End Function)ryu.GetMucInfo(Me.Text)End IfEnd IfDim muc As Muc = ryu.JoinedMuc(Me.Text)If muc IsNot Nothing ThenCurrentUsers = muc.CurrentUsers.CountEnd IfUserPanel.UIThread(Function()Dim itemArray As RoomUserItem() = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Key).ToArray()itemArray = UserPanel.Controls.Cast(Of RoomUserItem)().OrderBy(Function(x) x.Tag).ToArray()UserPanel.Controls.AddRange(itemArray)#Disable Warning BC42105End Function)#Enable Warning BC42105#Disable Warning BC42105End Function)#Enable Warning BC42105End IfEnd Sub)End SubDim sndg As String = ""Private Sub sendgreetings()Dim body As String = sndgDim msgID As String = ""Dim timestamp As Long = CLng((DateTime.Now.Subtract(New DateTime(1970, 1, 1, 2, 30, 0).AddHours(5).AddMinutes(30))).TotalMilliseconds)If Not String.IsNullOrWhiteSpace(body) ThenIf body.StartsWith("http") ThenIf body.EndsWith(".png") OrElse body.EndsWith(".jpg") OrElse body.EndsWith(".jpeg") OrElse body.EndsWith(".bmp") ThenmsgID = ryu.SendImage(Me.Text, body, MessageType.MucMessage)ElseIf body.EndsWith(".mp3") OrElse body.EndsWith(".wav") OrElse body.EndsWith(".3gp") OrElse body.EndsWith(".mp4") ThenmsgID = ryu.SendAudio(Me.Text, body, New Random().[Next](100, 500), MessageType.MucMessage)ElsemsgID = ryu.SendMessage(Me.Text, body, MessageType.MucMessage)End IfElsemsgID = ryu.SendMessage(Me.Text, body, MessageType.MucMessage)End IfEnd IfEnd SubDim gr As GraphicsPathPrivate Sub RoomMessageForm_Load(sender As Object, e As EventArgs) Handles MyBase.LoadApplication.DoEvents()CheckForIllegalCrossThreadCalls = False' gr = RoundedRectangle.Create(txtowner.ClientRectangle, 10, RoundedRectangle.RectangleCorners.All)' txtowner.Region = New Region(gr)RichTextBox1.Focus()' richTextBox1.[Select](0, 0)RichTextBox1.[Select]()' main.joinedLayoutPanel()main.removeRoomForm(Me.Text)End SubPrivate Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles chkidfilter.CheckedChangedIf chkidfilter.Checked Thenryu.SendMessage(Me.Text, "AutoBan ID Length is NOW ACTIVATED.", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "AutoBan ID Length is NOW DEACTIVATED.", MessageType.MucMessage)End IfEnd SubPrivate Sub tmrautopost_Tick(sender As Object, e As EventArgs) Handles tmrautopost.Ticktmrautopost.Interval = TextBox1.TextIf chkidfilter.Checked Thenryu.SendMessage(Me.Text, "This Room has SECURITY ACTIVE", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "🤔", MessageType.MucMessage)End IfEnd SubPrivate Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles chkpost.CheckedChangedIf chkpost.Checked Thentmrautopost.Start()Elsetmrautopost.Stop()End IfEnd SubDim userabuser As String = ""Private katalama4 As IntegerDim bdys As StringPublic Sub answerbot()If chkbw.Checked Then'=======================================' If rulebot.isRules Then' TryDim chArray10 As Char()Dim strArray3 As String()Dim flag9 As BooleanDim num10 As IntegerDim strArray4 As String()Dim strArray5 As String()Dim flag10 As BooleanDim num11 As IntegerIf chkbw.Checked ThenchArray10 = New Char() {"#"c}Dim separator As Char() = chArray10strArray3 = rulebot.ruleRoom.ToString().Split(separator, StringSplitOptions.RemoveEmptyEntries)flag9 = Falsenum10 = 0Else' GoTo TR_065AEnd IfGoTo _TR_067E_TR_065B:num10 += 1GoTo _TR_067E_TR_0666:If flag10 ThenDim strArray6 As String() = strArray4(1).Split(New Char() {"~"c}, StringSplitOptions.RemoveEmptyEntries)If strArray6.Length > 0 ThenDim flag14 As Boolean = FalseWhile Not flag14Dim _length As Integer = strArray6.LengthDim random As Random = Nothingrandom = New Random()Thread.Sleep(20)Dim index As Integer = random.[Next](_length) Mod _lengthIf (katalama4 <> index) OrElse (_length = 1) ThenDim kalimat As String = strArray6(index).Replace("[buddy]", userabuser.ToString).Split(New Char() {"%"c})(0).Replace("[nick]", ryu.Username())Dim res As String = parserwords(kalimat, 0).ToString()ryu.SendMessage(Me.Text, res, MessageType.MucMessage)ryu.Muc.KickUsers(userabuser)katalama4 = indexflag14 = TrueEnd IfEnd WhileEnd IfEnd Ifflag9 = FalseGoTo _TR_065B_TR_067A:While TrueIf num11 < strArray5.Length ThenIf bdys.ToLower() <> strArray5(num11).ToLower() ThenDim str16 As String = strArray5(num11).ToLower().Trim()Dim flag11 As Boolean = FalseIf (str16.Substring(0, 1) = "[") AndAlso (str16.Substring(str16.Length - 1) = "]") Thenflag11 = Truestr16 = str16.Replace("[", "").Replace("]", "")End IfIf bdys.ToLower().Trim().Contains(str16) AndAlso (Not String.IsNullOrEmpty(bdys) AndAlso flag11) Thenflag10 = TrueElsestr16 = strArray5(num11).ToLower().Trim()Dim flag12 As Boolean = FalseDim flag13 As Boolean = FalseIf str16.Substring(0, 1) = "~" Thenflag12 = Truestr16 = str16.Replace("~", "").Trim()End IfIf str16.Substring(str16.Length - 1) = "~" Thenflag13 = Truestr16 = str16.Replace("~", "").Trim()End IfIf bdys.Length <= str16.Length ThenExit WhileEnd IfIf (bdys.ToLower().Trim().Substring(0, str16.Length) = str16) AndAlso flag13 Thenflag10 = TrueElseIf (bdys.ToLower().Trim().Substring(bdys.Length - str16.Length) <> str16) OrElse Not flag12 ThenExit WhileEnd Ifflag10 = TrueEnd IfEnd IfGoTo _TR_0666Elseflag10 = TrueGoTo _TR_0666End IfElseGoTo _TR_0666End IfExit WhileEnd Whilenum11 += 1GoTo _TR_067A_TR_067E:While True#Disable Warning BC42104If num10 >= strArray3.Length Then#Enable Warning BC42104Exit WhileEnd IfIf Not flag9 Thenflag9 = TruestrArray4 = strArray3(num10).Split(New Char() {"="c}, StringSplitOptions.RemoveEmptyEntries)strArray5 = strArray4(0).Split(New Char() {"|"c}, StringSplitOptions.RemoveEmptyEntries)flag10 = Falsenum11 = 0GoTo _TR_067AEnd IfGoTo _TR_065BEnd While' Catch'End TryEnd If' End IfEnd SubPrivate Function parserwords(ByVal kalimat As String, ByVal mode As Integer) As StringDim str As String = kalimatSelect Case modeCase 0str = str.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace("'", "'").Replace("""", """)Case 1str = str.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace("'", "'").Replace(""", """").Replace(" ", " ")Case ElseEnd SelectReturn strEnd FunctionPrivate Function pagpalit(ByVal himayin As String) As StringReturn himayin.Replace(vbCrLf, " ").Replace(vbCr, " ").Replace(vbLf, " ").Replace(" ", " ").Replace("# ", "#").Replace(" #", "#").Replace(" ~", "~").Replace("~ ", "~").Trim()End FunctionPublic Sub customGreetingsAndManagementRoom()TryMe.inf = New inifile(Me.profilepath)Me.rulebot.ruleRoom = Me.inf.IniReadValue("ruleRoom")If String.IsNullOrEmpty(Me.rulebot.ruleRoom) Thenrulebot.ruleRoom = "[fuck]=badwords not allowed here [buddy]~bastos ka! [buddy]~isang tadyak kalang! [buddy]~dont say badwords anymore!#[pussy]=badwords not allowed here [buddy]~bastos ka! [buddy]~isang tadyak kalang! [buddy]~dont say badwords anymore!#[iyot]|[iyut]=badwords not allowed here [buddy]~bastos ka! [buddy]~isang tadyak kalang! [buddy]~dont say badwords anymore!#[kantot]|[puke]|[bilat]|[putay]=badwords not allowed here [buddy]~bastos ka! [buddy]~isang tadyak kalang! [buddy]~dont say badwords anymore!#[sex]=badwords not allowed here [buddy]~bastos ka! [buddy]~isang tadyak kalang! [buddy]~dont say badwords anymore!#"End IfMe.rulebot.greetingsIn = Me.inf.IniReadValue("greetingsIn")If String.IsNullOrEmpty(Me.rulebot.greetingsIn) Thenrulebot.greetingsIn = "welcome [buddy] here at [roomname]#hi [buddy]#welcomeback [buddy] nice to see you here#i like your style [buddy] ;)#join us [buddy]#"End IfCatch exception1 As Exception' MessageBox.Show(exception1.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand)End TryEnd SubPrivate Function verifystring(ByVal bacastring As String, ByVal mode As Boolean) As StringReturn If(String.IsNullOrEmpty(bacastring), (If(mode, "false", "0")), bacastring)End FunctionPrivate Sub Button7_Click(sender As Object, e As EventArgs) Handles btnsave.ClickOn Error Resume NextMe.txtrules.Text = Me.pagpalit(Me.txtrules.Text)Me.inf = NothingMe.inf = New inifile(profilepath)Me.inf.IniWriteValue("ruleRoom", Me.pagpalit(Me.txtrules.Text), 1)' Me.scorer = Nothing' scorer = New REUSCOREBOARD.REUSCOREBOARD.REUscoreBoard' If scorer.registry Is Nothing Then' Return' Else' Me.scorer.registry.SubKey = scorer.profilepath'Me.scorer.registry.DeleteSubKeyTree()'Me.scorer.registry.Write("isRules", Me.chkbw.Checked)'rulebot.ruleRoom = Me.txtrules.Text' End IfMe.txtgreetingsIn.Text = Me.pagpalit(Me.txtgreetingsIn.Text)Me.inf = NothingMe.inf = New inifile(profilepath)Me.inf.IniWriteValue("greetingsIn", Me.pagpalit(Me.txtgreetingsIn.Text), 1)' Me.scorer = Nothing' scorer = New REUSCOREBOARD.REUSCOREBOARD.REUscoreBoard' If scorer.registry Is Nothing Then' Return' Else' Me.scorer.registry.SubKey = scorer.profilepath' Me.scorer.registry.DeleteSubKeyTree()' Me.scorer.registry.Write("isGreetingsin", Me.chkgreeting.Checked)' rulebot.greetingsIn = Me.txtgreetingsIn.Text' End IfEnd SubPrivate Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles chkbw.CheckedChangedIf chkbw.Checked Thenryu.SendMessage(Me.Text, "Auto Kick BadWords Not Allowed is Now Activated", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "Auto Kick BadWords Not Allowed is Now Deactivated", MessageType.MucMessage)End IfEnd SubPrivate Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChangedIf IsNumeric(TextBox1.Text) ThenElseTextBox1.Text = 20000End IfEnd SubPrivate Sub Button1_Click(sender As Object, e As EventArgs)On Error Resume NextMe.txtgreetingsIn.Text = Me.pagpalit(Me.txtgreetingsIn.Text)Me.inf = NothingMe.inf = New inifile(profilepath)Me.inf.IniWriteValue("greetingsIn", Me.pagpalit(Me.txtgreetingsIn.Text), 1)' Me.scorer = Nothing' scorer = New REUSCOREBOARD.REUSCOREBOARD.REUscoreBoard' If scorer.registry Is Nothing Then' Return' Else' Me.scorer.registry.SubKey = scorer.profilepath' Me.scorer.registry.DeleteSubKeyTree()' Me.scorer.registry.Write("isGreetingsin", Me.chkgreeting.Checked)rulebot.greetingsIn = Me.txtgreetingsIn.Text' End IfEnd SubPrivate Sub InviteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles InviteToolStripMenuItem.Clickryu.SendMessage(Me.Text, "/inv@" + txtinviteuser.Text, MessageType.MucMessage)End SubPrivate Sub AddToFavouriteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AddToFavouriteToolStripMenuItem.ClickIf AddToFavouriteToolStripMenuItem.Text = "Add to Favourite" Thenryu.Muc.AddFavourite()AddToFavouriteToolStripMenuItem.Text = "Remove to Favourite"ElseIf AddToFavouriteToolStripMenuItem.Text = "Remove to Favourite" Thenryu.Muc.RemoveFavourite()AddToFavouriteToolStripMenuItem.Text = "Add to Favourite"End IfEnd SubPrivate Sub RejoinToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RejoinToolStripMenuItem.Clickryu.Muc.Rejoin(Me.Text)End Sub' ryu.Muc.SendMessage("")Private _username As StringPrivate _message As StringPrivate _picUrl As StringPrivate _isOnline As BooleanPrivate _mode As StringPrivate _lastSeen As StringPublic Property IsOnline As BooleanGetReturn Me._isOnlineEnd GetSet(ByVal value As Boolean)Me._isOnline = valueEnd SetEnd PropertyPrivate Sub chatPanel_ControlAdded(sender As Object, e As ControlEventArgs) Handles chatPanel.ControlAddedApplication.DoEvents()chatPanel.VerticalScroll.Value = chatPanel.VerticalScroll.MaximumEnd SubPrivate Sub tmrflood_Tick(sender As Object, e As EventArgs) Handles tmrflood.TickOn Error Resume Nextryu.SendImage(txttargetuser.Text, "https://cdn.chatp.net/logo-new.png", MessageType.ChatMessage)ryu.SendMessage(txttargetuser.Text, TextBox2.Text, MessageType.ChatMessage)ryu.SendImage(txttargetuser.Text, "https://cdn.chatp.net/logo-new.png", MessageType.ChatMessage)End SubPrivate Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.ClickIf Button1.Text = "Start" Thentmrflood.Start()Button1.Text = "Stop"ElseIf Button1.Text = "Stop" Thentmrflood.Stop()Button1.Text = "Start"End IfEnd SubPrivate Sub btntest_Click(sender As Object, e As EventArgs) Handles btntest.Clickryu.Muc.GetAffiliationList(Affiliation.Members)End SubPrivate Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.ClickOn Error Resume Nextrtfuserlist.Text = ""tmrulcolect = New System.Windows.Forms.Timer()AddHandler tmrulcolect.Tick, New EventHandler(AddressOf tmrulcolect_Tick)Call Me.tmrulcolect.Start()End SubPrivate Sub tmrulcolect_Tick(sender As Object, e As EventArgs) Handles tmrulcolect.TickOn Error Resume NextControl.CheckForIllegalCrossThreadCalls = Falsetmrulcolect.Interval = 1000Dim nbLine As IntegernbLine = rtfuserlist.Lines.CountMe.listuser.SelectedIndex = Me.listuser.SelectedIndex + 1If rtfuserlist.Text.Contains(0) ThenIf rtfuserlist.Text.Contains(listuser.SelectedItem) Thenryu.SendMessage(TabPage1.Text, rtfuserlist.Text, MessageType.MucMessage)' rtfuserlist.Text = ""Me.tmrulcolect.Stop()Me.listuser.SelectedItem = NothingElsenbLine -= 1rtfuserlist.AppendText(nbLine & " " + listuser.SelectedItem + vbCrLf)End IfElseIf rtfuserlist.Text.Contains(listuser.SelectedItem) Thenryu.SendMessage(TabPage1.Text, rtfuserlist.Text, MessageType.MucMessage)tmrulcolect.Stop()Me.listuser.SelectedItem = NothingElsertfuserlist.AppendText(nbLine & " " + listuser.SelectedItem + vbCrLf)End IfEnd IfEnd SubDim crickuser As StringDim pcudm As StringPrivate Sub Timer1_Tick(sender As Object, e As EventArgs)Timer1.Interval = 5000If CheckBox5.Checked ThenIf pc = 0 Thenryu.SendMessage(Me.Text, "PVT🏏CRICKET🏏TOURNAMENT" + vbNewLine + rtfcountplayer.Text, MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "Number of Players set to " + pc.ToString(), MessageType.MucMessage)' CheckBox5.Checked = Falsetmcricket = New System.Windows.Forms.Timer()tmcricket.Start()Timer1.Stop()End IfEnd IfEnd SubPrivate Sub CheckBox11_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox11.CheckedChangedIf CheckBox11.Checked ThenTimer2 = New System.Windows.Forms.Timer()Call Me.Timer2.Start()ElseTimer2.Stop()End IfEnd SubPrivate Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.TickDim time As DateTime = DateTime.Now' Dim format As String = "MMM ddd d HH:mm yyyy"Dim format As String = "MMM ddd d yyyy"If Label16.Text = (time.ToString(format)) ThenElseLabel16.Text = (time.ToString(format))ryu.Muc.UpdateSubject("<h5>Confession<h5'>")Timer2.Stop()CheckBox11.Checked = Falsesmb = 0End IfEnd SubShared lnuma As IntegerShared lnumsa As IntegerShared lnumb As IntegerShared lnumsb As IntegerPrivate Sub tmcricket_Tick(sender As Object, e As EventArgs) Handles tmcricket.Ticktmcricket.Interval = 1000If CheckBox5.Checked Thenlnuma = pclnumb = pc' lblta.Text = pc' lbltb.Text = pclblta.Text = lta.Items.Countlnumsa = lblta.Textlbltb.Text = ltb.Items.Countlnumsb = lbltb.TextIf lnumsa = 0 AndAlso lnumsb = 0 Thenryu.SendMessage(Me.Text, "Send t1 to join the Team " + txtteama.Text + vbNewLine + " Send t2 to join the Team " + txtteamb.Text, MessageType.MucMessage)ElseIf lnumsa = lnuma AndAlso lnumsb = lnumb Thenryu.SendMessage(Me.Text, "🏏" + txtteama.Text + " 🆚 🏏" + txtteamb.Text + vbNewLine + " be Ready!" + vbNewLine + "👉 " + txtteama.Text + " 🏏Batting " + vbNewLine + "👉 " + txtteamb.Text + "💥 Bowler", MessageType.MucMessage)Me.lta.SelectedIndex = Me.lta.SelectedIndex + 1txtpa.Text = lta.SelectedItemMe.ltb.SelectedIndex = Me.ltb.SelectedIndex + 1txtpb.Text = ltb.SelectedItemThread.Sleep(5000)ryu.SendMessage(Me.Text, txtpa.Text + "🏏 BatsMen " + vbNewLine + txtpb.Text + "💥 Bowler ", MessageType.MucMessage)Thread.Sleep(5000)ryu.SendMessage(Me.Text, txtpb.Text + vbNewLine + "💥 To Bowl Send A Number " + vbNewLine + "👉(0 1 2 3 4 5 6)" + vbNewLine + " In the 👉Private", MessageType.MucMessage)CheckBox5.Checked = FalseCheckBox6.Checked = Truechkb.Checked = Truetmcricket.Stop()ElseIf lnumsb = lnumb Thenryu.SendMessage(Me.Text, "Send t1 to join the Team " + txtteama.Text + " 🏏" + vbNewLine + "Team " + txtteamb.Text + " reached the Numbers of Players.", MessageType.MucMessage)ElseIf lnumsa = lnuma Thenryu.SendMessage(Me.Text, "Send t2 to join the Team " + txtteamb.Text + " 🏏" + vbNewLine + "Team " + txtteama.Text + " reached the Numbers of Players.", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "Send t1 to join the Team " + txtteama.Text + vbNewLine + " Send t2 to join the Team " + txtteamb.Text, MessageType.MucMessage)End IfEnd IfEnd SubPrivate Sub tmfind_Tick(sender As Object, e As EventArgs) Handles tmfind.Ticktmfind.Interval = 20000If CheckBox6.Checked ThenIf chka.Checked Thenryu.SendMessage(Me.Text, "⚽ " + wickbs.ToString() + vbNewLine + txtpa.Text + " 🏏 To Bat Send A Number " + vbNewLine + "👉(0 1 2 3 4 5 6) " + vbNewLine + " In 👉Room.", MessageType.MucMessage)ryu.SendMessage(txtpb.Text, "⚽ " + wickbs.ToString() + vbNewLine + " Waiting for " + txtpa.Text + vbNewLine + " 🏏 Responce... ", MessageType.ChatMessage)End IfEnd IfIf CheckBox7.Checked ThenIf chka.Checked Thenryu.SendMessage(Me.Text, " Waiting for " + txtpa.Text + vbNewLine + " 💥 Responce.. ", MessageType.MucMessage)ryu.SendMessage(txtpa.Text, " 💥 To Bowl Send A Number " + vbNewLine + " 👉(0 1 2 3 4 5 6) ", MessageType.ChatMessage)End IfEnd IfEnd SubPrivate Sub tmta_Tick(sender As Object, e As EventArgs) Handles tmta.Ticktmta.Interval = 1000If CheckBox5.Checked ThenIf txtteama.Text = "" AndAlso txtteamb.Text = "" Thenryu.SendMessage(Me.Text, "PVT🏏CRICKET🏏TOURNAMENT" + vbNewLine + "Please Set the Team Name" + vbNewLine + " SEND 1/yourteamname TO SET 1ST TEAM NAME" + vbNewLine + " SEND 2/yourteamname TO SET 2ND TEAM NAME", MessageType.MucMessage)ElseIf txtteama.Text = "" Thenryu.SendMessage(Me.Text, "PVT🏏CRICKET🏏TOURNAMENT" + vbNewLine + "Please Set the Team A Name" + vbNewLine + " SEND 1/yourteamname TO SET 1ST TEAM NAME", MessageType.MucMessage)ElseIf txtteamb.Text = "" Thenryu.SendMessage(Me.Text, "PVT🏏CRICKET🏏TOURNAMENT" + vbNewLine + "Please Set the Team B Name" + vbNewLine + " SEND 2/yourteamname TO SET 2ND TEAM NAME", MessageType.MucMessage)Else' ryu.SendMessage(TabPage1.Text, "WELCOME TO PVT🏏CRICKET🏏TOURNAMENT" + vbNewLine + rtfcountplayer.Text, MessageType.MucMessage)tmta.Stop()Timer1 = New System.Windows.Forms.Timer()Timer1.Start()End IfEnd IfEnd SubPrivate Sub tmtb_Tick(sender As Object, e As EventArgs) Handles tmtb.Ticktmtb.Interval = 1000If CheckBox6.Checked ThenIf chkb.Checked Thenryu.SendMessage(Me.Text, " Waiting for " + txtpb.Text + vbNewLine + " 💥Bowl... ", MessageType.MucMessage)ryu.SendMessage(txtpb.Text, " 💥 To Bowl Send A Number " + vbNewLine + " 👉(0 1 2 3 4 5 6) ", MessageType.ChatMessage)End IfEnd IfIf CheckBox7.Checked ThenIf chkb.Checked Thenryu.SendMessage(Me.Text, "⚽ " + wickas.ToString() + vbNewLine + txtpb.Text + " 🏏 To Bat Send A Number " + vbNewLine + " 👉(0 1 2 3 4 5 6) " + vbNewLine + " In 👉Room.", MessageType.MucMessage)ryu.SendMessage(txtpa.Text, "⚽ " + wickas.ToString() + vbNewLine + " Waiting for " + txtpb.Text + vbNewLine + " 🏏Batting.. ", MessageType.MucMessage)End IfEnd IfEnd SubPrivate Sub CheckBox6_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox6.CheckedChangedIf CheckBox6.Checked ThenElsechka.Checked = Falsechkb.Checked = Falsetmcricket.Stop()tmfind.Stop()tmtb.Stop()End IfEnd SubPrivate Sub RoomMessageForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosingApplication.DoEvents()For Each control As Control In chatPanel.ControlsIf TypeOf control Is AudioMessageControlLeft ThenDim left As RoomAudioMessageControlLeft = CType(control, RoomAudioMessageControlLeft)left.player.controls.[stop]()ElseIf TypeOf control Is AudioMessageControlRight ThenDim right As RoomAudioMessageControlLeft = CType(control, RoomAudioMessageControlLeft)right.player.controls.[stop]()End IfNextryu.LeaveMuc(Me.Text)main.removeRoomForm(Me.Text)Me.Dispose(True)End SubPrivate Sub btnsearch_Click(sender As Object, e As EventArgs) Handles btnsearch.ClickUsersearch(txtupc.Text, "")End SubPrivate Function Usersearch(fname As String, lname As String) As Boolean' Dim con1 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + TextBox5.Text + "\cuserD.mdf;Integrated Security=True")pcudm = ""con1.Open()Dim cmd As SqlCommand = con1.CreateCommandcmd.CommandText = "SELECT COUNT(*) FROM cpD" & " WHERE USERNAME = '" & txtupc.Text & "'"Usersearch = cmd.ExecuteScalar > 0If Usersearch = False Then' MessageBox.Show("Student Data Not Found!")' ryu.SendMessage(TabPage1.Text, txtupc.Text + " No Record Found in Cricket DataBase.", MessageType.MucMessage)txturc.Text = 0txtuwc.Text = 0txtubc.Text = 0Call btnsave.PerformClick()pcudm = pcudm + " USERNAME: " + txtupc.Text + vbNewLinepcudm = pcudm + " RUNS: " + txturc.Text + vbNewLinepcudm = pcudm + " WICKETS: " + txtuwc.Text + vbNewLinepcudm = pcudm + " BALLS: " + txtubc.Text + vbNewLine' ryu.SendMessage(TabPage1.Text, pcudm, MessageType.MucMessage)Elsecmd = con1.CreateCommand()cmd.CommandType = CommandType.Textcmd.CommandText = "select * from cpD where USERNAME='" + txtupc.Text + "'"cmd.ExecuteNonQuery()Dim dt As New DataTable()Dim da As New SqlDataAdapter(cmd)da.Fill(dt)DataGridView1.DataSource = dt' MessageBox.Show("Student Data Found!")'========================================txtidnum.Text = DataGridView1.CurrentRow.Cells(0).Valuetxtupc.Text = DataGridView1.CurrentRow.Cells(1).Valuetxturc.Text = DataGridView1.CurrentRow.Cells(2).Valuetxtuwc.Text = DataGridView1.CurrentRow.Cells(3).Valuetxtubc.Text = DataGridView1.CurrentRow.Cells(4).Valuepcudm = pcudm + " USERNAME: " + txtupc.Text + vbNewLinepcudm = pcudm + " RUNS: " + txturc.Text + vbNewLinepcudm = pcudm + " WICKETS: " + txtuwc.Text + vbNewLinepcudm = pcudm + " BALLS: " + txtubc.Text + vbNewLine' ryu.SendMessage(TabPage1.Text, pcudm, MessageType.MucMessage)End Ifcon1.Close()End FunctionPrivate Sub btnupdate_Click(sender As Object, e As EventArgs) Handles btnupdate.ClickOn Error Resume Next' Dim con1 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + TextBox5.Text + "\cuserD.mdf;Integrated Security=True")Dim update1 As String = "Update cpD set USERNAME='" & txtupc.Text & "',RUNS='" & txturc.Text & "',WICKETS='" & txtuwc.Text & "',BALLS='" & txtubc.Text & "' WHERE ID=" & txtidnum.Text & ""Dim command1 As New SqlCommand(update1, con1)If con1.State = ConnectionState.Closed Thencon1.Open()End Ifcommand1.ExecuteNonQuery()con1.Close()Cud()End SubPublic Sub Cud()cmd = con1.CreateCommand()cmd.CommandType = CommandType.Textcmd.CommandText = ("Select * from cpD order by ID ")Dim dt As New DataTable()Dim da As New SqlDataAdapter(cmd)da.Fill(dt)DataGridView1.DataSource = dtDataGridView1.AllowUserToAddRows = FalseEnd SubDim sss As StringPrivate Sub btndisplay_Click(sender As Object, e As EventArgs) Handles btndisplay.ClickCud()End SubPrivate Sub btndelete_Click(sender As Object, e As EventArgs) Handles btndelete.Click' Dim con1 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + TextBox5.Text + "\cuserD.mdf;Integrated Security=True")Dim delete1 As String = "Delete from cpD where ID=" & txtidnum.TextDim command1 As New SqlCommand(delete1, con1)If con1.State = ConnectionState.Closed Thencon1.Open()End Ifcommand1.ExecuteNonQuery()' MessageBox.Show("Student Data Deleted!")con1.Close()Cud()End SubPrivate Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.ClickUserExists(txtupc.Text, "")End SubPrivate Function UserExists(fname As String, lname As String) As Boolean' con1.Open()' Dim con1 As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + TextBox5.Text + "\cuserD.mdf;Integrated Security=True")If con1.State = ConnectionState.Closed Thencon1.Open()End IfDim cmd As SqlCommand = con1.CreateCommandcmd.CommandText = "SELECT COUNT(*) FROM cpD" & " WHERE USERNAME = '" & txtupc.Text & "'"UserExists = cmd.ExecuteScalar > 0If UserExists = False ThenDim command1 As New SqlCommand("Insert into cpD(USERNAME,RUNS,WICKETS,BALLS)values(@username,@runs,@wickets,@balls)", con1)command1.Parameters.Add("@username", SqlDbType.NVarChar).Value = txtupc.Textcommand1.Parameters.Add("@runs", SqlDbType.VarChar).Value = txturc.Textcommand1.Parameters.Add("@wickets", SqlDbType.VarChar).Value = txtuwc.Textcommand1.Parameters.Add("@balls", SqlDbType.VarChar).Value = txtubc.TextDim memstr As New MemoryStreamIf con1.State = ConnectionState.Closed Thencon1.Open()End Ifcommand1.ExecuteNonQuery()con1.Close()Cud()ElseCall btnupdate.PerformClick()End Ifcon1.Close()End FunctionPrivate Sub chkgreeting_CheckedChanged(sender As Object, e As EventArgs) Handles chkgreeting.CheckedChangedIf chkgreeting.Checked Thenryu.SendMessage(Me.Text, "Welcome IN Greetings is Now Activated", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "Welcome IN Greetings is Now Deactivated", MessageType.MucMessage)End IfEnd SubPrivate Sub chkmain_CheckedChanged(sender As Object, e As EventArgs) Handles chkmain.CheckedChangedIf chkmain.Checked Thenryu.SendMessage(Me.Text, "Server Bot Mode is Now Activated", MessageType.MucMessage)Elseryu.SendMessage(Me.Text, "Server Bot Mode is Now Deactivated", MessageType.MucMessage)End IfEnd SubPrivate Sub Button6_Click_1(sender As Object, e As EventArgs) Handles Button6.Clicktmta = New System.Windows.Forms.Timer()AddHandler tmta.Tick, New EventHandler(AddressOf tmta_Tick)tmta.Start()End SubPrivate Sub Button5_Click(sender As Object, e As EventArgs)ryu.Muc.ResetIP()ryu.Muc.RefreshToken()ryu.Muc.GetSettings(Me.Text)End SubPrivate Sub Button7_Click_2(sender As Object, e As EventArgs)ryu.Muc.Reset()ryu.Muc.RefreshToken()ryu.Muc.GetSettings(Me.Text)End SubPrivate Sub RichTextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles RichTextBox1.KeyUpIf e.KeyCode = Keys.Enter ThenRichTextBox1.ResetText()End IfEnd SubPrivate Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles RichTextBox1.TextChangedIf RichTextBox1.Text = String.Empty ThenRichTextBox1.Text = "write a message..."RichTextBox1.ForeColor = Color.DarkGrayRichTextBox1.[Select](0, 0)sendBtn.Image = My.Resources.attachmentsElseIf RichTextBox1.Text <> "write a message..." ThenRichTextBox1.Text = RichTextBox1.Text.Replace("write a message...", "")RichTextBox1.ForeColor = Color.BlackRichTextBox1.[Select](RichTextBox1.Text.Length, RichTextBox1.Text.Length)sendBtn.Image = My.Resources.sendIf CheckBox3.Checked ThenRichTextBox1.Text = Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(RichTextBox1.Text)End IfEnd IfEnd SubPrivate Sub RichTextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles RichTextBox1.KeyDownIf e.KeyCode = Keys.Enter ThenIf Not String.IsNullOrWhiteSpace(RichTextBox1.Text) AndAlso RichTextBox1.Text <> "write a message..." Thenryu.SendMessageState(Me.Text, StateType.paused)sendMsg()End IfEnd IfEnd SubPrivate Sub RichTextBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles RichTextBox1.MouseDownIf RichTextBox1.Text = "write a message..." ThenRichTextBox1.[Select](0, 0)End IfEnd SubPrivate Sub Button10_Click(sender As Object, e As EventArgs)ryu.Muc.GetLogs(Me.Text)End SubPrivate Sub Button11_Click(sender As Object, e As EventArgs)ryu.Muc.GetSettings(Me.Text)End SubPrivate Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.ClickIf ComboBox1.Text = "none" Thenryu.Muc.SetRole(txtusertargetrole.Text, RoleType.none)ElseIf ComboBox1.Text = "kick" Thenryu.Muc.KickUsers(txtusertargetrole.Text)ElseIf ComboBox1.Text = "outcast" Thenryu.Muc.SetRole(txtusertargetrole.Text, RoleType.outcast)ElseIf ComboBox1.Text = "member" Thenryu.Muc.SetRole(txtusertargetrole.Text, RoleType.member)ElseIf ComboBox1.Text = "admin" Thenryu.Muc.SetRole(txtusertargetrole.Text, RoleType.admin)ElseIf ComboBox1.Text = "owner" Thenryu.Muc.SetRole(txtusertargetrole.Text, RoleType.owner)End IfEnd SubEnd Class
THE CODES ABOVE IS WORKING THAT YOU CAN USE IT FOR YOUR OWN
VB.NET ALEXIA-IM FULL PROJECT SOURCE CODE
NOTE:PLEASE CONSIDERED ITS NOT FREE IF THE EXTRACT FILE ASKING PASSWORD
THANKS
No comments:
Post a Comment