Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ThreadPool.QueueUserWorkItem(delegate
- {
- try
- {
- string[] ran = new string[] { ".", ",", "^", "*", "-", "+", ">", "<", "~", "`" };
- int rand = new Random((int)(DateTime.Now.Ticks)).Next(0, ran.Count());
- string prefix = string.Format("/pm {0} [CB]: ", username);
- string message = string.Format("/pm {0} [CB]: {1}", username, msg);
- string[] split = message.Split(' ');
- int c = 0;
- string m = "";
- while (message.Count() >= 75)
- {
- split = message.Split(' ');
- while (m.Count() <= 75)
- {
- c++;
- m += split[c] + " ";
- }
- c--;
- m = "";
- for (int i = 0; i <= c; i++)
- {
- if (i != c)
- {
- m += split[i] + " ";
- }
- else
- {
- m += split[i];
- }
- }
- con.Send("say", m);
- message = message.Remove(0, m.Count());
- message = prefix + message;
- Thread.Sleep(760);
- }
- con.Send("say", message + ran[rand]);
- }
- catch
- {
- con.Send("say", username + " There was an error creating your message");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement