SHARE
TWEET

Midibot - Linked account

capasha Feb 18th, 2018 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static Semaphore s1 = new Semaphore(0,1);              
  2. case 4:
  3.                     {
  4.                         Console.Write("Username: ");
  5.                         string name = Console.ReadLine();
  6.  
  7.                         Console.Write("Password: ");
  8.                         string pass = Console.ReadLine();
  9.                        
  10.                         PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", name, pass, null, (Client cli) =>
  11.                         {
  12.                             cli.Multiplayer.CreateJoinRoom("$service-room", "AuthRoom", true, null, new Dictionary<string, string>() { { "type", "Link" } }, (Connection con) =>
  13.                             {
  14.                                 con.OnMessage += (object sender1, PlayerIOClient.Message m) =>
  15.                                 {
  16.                                     if (m.Type == "auth")
  17.                                     {
  18.                                         client = PlayerIO.Authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "linked", new Dictionary<string, string>() { { "userId", m.GetString(0) }, { "auth", m.GetString(1) } }, null);
  19.                                         s1.Release();
  20.                                     }
  21.                                 };
  22.                             });
  23.                         });
  24.                         s1.WaitOne();
  25.                     }
  26.                     break;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top