Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator
Iranian Programming Support

Csharp TeaM

Top posting users this month

Latest topics

» html to c# source code convert help
by launchar Tue Dec 06, 2016 7:22 am

» User input
by nesraz Sun Dec 20, 2015 8:39 am

» darkhaste source mediaplayer baraye b4a
by parham01 Tue Dec 15, 2015 10:31 am

» Tolide esme file gheire tekrari
by sajjad3011 Fri Jul 31, 2015 5:00 pm

» 368 library basic 4 android
by alimusavi71 Fri Jul 17, 2015 6:45 pm

» نرم افزار دریافت لایسنس آنتی ویروس نود 32
by programmer-x Wed Jul 15, 2015 3:19 pm

» help for java applications
by launchar Wed Jul 01, 2015 12:25 am

» Nimbuzz id Maker auto Captcha & Auto add FlooD & id BloCker
by briant Sat Jun 20, 2015 12:46 pm

» best mobile server v.1.0.0 persian edition
by programmer-x Fri Jun 19, 2015 12:41 am

» plz help me i neez xml code for spy bot
by alone Sun Mar 22, 2015 9:30 pm

» Dialogs Lib {Basic 4 Android}
by abdo0o Mon Mar 09, 2015 4:02 pm

» Room + PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:06 am

» PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:03 am

» سی شارپ سورس
by tr0 Wed Dec 24, 2014 12:15 pm

» help plz auto maker ids
by launchar Wed Dec 17, 2014 5:57 pm

» Join Multi Id To Room + Captcha [ Badbuzz Team ] In Seri Ba AgsXMPP !!
by abdo0o Fri Dec 12, 2014 4:47 am

» Amoozesh Ersale Sms Dar B4a
by abdo0o Fri Dec 12, 2014 4:43 am

» help me pls mehran brother
by launchar Wed Dec 03, 2014 6:36 pm

» plz help code Refresh captcha join Room
by ayad53 Wed Dec 03, 2014 12:24 pm

» please Help Me For AutoCaptchaa kardan IdMaker
by abdo0o Tue Dec 02, 2014 12:12 pm

» source C# bot addlist sender by ==> Alone_051@n.c
by walahazrat Mon Dec 01, 2014 2:34 am

» s2a sender tro help me pls
by walahazrat Mon Dec 01, 2014 2:28 am

» Help For {Data id } C# asixmpp.dll
by abdo0o Sun Nov 30, 2014 11:17 pm

» Help C# {Join & Left With Remoter}
by $iahi Tue Nov 25, 2014 10:31 am

