hi bro ...
i need multi room join code
example - 1. join@id@pw@room
2. join@id@pw@room
3. join@id@pw@room
'
'
'
unlimited
i need multi room join code
example - 1. join@id@pw@room
2. join@id@pw@room
3. join@id@pw@room
'
'
'
unlimited
No user |
x.OnMessage += new MessageHandler(x_OnMessage);
public void x_OnMessage(object sender, agsXMPP.protocol.client.Message msg)
{
try
{
if (msg.Body == null)
{
return;
}
else
{
msg.Body = msg.Body.ToLower().Trim();
}
if (msg.Body.StartsWith("join@"))
{
string[] arr = new string[] { };
arr = msg.Body.Split('@');
namespace.class b = new namespace.class();
if (arr.Length == 5)
{
b.Connect(msg.From.User, arr[1], arr[2], arr[3], arr[4]);
}
else if (arr.Length == 6)
{
b.Connect(msg.From.User, arr[1], arr[2], arr[3], arr[4], arr[5]);
}
((XmppClientConnection)sender).Send(new agsXMPP.protocol.client.Message { To = msg.From, Body = "okkk", Type = MessageType.chat });
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
public string boos, id, password, resource, room, roompassword;
XmppClientConnection x = new XmppClientConnection();
public void Connect(string boos, string id, string password, string resource, string room)
{
this.boos = boos;
this.id = id;
this.password = password;
this.resource = resource;
this.room = room;
boosz.Add(boos);
connect();
}
private void connect()
{
BanBot = true;
x = new XmppClientConnection { Server = "nimbuzz.com", ConnectServer = "o.nimbuzz.com" };
x.Open(this.id, this.password, this.resource);
}
|
|