Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string[] GetChatData(int position, bool test = false)
- {
- List<string> chat = new List<string>();
- int cr = 0;
- for (int i = 0; i < chatdata.Count; i++)
- {
- if (chatdata[i].Length > 56)
- {
- string data = chatdata[i].Substring(56);
- chat.Add(chatdata[i].Substring(0, 56));
- while (data.Length > 0)
- {
- cr++;
- if (data.Length > 52)
- {
- chat.Add(" " + data.Substring(0, 52));
- data = data.Substring(52);
- }
- else
- {
- chat.Add(" " + data);
- data = "";
- }
- }
- }
- * else
- {
- chat.Add(chatdata[i]);
- }
- }
- List<string> actualChat = new List<string>();
- for (int x = 0; x < 10; x++)
- {
- if (position + x >= chat.Count)
- break;
- if (position < 0)
- position = 0;
- actualChat.Add(chat[position + x]);
- }
- if (test)
- {
- string[] send = new string[1];
- send[0] = Convert.ToString(chat.Count - position);
- return send;
- }
- return actualChat.ToArray();
- }
Add Comment
Please, Sign In to add comment