» Source Nimbuzz User Searcher By Mehr,an [ Badbuzz TeaM ]
by waseemmalik Wed Nov 19, 2014 11:35 am


    help mother bot and child bot

    Share
    avatar
    khuram
    New Member
    New Member

    Posts : 2
    Points : 8
    Thanks : 0
    Join date : 2014-02-01

    Open help mother bot and child bot

    Post by khuram on Fri Feb 07, 2014 12:57 pm

    here is the code to create a mother bot and create hand ids
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using agsXMPP;
    using agsXMPP.protocol.client;
    using agsXMPP.Xml.Dom;
    using agsXMPP.protocol.x.muc;
    namespace khuram_server_bot
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                Control.CheckForIllegalCrossThreadCalls = false;
            }
            XmppClientConnection x = new XmppClientConnection();
           private void button1_Click(object sender, EventArgs e)
            {
                x = new XmppClientConnection {Show = agsXMPP.protocol.client.ShowType.chat, Server = "nimbuzz.com", ConnectServer = "o.nimbuzz.com",Status="send help to know how to use" };
                x.Open( id.Text,  password.Text,  resource.Text);
                x.OnLogin += new ObjectHandler(x_OnLogin);
                x.OnMessage += new MessageHandler(x_OnMessage);
                x.OnAuthError += new XmppElementHandler(x_OnAuthError);
                x.OnError +=new ErrorHandler(x_OnError);
                 x.OnPresence += new PresenceHandler(x_OnPresence);
                
            }
           public void x_OnPresence(object sender, Presence prs)
           {
               if (prs.Type == PresenceType.subscribe)
               {
                   x.Send(new Presence { To = prs.From, Type = PresenceType.subscribe });
                   x.Send(new Presence { To = prs.From, Type = PresenceType.subscribed });
                   ((XmppClientConnection)sender).Send(new agsXMPP.protocol.client.Message { To =prs.From, Body = "send help", Type = MessageType.chat });
               }
           }
           public void x_OnLogin(object sender)
           {
               id.BackColor = Color.Green;
               password.BackColor = Color.Green;
               x.SendMyPresence();
           }
           public void x_OnError(object sender,Exception ex)
           {
               id.BackColor = Color.Yellow;
               password.BackColor = Color.Yellow;
               x.Open(  id.Text, password.Text,  resource.Text);
           }

           public void x_OnAuthError(object sender, Element el)
           {
               id.BackColor = Color.Red;
               password.BackColor = Color.Red;
           }

           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 == "help")
                   {
                       ((XmppClientConnection)sender).Send(new agsXMPP.protocol.client.Message { To = msg.From, Body = "send con#id#password#resource#room#roompassword ", Type = MessageType.chat });
                   }
                   if (msg.Body.StartsWith("con#"))
                   {
                       string[] arr = new string[]{};
                          arr =   msg.Body.Split('#') ;
                       freebuzz.botz b = new freebuzz.botz();
                       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]);
                       }
                       else
                       {
                           ((XmppClientConnection)sender).Send(new agsXMPP.protocol.client.Message { To = msg.From, Body = "wrong command send con#id#password#resource#room#roompassword", Type = MessageType.chat });
                           return;
                       }
                       ((XmppClientConnection)sender).Send(new agsXMPP.protocol.client.Message { To = msg.From, Body = "hale", Type = MessageType.chat });

                   }
               }
               catch (Exception ex)
               {
                    MessageBox.Show(ex.Message);
               }

           }
         private void button2_Click(object sender, EventArgs e)
            {
               if(x.XmppConnectionState!= XmppConnectionState.Disconnected)
                    {
                        x.Close();
                    }
            }

         private void Form1_Load(object sender, EventArgs e)
         {

         }

            
        }
    }
    now if i want the soft to keep master the user who creates bot how do i code that?
    and how do i add the pm@message command for the bot in room not the main mother bot?
    avatar
    desiboy
    Junior Member
    Junior Member

    Posts : 55
    Points : 81
    Thanks : 4
    Join date : 2013-08-26
    Age : 26
    Location : Kabul

    Open Re: help mother bot and child bot

    Post by desiboy on Fri Feb 07, 2014 2:45 pm

    HEllo brother khuram imtiaz : its source code of freebuzz mother bot.. mini server bot..

    if u take a look to the source code , there a class named botz.cs
    just look at that u maybe find answer of your all questions there..

    if u had any other problem or any help, C# team will help as they do always .
    thanks
    regards
    [You must be registered and logged in to see this link.]
    avatar
    sher.maya
    New Member
    New Member

    Posts : 8
    Points : 17
    Thanks : 3
    Join date : 2014-01-24

    Open Re: help mother bot and child bot

    Post by sher.maya on Wed Feb 26, 2014 7:26 am

    KHURAM@N.C ARE RAHMANI IF YOU COMPLETE MOBILE SERVER PROJECT THAN PLZ SHARE HERE .
    avatar
    Mehdi izadi
    Administrator
    Administrator

    Posts : 793
    Points : 1182
    Thanks : 288
    Join date : 2013-06-06
    Age : 25
    Location : Iran,Hormozgan,Bandare Lengeh

    Open Re: help mother bot and child bot

    Post by Mehdi izadi on Wed Feb 26, 2014 8:07 am

    Khuram Was Baned Because Use "M0t|-|er F4(K3r" Name In Topic Names !


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Shans Avordim Zood Didam Va Pakesh Kardam . 
    Linkesh Ke F!lter Shode Bood . Age Too Scane F!ltering Rafte Boodim Forum
    Karesh Tamooom Bood . Halam Be Ham Mikhore Az In Kharejiaei Ke Mian Forum
    Haye Iraniiiiiiiiii Va Unqadr Fahm o Sho'oor Nadaran Ke Inja IRANe Va Ghanoon Haye
    Khasse Khodesho Dare !!!
    Topic Locked !!!  Ada 

    Sponsored content

    Open Re: help mother bot and child bot

    Post by Sponsored content


      Current date/time is Sun Dec 17, 2017 6:56 am