Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace JabberBot
- {
- public partial class Form1 : Form
- {
- protected JabberClient bot;
- public Form1()
- {
- InitializeComponent();
- }
- void bot_OnConnect(object sender, jabber.connection.StanzaStream stream)
- {
- }
- void bot_OnError(object sender, Exception ex)
- {
- MessageBox.Show("Failed to connect");
- Console.WriteLine(ex.ToString());
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- bot = new JabberClient();
- JID ownerJID = new JID("nichyaderouke@pleaseignore.com/LegitUser");
- bot.User = "nichyaderouke";
- bot.Priority = 20;
- bot.Server = "pleaseignore.com";
- bot.Password = "TVnuFxx250";
- bot.Port = 5222;
- bot.SSL = true;
- bot.Resource = "legituser";
- bot.AutoPresence = false;
- bot.AutoRoster = false;
- bot.AutoReconnect = -1;
- bot.OnError += new bedrock.ExceptionHandler(bot_OnError);
- bot.OnConnect += new jabber.connection.StanzaStreamHandler(bot_OnConnect);
- bot.Connect();
- }
- }
- }
Add Comment
Please, Sign In to add comment