public LoLConnection(Benebot parent) { _parent = parent; _room = Settings.Default.LoLRoom; _resource = Settings.Default.LoLResource; _connection = new XmppClientConnection { Username = Settings.Default.LoLUsername, Password = string.Format("AIR_{0}", Settings.Default.LoLPassword), Status = Settings.Default.LoLStatus, UseSSL = true, AutoRoster = true, AutoPresence = true, Server = Settings.Default.LoLServer, ConnectServer = Settings.Default.LoLConnectServer, Port = Settings.Default.LoLPort, Resource = _resource }; _connection.OnLogin += OnLoggedIn; _connection.OnPresence += OnReceivePrescence; _connection.OnMessage += OnMessageReceive; _connection.OnAuthError += (sender, element) => Console.WriteLine(element.ToString()); }
static void Main(string[] args) { var benebot = new Benebot(); benebot.Connection = new LoLConnection(benebot); benebot.Start(); while (true) { var s = Console.ReadLine(); switch (s) { case "disconnect": benebot.Connection.Disconnect(); break; case "connect": benebot.Start(); break; default: benebot.SendMessage(s); break; } } }
public UserManager(Benebot p) { _parent = p; LoadUsers(); _api = new RiotAPI(); }