Advertisement
Guest User

IRC Form1

a guest
Aug 12th, 2018
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'QIRCbot V1.01beta.
  2. 'This program has been written by James Marvin - WolfSpirit
  3. 'You are free to use this code as you wish, make any alterations
  4. 'and additions as you see fit just as long as you give me
  5. 'credit for the many hours of hard work I have put into this.
  6. 'Do NOT plagerise my work and call it your own, as you will
  7. 'likely put yourself in a very actionable position and I will
  8. 'use all legal and civil options available to me to seek
  9. 'recompense.
  10. 'DISCLAIMER:
  11. 'This program code is provided 'as is' and I take no responsibility for
  12. 'any damage, loss of data or any loss of income that the use of this program
  13. 'causes.
  14. 'I also take NO responsibility if this program is used for illegal purposes
  15. 'including but not limited to, spamming, flooding, or any unacceptable and
  16. 'illegal practices on any or all IRC networks and servers. To do so may
  17. 'cause you to be liable to prosecution, and to have your service cancelled
  18. 'by your ISP.
  19. 'If you wish to contact me, i can be contacted by email at:
  20. 'wolven_spirit@gawab.com
  21. 'james.marvin@dcemail.com
  22.  
  23. Public Function addLog(Message As String)
  24.  'outstr = Split(Message, Chr$(13), -1, 1)
  25. '  For lp = 0 To UBound(outstr) - 1
  26. '   Prntline (outstr(lp))
  27. '  Next lp
  28.  
  29. End Function
  30.  
  31. Private Sub Command1_Click()
  32. Dim ServerInput As String
  33. ServerInput = InputBox("IRC Server site", "Select a server", "Gideon.GeekShed.net")
  34. wskIRC.RemoteHost = ServerInput
  35. wskIRC.RemotePort = 6667
  36. addLog "Connecting to " & wskIRC.RemoteHost & " port " & wskIRC.RemotePort & "…"
  37. wskIRC.Connect
  38. End Sub
  39.  
  40. Private Sub Command2_Click()
  41. wskIRC.Close
  42.  
  43. End Sub
  44.  
  45. Private Sub Command3_Click()
  46. wskIRC.SendData "PRIVMSG #UltraHal :HAL v6.2 hybrid onthecuttingedge - CyberJedi & LifeTimeGamer our A.I Team Thanks for all your hard work in getting this out and putting up with me in times of need." & vbCrLf
  47. End Sub
  48.  
  49. Private Sub Command4_Click()
  50. wskIRC.SendData "WHO #UltraHal" & vbCrLf
  51.  
  52. End Sub
  53.  
  54. Private Sub txtLOG_Change()
  55.  
  56. End Sub
  57.  
  58.  
  59. Private Sub Command7_Click()
  60. Dim lp As Integer
  61. For lp = 0 To 4
  62.   Form2.Text1.Text = Form2.Text1 + Str$(lp) + test_var(0, lp) + vbCrLf
  63.   Form2.Text1.Text = Form2.Text1 + Str$(lp) + test_var(1, lp) + vbCrLf
  64.   Form2.Text1.Text = Form2.Text1 + Str$(lp) + test_var(2, lp) + vbCrLf
  65.   Form2.Text1.Text = Form2.Text1 + Str$(lp) + test_var(3, lp) + vbCrLf
  66. Next lp
  67.  
  68. End Sub
  69.  
  70. Private Sub Command8_Click()
  71. 'Prntline "Testing One Two" + Str$(t)
  72.  
  73. t = t + 1
  74.  
  75. End Sub
  76.  
  77. Private Sub Command5_Click()
  78. Form1.wskIRC.SendData "PRIVMSG " + Channel + " :" + Form1.OutTXT + vbCrLf
  79. Prntline "<" + BotName + "> " + Form1.OutTXT, vbGreen
  80. Form1.OutTXT.Text = ""
  81.  
  82. End Sub
  83.  
  84. Private Sub Form_Load()
  85. Dim lp As Integer
  86. Dim tmpstring As String
  87. lp = 0
  88. On Error GoTo ero:
  89. Open "seenusers.ini" For Input As #1
  90.    Do While Not EOF(1)
  91.      Input #1, tmpstring
  92.      ndta = Split(tmpstring)
  93.      seen_users(lp, 0) = ndta(0)
  94.      seen_users(lp, 1) = ndta(1)
  95.      seen_users(lp, 2) = ndta(2)
  96.      lp = lp + 1
  97.    Loop
  98.    Close #1
  99.    seen_users(lp, 0) = "EOL"
  100.    Form1.List1.Clear
  101.    lp = 0
  102.    
  103.      
  104. Form2.Visible = True
  105. sntflag = True
  106. Exit Sub
  107.  
  108.  
  109. ero:
  110.   seen_users(0, 0) = "EOL"
  111.   Form2.Visible = True
  112. sntflag = True
  113.  
  114.  
  115. End Sub
  116.  
  117. Private Sub Form_Unload(Cancel As Integer)
  118. Dim lp As Integer
  119. Open "seenusers.ini" For Output As #1
  120. While seen_users(lp, 0) <> "EOL"
  121. DoEvents
  122. Print #1, seen_users(lp, 0) & " " & seen_users(lp, 1) & " " & seen_users(lp, 2)
  123.   lp = lp + 1
  124. Wend
  125. Close #1
  126.  
  127. End Sub
  128.  
  129. Private Sub OutTXT_KeyPress(KeyAscii As Integer)
  130. Dim tmstrng As Integer
  131. If KeyAscii = 13 Then
  132. If Form1.OutTXT <> "" Then
  133.  
  134. tmstring = "PRIVMSG " + Channel + " :" + Form1.OutTXT
  135. snd_data (tmstring)
  136. Prntline "<" + BotName + "> " + Form1.OutTXT, vbCyan
  137. Form1.OutTXT.Text = ""
  138. End If
  139. End If
  140. End Sub
  141.  
  142. Private Sub wskIRC_Connect()
  143. Dim rmthst As String
  144. addLog "Connected!"
  145. Dim Random As Integer
  146. Randomize
  147. Random = Rnd * 1000
  148. Dim ChannelIn As String
  149. Dim BotID As String
  150. Dim BotName As String
  151. Dim GetPassWord As String
  152. '________________________Select Bot Name and IRC Channel and password______________________________________
  153. 'edge was here.
  154. BotID = InputBox("Bot Name", "Select a Bot name", "Candy")
  155. ChannelIn = InputBox("IRC Channel", "Select a Channel", "#UltraHal")
  156. BotName = BotID
  157. GetPassWord = InputBox("IRC Password", "Select a password", "Sunsword1")
  158. addLog "Username: " & Name
  159. wskIRC.SendData "NICK " & BotName & vbCrLf
  160. wskIRC.SendData "USER candy candy candy candy" & vbCrLf
  161. Channel = ChannelIn
  162. wskIRC.SendData "JOIN " & Channel & " " & GetPassWord & vbCrLf
  163. End Sub
  164.  
  165. Private Sub wskIRC_DataArrival(ByVal bytesTotal As Long)
  166. Dim Data As String
  167.   wskIRC.GetData Data
  168.   InDta (Data)
  169.   'Lets now process the data
  170.  prc_data (0)
  171.  
  172. End Sub
  173.  
  174. Private Sub wskIRC_SendComplete()
  175.   sntflag = True
  176. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement