Permalink
Browse files

Namespace changes and little additions

  • Loading branch information...
1 parent 1c7fa3c commit 5deb4862287226cd8ce219360c61ca0d392b9583 @netonjm netonjm committed Oct 31, 2012
View
@@ -2,5 +2,6 @@
/XBSlink.userprefs
XBSlink/obj
XBSlink/bin
+_ReSharper.XBSlink/
/*.suo
/*.userprefs
View
@@ -11,6 +11,7 @@
using SharpPcap.WinPcap;
using NDesk.Options;
using System.Runtime.InteropServices;
+using XBSlink.Common;
using XBSlink.Properties;
namespace XBSlink
View
@@ -38,6 +38,7 @@
using SharpPcap.LibPcap;
using SharpPcap.WinPcap;
using MiscUtil.Conversion;
+using XBSlink.Common;
using XBSlink.Properties;
using System.ServiceModel.Syndication;
using System.Xml;
View
@@ -3,7 +3,7 @@
using System.Linq;
using System.Text;
-namespace XBSlink
+namespace XBSlink.Common
{
public class xbs_cloud
{
View
@@ -29,6 +29,7 @@
using System.Web;
using System.Threading;
using System.Security.Cryptography;
+using XBSlink.Common;
namespace XBSlink
{
@@ -27,6 +27,7 @@
using System.Net.Sockets;
using System.Threading;
using PacketDotNet;
+using XBSlink.Common;
using XBSlink.XlinkKai;
namespace XBSlink
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace XBSlink.XlinkKai
+namespace XBSlink.Common
{
public class xlink_client_messages_helper
{
@@ -40,11 +40,18 @@ private static string GetStrFromArrayClouds(xbs_cloud[] clouds)
public static string[] KAY_GET_USER_JOIN_TO_VECTOR(string username)
{
-
return new string[] {
KAI_CLIENT_JOINS_VECTOR(username),KAI_CLIENT_JOINS_CHAT(username)
};
-
+ }
+
+
+ public static string[] KAY_GET_USER_JOIN_TO_VECTOR(string username, string client_version, string last_ping_delay_ms)
+ {
+ return new string[] {
+ KAI_CLIENT_JOINS_VECTOR(username,client_version,last_ping_delay_ms),KAI_CLIENT_JOINS_CHAT(username,client_version,last_ping_delay_ms)
+ };
+
}
public static string[] KAY_GET_LEAVE_USER_FROM_VECTOR(string username)
@@ -118,6 +125,11 @@ public static string KAI_CLIENT_ADD_CONTACT(string username)
return xlink_msg.getHeaderMessageFromType(xlink_msg.xbs_xlink_message_type.KAI_CLIENT_ADD_CONTACT) + String.Format("{0};", username);
}
+ public static string KAI_CLIENT_JOINS_VECTOR(string username, string client_version, string last_ping_delay_ms)
+ {
+ return xlink_msg.getHeaderMessageFromType(xlink_msg.xbs_xlink_message_type.KAI_CLIENT_JOINS_VECTOR) + String.Format("{0};{1};{2};", username, client_version, last_ping_delay_ms);
+ }
+
public static string KAI_CLIENT_JOINS_VECTOR(string username)
{
return xlink_msg.getHeaderMessageFromType(xlink_msg.xbs_xlink_message_type.KAI_CLIENT_JOINS_VECTOR) + String.Format("{0};", username);
@@ -128,6 +140,12 @@ public static string KAI_CLIENT_JOINS_CHAT(string username)
return xlink_msg.getHeaderMessageFromType(xlink_msg.xbs_xlink_message_type.KAI_CLIENT_JOINS_CHAT) + String.Format("General Chat;{0};", username);
}
+ public static string KAI_CLIENT_JOINS_CHAT(string username, string client_version, string last_ping_delay_ms)
+ {
+ return xlink_msg.getHeaderMessageFromType(xlink_msg.xbs_xlink_message_type.KAI_CLIENT_JOINS_CHAT) + String.Format("General Chat;{0};{1};{2};", username, client_version,last_ping_delay_ms);
+ }
+
+
#endregion
#region KAYCLIENT
@@ -3,6 +3,7 @@
using System.Linq;
using System.Net;
using System.Text;
+using XBSlink.Common;
namespace XBSlink.XlinkKai.Delegates.Consoles
@@ -4,7 +4,7 @@
using System.Text;
using System.Net;
-namespace XBSlink.XlinkKai
+namespace XBSlink.Common
{
public class xlink_msg
@@ -5,6 +5,7 @@
using System.Net;
using System.Net.Sockets;
using System.Threading;
+using XBSlink.Common;
using XBSlink.XlinkKai.Delegates.Clients;
using XBSlink.XlinkKai.Delegates.Consoles;
@@ -404,7 +405,7 @@ public void XBS_LeaveUser(xlink_msg udp_msg,string username)
public void XBS_JoinUser(xlink_msg udp_msg,string username, string client_version, string last_ping_delay_ms)
{
- SendMessageToQueue(udp_msg, xlink_client_messages_helper.KAY_GET_USER_JOIN_TO_VECTOR(username));
+ SendMessageToQueue(udp_msg, xlink_client_messages_helper.KAY_GET_USER_JOIN_TO_VECTOR(username, client_version, last_ping_delay_ms));
}
#endregion
@@ -4,6 +4,7 @@
using System.Text;
using System.Net;
using System.Threading;
+using XBSlink.Common;
namespace XBSlink.XlinkKai

0 comments on commit 5deb486

Please sign in to comment.