Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Irc Chat unitypackage

Discussion in 'Made With Unity' started by friuns3, Nov 22, 2010.

  1. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    Probably you have same window id, try to change window id.
     
  2. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    Unity Irc chat client is now free open source!
    Code (csharp):
    1.  
    2. using System.Linq;
    3. using UnityEngine;
    4. using System;
    5. using System.Collections.Generic;
    6. using System.Text;
    7. using System.Net.Sockets;
    8. using System.Threading;
    9. using System.IO;
    10. using System.Text.RegularExpressions;
    11. using Debug = UnityEngine.Debug;
    12. public interface iIrc
    13. {
    14.     void OnPm(string user, string message);
    15.     void OnMessage(string message);
    16.     void OnConnected();
    17. }
    18. [Serializable]
    19. public class Irc : IDisposable
    20. {
    21.     bool Trial = true;
    22.     public bool enableLog = false;    
    23.     public string[] users { get; set; }
    24.     [UnityEngine.HideInInspector]
    25.     public bool success { get; set; }
    26.     [UnityEngine.HideInInspector]
    27.     public string user = "UnityIrcChat";
    28.     [UnityEngine.HideInInspector]
    29.     public string user2 = "localhost";
    30.     [UnityEngine.HideInInspector]
    31.     public string about = "about";
    32.     public string host = "irc.freenode.net";
    33.     public int port = 6667;
    34.     public bool enableSOCKS5;
    35.     public string SOCKS5Server = "127.0.0.1";
    36.     public int SOCKS5Port = 1080;  
    37.     public iIrc controller;
    38.     //bool enableSSL = false;
    39.     TcpClient _Socket;
    40.     Stream _NetworkStream;
    41.     StreamWriter sw;
    42.     StreamReader sr;
    43.     Queue<Action> actions = new Queue<Action>();
    44.     public Thread _thread;
    45.     public string ircNick = "MyIrcNickName1";
    46.     public string channel = "unity3d";
    47.     bool started;
    48.     public void Start()
    49.     {
    50.         users = new string[] { };
    51.         if (started) return;
    52.         started = true;
    53.         Debug.Log("Irc Started");
    54.  
    55.         if (Trial  Application.platform != RuntimePlatform.WindowsEditor  Application.platform != RuntimePlatform.OSXEditor)
    56.             OnMessage("Disconnected:This is trial version you can use it only in Editor, Please donate 4$ to dorumonstr@gmail.com and i send you full open source");
    57.         else
    58.         {
    59.             _thread = new Thread(StartThread);
    60.             _thread.IsBackground = true;
    61.             _thread.Start();
    62.         }
    63.     }
    64.     void Connect()
    65.     {
    66.         OnMessage("Connecting");
    67.         if (enableSOCKS5)
    68.             _Socket = Proxy.Socks5Connect(SOCKS5Server, SOCKS5Port, host, port);
    69.         else
    70.             _Socket = new TcpClient(host, port);
    71.  
    72.         //if (enableSSL)
    73.         //    _NetworkStream = new SslStream(_Socket.GetStream());
    74.         //else
    75.         _NetworkStream = _Socket.GetStream();
    76.         sw = new StreamWriter(_NetworkStream, Encoding.Default);
    77.         sr = new StreamReader(_NetworkStream, Encoding.Default);
    78.         sw.AutoFlush = true;
    79.     }
    80.     public void Dispose()
    81.     {
    82.         if (_Socket != null)
    83.             _Socket.Close();
    84.         if (_thread != null)
    85.             _thread.Abort();
    86.     }
    87.     public void SendIrcMessage(string s)
    88.     {
    89.         if (sw != null)
    90.         {
    91.             OnMessage(ircNick + ": " + s);
    92.             sw.WriteLine("PRIVMSG #" + channel + " :" + s);
    93.         }
    94.         else
    95.             OnMessage("Not Connected");
    96.     }
    97.     public void SendIrcPrivateMessage(string u, string s)
    98.     {
    99.         if (sw != null)
    100.         {
    101.             OnPmMessage(u, ircNick +": " + s);
    102.             sw.WriteLine("PRIVMSG " + u + " :" + s);
    103.         }
    104.         else
    105.             OnPmMessage(u, "Not Connected");
    106.     }
    107.     void StartThread()
    108.     {
    109.         try
    110.         {
    111.             Connect();
    112.             Write(string.Format("NICK {0}", ircNick));
    113.             Write("USER " + user + " " + user2 + " server :" + about);
    114.             while (true)
    115.             {
    116.                 string s = sr.ReadLine();
    117.                 if(enableLog) Debug.Log(s);
    118.                 if (s == null || s == "") throw new Exception("string is null");
    119.                 if (Regex.Match(s, @":.+? 005").Success  !success)
    120.                 {
    121.                    
    122.                     Write("JOIN #" + channel);
    123.                     OnMessage("Connected");
    124.                     controller.OnConnected();
    125.                     success = true;
    126.                 }
    127.                 Match m;
    128.                 if ((m = Regex.Match(s, @"PING \:(\w+)", RegexOptions.IgnoreCase)).Success)
    129.                     Write(("PONG :" + m.Groups[1]));
    130.                 if ((m = Regex.Match(s, @"\:.+? 353 .+? = #(.+?) \:(.+)")).Success)
    131.                 {
    132.                     users = users.Union(m.Groups[2].Value.Trim().Split(' ').Select(a=>a.Trim('@'))).ToArray();
    133.                     success = true;
    134.                 }
    135.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PRIVMSG " + ircNick.Trim(new[]{ '@'}) + @" \:(.*)")).Success)
    136.                     OnPmMessage(m.Groups[1].Value, m.Groups[1].Value + ": " + m.Groups[2].Value);
    137.                 else
    138.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PRIVMSG .*? \:(.*)")).Success)
    139.                     OnMessage(m.Groups[1].Value + ": " + m.Groups[2].Value);
    140.  
    141.  
    142.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PART")).Success)
    143.                 {
    144.                     users = users.Where(a => !a.Contains(m.Groups[1].Value)).ToArray();
    145.                     OnMessage(m.Groups[1].Value + " leaved");
    146.                 }
    147.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? JOIN")).Success)
    148.                 {
    149.                     users = users.Union(new[] { m.Groups[1].Value }).ToArray();
    150.                     OnMessage(m.Groups[1].Value + " joined");
    151.                 }
    152.             }
    153.         }
    154.         catch (Exception e)
    155.         {
    156.             Debug.Log(e);
    157.             OnMessage("Disconnected:" + e);
    158.         }
    159.     }
    160.     public void Update()
    161.     {
    162.         if(actions.Count>0)
    163.             actions.Dequeue()();
    164.     }
    165.     void OnMessage(string m)
    166.     {
    167.         actions.Enqueue(delegate
    168.         {
    169.             if(controller!=null)
    170.                 controller.OnMessage(m);
    171.         });
    172.     }
    173.     void OnPmMessage(string u, string s)
    174.     {
    175.         actions.Enqueue(delegate
    176.         {
    177.             if(controller!=null)
    178.                 controller.OnPm(u, s);
    179.         });
    180.     }
    181.     void Write(string s)
    182.     {
    183.         if(enableLog) Debug.Log(s);
    184.         sw.WriteLine(s);
    185.     }
    186.    
    187.    
    188. }
    189. public static class Ext
    190. {
    191.     public static T[] ReverseA<T>(this T[] a)
    192.     {
    193.         return a.ReverseA(a.Length);
    194.     }
    195.     public static T[] ReverseA<T>(this T[] a, int len)
    196.     {
    197.         T[] b = new T[len];
    198.         for (int i = 0; i < len; i++)
    199.         {
    200.             b[a.Length - i - 1] = a[i];
    201.         }
    202.         return b;
    203.     }
    204.  
    205. }
    206. public static class Proxy
    207. {
    208.  
    209.     public static TcpClient Socks5Connect(string _proxyAddress, int _proxyPort, string _DestAddress, int _DestPort)
    210.     {
    211.         TcpClient _TcpClient = new TcpClient(_proxyAddress, _proxyPort);
    212.         Socket _Socket = _TcpClient.Client;
    213.         using (NetworkStream nw = new NetworkStream(_Socket))
    214.         {
    215.             BinaryReader sr = new BinaryReader(nw);
    216.             _Socket.Send(new byte[] { 5, 1, 0 });
    217.             byte[] _bytes = sr.ReadBytes(2);
    218.             Debug.Log("<<<<<<<socks5 received1>>>>>>>>");
    219.             if (_bytes[0] != 5  _bytes[1] != 1) throw new Exception();
    220.             using (MemoryStream _MemoryStream = new MemoryStream())
    221.             {
    222.                 BinaryWriter _BinaryWriter = new BinaryWriter(_MemoryStream);
    223.                 _BinaryWriter.Write(new byte[] {
    224.                     5, // version
    225.                     1, // tcp stream
    226.                     0, // reserved
    227.                     3 //type - domainname
    228.                 });
    229.                 _BinaryWriter.Write(_DestAddress);
    230.                 _BinaryWriter.Write(BitConverter.GetBytes((UInt16)_DestPort).ReverseA());
    231.                 _Socket.Send(_MemoryStream.ToArray());
    232.             }
    233.             Debug.Log("<<<<<<<<socks5 received2>>>>>>>>");
    234.             byte[] _response = sr.ReadBytes(10);
    235.             if (_response[1] != 0) throw new Exception("socket Error: " + _response[1]);
    236.             return _TcpClient;
    237.         }
    238.     }
    239. }
     
  3. gknight25

    gknight25

    Joined:
    Sep 20, 2009
    Posts:
    31
    Is there a way to have it so when multiple people are playing the game they can connect? because right now, only 1 user can connect because theyy all have the same User Name - Btw, I bought it anyways, even though its open source
     
  4. legomaple

    legomaple

    Joined:
    May 18, 2011
    Posts:
    4
    Hi, i'm getting this error:
    System.Security.SecurityException: Unable to connect, as no valid crossdomain policy was found
    at System.Net.Sockets.Socket.Connect_internal (IntPtr sock, System.Net.SocketAddress sa, System.Int32 error, Boolean requireSocketPolicyFile) [0x00000] in <filename unknown>:0
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
    at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
    at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x00000] in <filename unknown>:0

    I have no idea how this is happening, but tis only happens when i copy it from one project to another. Any settings i might have forgot to change?
     
  5. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    you need switch platform build settings->platform->standalone

    or use socks5 server
     
  6. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    yes just change User Name.
     
  7. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    98
    thanks for this :)
     
  8. pokdang

    pokdang

    Joined:
    Sep 1, 2011
    Posts:
    1
  9. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    82
  10. _zeta

    _zeta

    Joined:
    Dec 24, 2011
    Posts:
    99
  11. CipherCode

    CipherCode

    Joined:
    Apr 27, 2012
    Posts:
    1
  12. Berriez

    Berriez

    Joined:
    Jun 2, 2012
    Posts:
    1
  13. Don Goddard

    Don Goddard

    Joined:
    Sep 25, 2010
    Posts:
    21
    I bought your IRC Chat on the Asset Store and it's very nice. I had a problem when I tried to use it directly inside the Editor though.

    I uncommented the #define Editor variables in IrcGui.cs and IrcGuiBase.cs but it doesn't work. It compiles and shows up in the Window drop down but when you click on 'Irc Connect' the following error shows up in the console (first image). Then if I exit Unity and reload the project I get two major warnings (second image). This only happens when using the #define Editor directive.

    Perhaps the code up on the Asset Store is outdated? I'll send you a PM with my email if you have an update or, even better, an update to the one on the Asset Store would be much easier to grab.

    I'm using Unity 3.5.2f2 on Mac OS X

    Thanks!,

    Don
     

    Attached Files:

  14. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
  15. errichar

    errichar

    Joined:
    Dec 28, 2009
    Posts:
    2
  16. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
  17. cmrcmr

    cmrcmr

    Joined:
    Aug 28, 2012
    Posts:
    17
  18. silviufuicu

    silviufuicu

    Joined:
    Aug 12, 2012
    Posts:
    4
  19. cloudffseven39

    cloudffseven39

    Joined:
    Sep 1, 2012
    Posts:
    1
  20. rext

    rext

    Joined:
    Jul 20, 2012
    Posts:
    1
  21. jessica1986

    jessica1986

    Joined:
    Feb 7, 2012
    Posts:
    621
    what is the name, that i should keep of this script ?? its saying you have to derive from Monobehaviour

    Code (csharp):
    1. using System.Linq;
    2.  
    3. using UnityEngine;
    4.  
    5. using System;
    6.  
    7. using System.Collections.Generic;
    8.  
    9. using System.Text;
    10.  
    11. using System.Net.Sockets;
    12.  
    13. using System.Threading;
    14.  
    15. using System.IO;
    16.  
    17. using System.Text.RegularExpressions;
    18.  
    19. using Debug = UnityEngine.Debug;
    20.  
    21. public interface iIrc
    22.  
    23. {
    24.  
    25.     void OnPm(string user, string message);
    26.  
    27.     void OnMessage(string message);
    28.  
    29.     void OnConnected();
    30.  
    31. }
    32.  
    33. [Serializable]
    34.  
    35. public class Irc : IDisposable
    36.  
    37. {
    38.  
    39.     bool Trial = true;
    40.  
    41.     public bool enableLog = false;    
    42.  
    43.     public string[] users { get; set; }
    44.  
    45.     [UnityEngine.HideInInspector]
    46.  
    47.     public bool success { get; set; }
    48.  
    49.     [UnityEngine.HideInInspector]
    50.  
    51.     public string user = "UnityIrcChat";
    52.  
    53.     [UnityEngine.HideInInspector]
    54.  
    55.     public string user2 = "localhost";
    56.  
    57.     [UnityEngine.HideInInspector]
    58.  
    59.     public string about = "about";
    60.  
    61.     public string host = "irc.freenode.net";
    62.  
    63.     public int port = 6667;
    64.  
    65.     public bool enableSOCKS5;
    66.  
    67.     public string SOCKS5Server = "127.0.0.1";
    68.  
    69.     public int SOCKS5Port = 1080;  
    70.  
    71.     public iIrc controller;
    72.  
    73.     //bool enableSSL = false;
    74.  
    75.     TcpClient _Socket;
    76.  
    77.     Stream _NetworkStream;
    78.  
    79.     StreamWriter sw;
    80.  
    81.     StreamReader sr;
    82.  
    83.     Queue<Action> actions = new Queue<Action>();
    84.  
    85.     public Thread _thread;
    86.  
    87.     public string ircNick = "MyIrcNickName1";
    88.  
    89.     public string channel = "unity3d";
    90.  
    91.     bool started;
    92.  
    93.     public void Start()
    94.  
    95.     {
    96.  
    97.         users = new string[] { };
    98.  
    99.         if (started) return;
    100.  
    101.         started = true;
    102.  
    103.         Debug.Log("Irc Started");
    104.  
    105.  
    106.  
    107.         if (Trial  Application.platform != RuntimePlatform.WindowsEditor  Application.platform != RuntimePlatform.OSXEditor)
    108.  
    109.             OnMessage("Disconnected:This is trial version you can use it only in Editor, Please donate 4$ to dorumonstr@gmail.com and i send you full open source");
    110.  
    111.         else
    112.  
    113.         {
    114.  
    115.             _thread = new Thread(StartThread);
    116.  
    117.             _thread.IsBackground = true;
    118.  
    119.             _thread.Start();
    120.  
    121.         }
    122.  
    123.     }
    124.  
    125.     void Connect()
    126.  
    127.     {
    128.  
    129.         OnMessage("Connecting");
    130.  
    131.         if (enableSOCKS5)
    132.  
    133.             _Socket = Proxy.Socks5Connect(SOCKS5Server, SOCKS5Port, host, port);
    134.  
    135.         else
    136.  
    137.             _Socket = new TcpClient(host, port);
    138.  
    139.  
    140.  
    141.         //if (enableSSL)
    142.  
    143.         //    _NetworkStream = new SslStream(_Socket.GetStream());
    144.  
    145.         //else
    146.  
    147.         _NetworkStream = _Socket.GetStream();
    148.  
    149.         sw = new StreamWriter(_NetworkStream, Encoding.Default);
    150.  
    151.         sr = new StreamReader(_NetworkStream, Encoding.Default);
    152.  
    153.         sw.AutoFlush = true;
    154.  
    155.     }
    156.  
    157.     public void Dispose()
    158.  
    159.     {
    160.  
    161.         if (_Socket != null)
    162.  
    163.             _Socket.Close();
    164.  
    165.         if (_thread != null)
    166.  
    167.             _thread.Abort();
    168.  
    169.     }
    170.  
    171.     public void SendIrcMessage(string s)
    172.  
    173.     {
    174.  
    175.         if (sw != null)
    176.  
    177.         {
    178.  
    179.             OnMessage(ircNick + ": " + s);
    180.  
    181.             sw.WriteLine("PRIVMSG #" + channel + " :" + s);
    182.  
    183.         }
    184.  
    185.         else
    186.  
    187.             OnMessage("Not Connected");
    188.  
    189.     }
    190.  
    191.     public void SendIrcPrivateMessage(string u, string s)
    192.  
    193.     {
    194.  
    195.         if (sw != null)
    196.  
    197.         {
    198.  
    199.             OnPmMessage(u, ircNick +": " + s);
    200.  
    201.             sw.WriteLine("PRIVMSG " + u + " :" + s);
    202.  
    203.         }
    204.  
    205.         else
    206.  
    207.             OnPmMessage(u, "Not Connected");
    208.  
    209.     }
    210.  
    211.     void StartThread()
    212.  
    213.     {
    214.  
    215.         try
    216.  
    217.         {
    218.  
    219.             Connect();
    220.  
    221.             Write(string.Format("NICK {0}", ircNick));
    222.  
    223.             Write("USER " + user + " " + user2 + " server :" + about);
    224.  
    225.             while (true)
    226.  
    227.             {
    228.  
    229.                 string s = sr.ReadLine();
    230.  
    231.                 if(enableLog) Debug.Log(s);
    232.  
    233.                 if (s == null || s == "") throw new Exception("string is null");
    234.  
    235.                 if (Regex.Match(s, @":.+? 005").Success  !success)
    236.  
    237.                 {
    238.  
    239.                    
    240.  
    241.                     Write("JOIN #" + channel);
    242.  
    243.                     OnMessage("Connected");
    244.  
    245.                     controller.OnConnected();
    246.  
    247.                     success = true;
    248.  
    249.                 }
    250.  
    251.                 Match m;
    252.  
    253.                 if ((m = Regex.Match(s, @"PING \:(\w+)", RegexOptions.IgnoreCase)).Success)
    254.  
    255.                     Write(("PONG :" + m.Groups[1]));
    256.  
    257.                 if ((m = Regex.Match(s, @"\:.+? 353 .+? = #(.+?) \:(.+)")).Success)
    258.  
    259.                 {
    260.  
    261.                     users = users.Union(m.Groups[2].Value.Trim().Split(' ').Select(a=>a.Trim('@'))).ToArray();
    262.  
    263.                     success = true;
    264.  
    265.                 }
    266.  
    267.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PRIVMSG " + ircNick.Trim(new[]{ '@'}) + @" \:(.*)")).Success)
    268.  
    269.                     OnPmMessage(m.Groups[1].Value, m.Groups[1].Value + ": " + m.Groups[2].Value);
    270.  
    271.                 else
    272.  
    273.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PRIVMSG .*? \:(.*)")).Success)
    274.  
    275.                     OnMessage(m.Groups[1].Value + ": " + m.Groups[2].Value);
    276.  
    277.  
    278.  
    279.  
    280.  
    281.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? PART")).Success)
    282.  
    283.                 {
    284.  
    285.                     users = users.Where(a => !a.Contains(m.Groups[1].Value)).ToArray();
    286.  
    287.                     OnMessage(m.Groups[1].Value + " leaved");
    288.  
    289.                 }
    290.  
    291.                 if ((m = Regex.Match(s, @"\:(.+?)!.*? JOIN")).Success)
    292.  
    293.                 {
    294.  
    295.                     users = users.Union(new[] { m.Groups[1].Value }).ToArray();
    296.  
    297.                     OnMessage(m.Groups[1].Value + " joined");
    298.  
    299.                 }
    300.  
    301.             }
    302.  
    303.         }
    304.  
    305.         catch (Exception e)
    306.  
    307.         {
    308.  
    309.             Debug.Log(e);
    310.  
    311.             OnMessage("Disconnected:" + e);
    312.  
    313.         }
    314.  
    315.     }
    316.  
    317.     public void Update()
    318.  
    319.     {
    320.  
    321.         if(actions.Count>0)
    322.  
    323.             actions.Dequeue()();
    324.  
    325.     }
    326.  
    327.     void OnMessage(string m)
    328.  
    329.     {
    330.  
    331.         actions.Enqueue(delegate
    332.  
    333.         {
    334.  
    335.             if(controller!=null)
    336.  
    337.                 controller.OnMessage(m);
    338.  
    339.         });
    340.  
    341.     }
    342.  
    343.     void OnPmMessage(string u, string s)
    344.  
    345.     {
    346.  
    347.         actions.Enqueue(delegate
    348.  
    349.         {
    350.  
    351.             if(controller!=null)
    352.  
    353.                 controller.OnPm(u, s);
    354.  
    355.         });
    356.  
    357.     }
    358.  
    359.     void Write(string s)
    360.  
    361.     {
    362.  
    363.         if(enableLog) Debug.Log(s);
    364.  
    365.         sw.WriteLine(s);
    366.  
    367.     }
    368.  
    369.    
    370.  
    371.    
    372.  
    373. }
    374.  
    375. public static class Ext
    376.  
    377. {
    378.  
    379.     public static T[] ReverseA<T>(this T[] a)
    380.  
    381.     {
    382.  
    383.         return a.ReverseA(a.Length);
    384.  
    385.     }
    386.  
    387.     public static T[] ReverseA<T>(this T[] a, int len)
    388.  
    389.     {
    390.  
    391.         T[] b = new T[len];
    392.  
    393.         for (int i = 0; i < len; i++)
    394.  
    395.         {
    396.  
    397.             b[a.Length - i - 1] = a[i];
    398.  
    399.         }
    400.  
    401.         return b;
    402.  
    403.     }
    404.  
    405.  
    406.  
    407. }
    408.  
    409. public static class Proxy
    410.  
    411. {
    412.  
    413.  
    414.  
    415.     public static TcpClient Socks5Connect(string _proxyAddress, int _proxyPort, string _DestAddress, int _DestPort)
    416.  
    417.     {
    418.  
    419.         TcpClient _TcpClient = new TcpClient(_proxyAddress, _proxyPort);
    420.  
    421.         Socket _Socket = _TcpClient.Client;
    422.  
    423.         using (NetworkStream nw = new NetworkStream(_Socket))
    424.  
    425.         {
    426.  
    427.             BinaryReader sr = new BinaryReader(nw);
    428.  
    429.             _Socket.Send(new byte[] { 5, 1, 0 });
    430.  
    431.             byte[] _bytes = sr.ReadBytes(2);
    432.  
    433.             Debug.Log("<<<<<<<socks5 received1>>>>>>>>");
    434.  
    435.             if (_bytes[0] != 5  _bytes[1] != 1) throw new Exception();
    436.  
    437.             using (MemoryStream _MemoryStream = new MemoryStream())
    438.  
    439.             {
    440.  
    441.                 BinaryWriter _BinaryWriter = new BinaryWriter(_MemoryStream);
    442.  
    443.                 _BinaryWriter.Write(new byte[] {
    444.  
    445.                     5, // version
    446.  
    447.                     1, // tcp stream
    448.  
    449.                     0, // reserved
    450.  
    451.                     3 //type - domainname
    452.  
    453.                 });
    454.  
    455.                 _BinaryWriter.Write(_DestAddress);
    456.  
    457.                 _BinaryWriter.Write(BitConverter.GetBytes((UInt16)_DestPort).ReverseA());
    458.  
    459.                 _Socket.Send(_MemoryStream.ToArray());
    460.  
    461.             }
    462.  
    463.             Debug.Log("<<<<<<<<socks5 received2>>>>>>>>");
    464.  
    465.             byte[] _response = sr.ReadBytes(10);
    466.  
    467.             if (_response[1] != 0) throw new Exception("socket Error: " + _response[1]);
    468.  
    469.             return _TcpClient;
    470.  
    471.         }
    472.  
    473.     }
    474.  
    475. }
     
  22. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Is there a reason why when I put in a username then connect, I get a full black screen? I can't after...
     
  23. jessica1986

    jessica1986

    Joined:
    Feb 7, 2012
    Posts:
    621
    can, can any1 reply me on this ?
     
  24. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    This response is probably useless, but it atleast shows that people in this thread are getting the email updates as I am. I have a problem too obviously, and the asset is useless to me ATM, but I still haven't got any help...
     
  25. unityasoft

    unityasoft

    Joined:
    Oct 28, 2011
    Posts:
    263
    Bought it a while ago, completely useless.
     
  26. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    not entirely useless!

    I purchased this off the asset store and it works despite not taking dev work to far on this
    I have on a few occasions log'd into freenet.net and conversed in #channel and even watched the server status window.
     
  27. opejohndammy

    opejohndammy

    Joined:
    Sep 29, 2012
    Posts:
    1
  28. txasti

    txasti

    Joined:
    Oct 26, 2010
    Posts:
    10
  29. fieldztime

    fieldztime

    Joined:
    Sep 1, 2012
    Posts:
    13
    hi dear!!!!! please may i take a look, can you send me? fieldztime@hotmail.com, i will try in a project , if its great like its seems, i will be really willing donating! many thanks for your great idea!
     
  30. look123124

    look123124

    Joined:
    Nov 13, 2012
    Posts:
    1
  31. Potumba

    Potumba

    Joined:
    Oct 25, 2012
    Posts:
    1
    i need to connect to IRC server from Unity :) can some1 tell me how would i do that

    and i hope im not too late for this too heres my email : Po7umba@gmail.com
     
  32. gfxguru

    gfxguru

    Joined:
    Jun 5, 2010
    Posts:
    107
  33. gfxguru

    gfxguru

    Joined:
    Jun 5, 2010
    Posts:
    107
  34. Hybrid1969

    Hybrid1969

    Joined:
    Apr 19, 2013
    Posts:
    31
  35. GrandMasterHsu

    GrandMasterHsu

    Joined:
    Jul 5, 2012
    Posts:
    50
  36. Lachee1

    Lachee1

    Joined:
    Aug 21, 2012
    Posts:
    16
    Wow! This looks great! It's just what I need :D

    lachee@lacheedomain.netii.net

    Thanks so much! Also, side note, why don't you just create a download link? You could always use mediafire if you have no upload space.
     
  37. ravindra123

    ravindra123

    Joined:
    Nov 21, 2012
    Posts:
    7
  38. Motoko

    Motoko

    Joined:
    Apr 4, 2013
    Posts:
    1
  39. Murthy_Dumadu

    Murthy_Dumadu

    Joined:
    May 17, 2013
    Posts:
    33
  40. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    Why don't you just upload this instead of asking everyone to post their email adress on a public forum?
     
  41. SeptianG

    SeptianG

    Joined:
    Dec 30, 2013
    Posts:
    8
    Anyone still have the source?
     
  42. Milad-Fathi

    Milad-Fathi

    Joined:
    Nov 9, 2012
    Posts:
    32
    Ohh ... Man !
    I really need it, Pls send it to mail.miladfathi[at]rayana.ir
    put @ instead of [at]

    Thank you so much
     
  43. joosenWPL

    joosenWPL

    Joined:
    Mar 13, 2014
    Posts:
    4
    Like iT!

    Could you please send it to: bjornjoosen[at]gmail.com :D

    Thanks!!
     
  44. mc.jhedk

    mc.jhedk

    Joined:
    Jul 10, 2014
    Posts:
    1
  45. MaxDe

    MaxDe

    Joined:
    Sep 9, 2014
    Posts:
    1
  46. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
  47. wolfned

    wolfned

    Joined:
    Nov 6, 2014
    Posts:
    1
  48. swapnild2

    swapnild2

    Joined:
    Dec 14, 2014
    Posts:
    1
  49. Ankit-Priyarup

    Ankit-Priyarup

    Joined:
    Mar 7, 2013
    Posts:
    52
  50. FerhatSener

    FerhatSener

    Joined:
    Jul 8, 2014
    Posts:
    2