Guest User

Untitled

a guest
Jan 11th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. namespace JabberBot
  2. {
  3. public partial class Form1 : Form
  4. {
  5. protected JabberClient bot;
  6.  
  7. public Form1()
  8. {
  9. InitializeComponent();
  10. }
  11.  
  12.  
  13. void bot_OnConnect(object sender, jabber.connection.StanzaStream stream)
  14. {
  15. }
  16.  
  17. void bot_OnError(object sender, Exception ex)
  18. {
  19. MessageBox.Show("Failed to connect");
  20. Console.WriteLine(ex.ToString());
  21. }
  22.  
  23. private void Form1_Load(object sender, EventArgs e)
  24. {
  25.  
  26. }
  27.  
  28. private void button1_Click(object sender, EventArgs e)
  29. {
  30. bot = new JabberClient();
  31.  
  32. JID ownerJID = new JID("nichyaderouke@pleaseignore.com/LegitUser");
  33. bot.User = "nichyaderouke";
  34. bot.Priority = 20;
  35. bot.Server = "pleaseignore.com";
  36. bot.Password = "TVnuFxx250";
  37. bot.Port = 5222;
  38.  
  39. bot.SSL = true;
  40. bot.Resource = "legituser";
  41.  
  42. bot.AutoPresence = false;
  43. bot.AutoRoster = false;
  44. bot.AutoReconnect = -1;
  45.  
  46. bot.OnError += new bedrock.ExceptionHandler(bot_OnError);
  47. bot.OnConnect += new jabber.connection.StanzaStreamHandler(bot_OnConnect);
  48.  
  49. bot.Connect();
  50. }
  51. }
  52. }
Add Comment
Please, Sign In to add comment