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! help! help! Bot Filters C#

    Share
    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Help! help! help! Bot Filters C#

    Post by zaira on Mon Jun 16, 2014 9:45 am

    Salam All  Smile 

    Can anyone help me creating bot filters like message filter,resource filter,username filter,message length filter,resource length filter ??



     Hiss


    Last edited by zaira on Wed Jun 18, 2014 7:52 am; edited 1 time in total
    avatar
    Mehran Mahmoudi
    Administrator
    Administrator

    Posts : 485
    Points : 780
    Thanks : 194
    Join date : 2013-09-06
    Age : 19
    Location : Iran , Qazvin , Qazvin

    Open Replay

    Post by Mehran Mahmoudi on Wed Jun 18, 2014 11:29 am

    Hi
    Message Filter (OnMessage Event):
    Code:
    if(msg.Body.ToLower().Contains("filtered word"))

    resource filter (OnPresence Event):
    Code:
    if(pres.MucUser.Item.Jid.Resource.ToLower().Contains("filtered word"))

    username filter(OnPresence Event):
    Code:
    if(pres.MucUser.Item.Jid.User.ToLower().Contains("filtered word"))

    message length filter (OnMessage Event):
    Code:
    if(msg.Body.Length > 50)

    resource length filter (OnPresence Event):
    Code:
    if(pres.MucUser.Item.Jid.Resource.Length > 50)

    Do you want these???
    if you want something else, just reply in this topic.
    Good Luck






    Anjomane Barname Nevisane Basic4Android
    __

    [You must be registered and logged in to see this link.]

    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Wed Jun 18, 2014 12:31 pm

    Meran wrote:Hi
    Message Filter (OnMessage Event):

    Code:
    if(msg.Body.ToLower().Contains("filtered word"))


    resource filter (OnPresence Event):

    Code:
    if(pres.MucUser.Item.Jid.Resource.ToLower().Contains("filtered word"))


    username filter(OnPresence Event):

    Code:
    if(pres.MucUser.Item.Jid.User.ToLower().Contains("filtered word"))


    message length filter (OnMessage Event):

    Code:
    if(msg.Body.Length > 50)


    resource length filter (OnPresence Event):

    Code:
    if(pres.MucUser.Item.Jid.Resource.Length > 50)


    Do you want these???
    if you want something else, just reply in this topic.
    Good Luck

    Yes meran jan i want to create filters in bot
    like in textBox i put censor words like Zara#zaira#usa#room etc
    resource like Nimbuzz_zaira702#Nimbuzz_zaira253# message length like 100 words.

    and how to set message length limit by remote command.

    The bot must ban on these events.

    Thanks for further Information. HELP 
    avatar
    Mehran Mahmoudi
    Administrator
    Administrator

    Posts : 485
    Points : 780
    Thanks : 194
    Join date : 2013-09-06
    Age : 19
    Location : Iran , Qazvin , Qazvin

    Open Re: Help! help! help! Bot Filters C#

    Post by Mehran Mahmoudi on Wed Jun 18, 2014 2:34 pm

    Hi
    For check all filtered words in body, you can use from this method:
    Code:
    bool isFiltered(string body)
            {
                string[] words = textBox1.Text.Split(new char[]{'#'});
                bool forReturn=false;
                for (int i = 0; i < words.Length; i++)
                    if (body.ToLower().Contains(words[i].ToLower()))
                        forReturn = true;
                return forReturn;
            }
    textbox1 = filtered words splitted via #
    now maybe you ask this question from yourself !! how to use that method??
    example:
    Code:
    bool filter =isFiltered(msg.Body)
    if filter = true, it means in message body has a bad word that you filtered !! else if message body hasnt bad word.
    for set messale length limit by remote command:
    create an int in your form's class:
    Code:
    int msgLimit=0;
    Code:
    if(msg.Body.ToLower().StartsWith("ml#"))
    {
    msgLimit = int.Parse(msg.Body.Remove(0,3));
    }
    for check that remoter entered a digit after 'ml#' use from this method:
    Code:
    bool isCMDDigit(string forCheck)
    {
    bool myBool = true;
                                    for (int b = 0; b < forCheck.Length; b++)
                                    {
                                        if (char.IsNumber(forCheck, b) == false)
                                        {
                                            myBool = false;
                                            break;
                                        }
                                    }
    return myBool;
    }
    how to use??? :
    Code:
    bool isDigitTyped = isCMDDigit(msg.Body.Remove(0,3));
    if isDigitTyped = true ,after 'ml#' , remoter entered digit(s) ,else entered a char or string or ...

    for ban, you can use mucManager o xml.
    Sorry my english language isnt very good Khande
    Good Luck






    Anjomane Barname Nevisane Basic4Android
    __

    [You must be registered and logged in to see this link.]

    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Wed Jun 18, 2014 2:37 pm

    Meran wrote:Hi
    For check all filtered words in body, you can use from this method:

    Code:
    bool isFiltered(string body)
            {
                string[] words = textBox1.Text.Split(new char[]{'#'});
                bool forReturn=false;
                for (int i = 0; i < words.Length; i++)
                    if (body.ToLower().Contains(words[i].ToLower()))
                        forReturn = true;
                return forReturn;
            }

    textbox1 = filtered words splitted via #
    now maybe you ask this question from yourself !! how to use that method??
    example:

    Code:
    bool filter =isFiltered(msg.Body)

    if filter = true, it means in message body has a bad word that you filtered !! else if message body hasnt bad word.
    for set messale length limit by remote command:
    create an int in your form's class:

    Code:
    int msgLimit=0;

    Code:
    if(msg.Body.ToLower().StartsWith("ml#"))
    {
    msgLimit = int.Parse(msg.Body.Remove(0,3));
    }

    for check that remoter entered a digit after 'ml#' use from this method:

    Code:
    bool isCMDDigit(string forCheck)
    {
    bool myBool = true;
                                    for (int b = 0; b < forCheck.Length; b++)
                                    {
                                        if (char.IsNumber(forCheck, b) == false)
                                        {
                                            myBool = false;
                                            break;
                                        }
                                    }
    return myBool;
    }

    how to use??? :

    Code:
    bool isDigitTyped = isCMDDigit(msg.Body.Remove(0,3));

    if isDigitTyped = true ,after 'ml#' , remoter entered digit(s) ,else entered a char or string or ...

    for ban, you can use mucManager o xml.
    Sorry my english language isnt very good Khande
    Good Luck


    Thank You Very Much Friend Boos Cheshmak 
    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Thu Jun 19, 2014 5:02 am

    meran jan there is a error in username filter

    Code:
    private void us_filter(object sender, agsXMPP.protocol.client.Presence pres)
            {
                if (InvokeRequired)
                {
                    BeginInvoke(new agsXMPP.protocol.client.PresenceHandler(us_filter), new object[] { sender, pres });
                    return;
                }
                else
                {
                    if (pres.Type == PresenceType.available)
                    {
                        if (checkBoxX10.Checked)
                        {
                            string[] usfilter = textBox16.Text.Split(new char[] { '#' });
                            for (int i = 0; i < usfilter.Length; i++)
                            {
                                if (pres.MucUser.Item.Jid.User.ToLower().Contains(usfilter[i]))
                                {
                                    bot.Send("<iq to='" + textBox3.Text + "@conference.nimbuzz.com' type='set'><query xmlns='http://jabber.org/protocol/muc#admin'><item affiliation='outcast' jid='" + usfilter[i] + "@nimbuzz.com' /></query></iq>");
                                    return;
                                }
                            }
                        }
                    }
                }
            }


    It makes ban all

    PLz help in username filter Sad 
    avatar
    Mehran Mahmoudi
    Administrator
    Administrator

    Posts : 485
    Points : 780
    Thanks : 194
    Join date : 2013-09-06
    Age : 19
    Location : Iran , Qazvin , Qazvin

    Open Re: Help! help! help! Bot Filters C#

    Post by Mehran Mahmoudi on Thu Jun 19, 2014 6:12 am

    Hi
    Please wait...
    i want time to think about this...
    I will answer to you soon!






    Anjomane Barname Nevisane Basic4Android
    __

    [You must be registered and logged in to see this link.]

    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Thu Jun 19, 2014 6:13 am

    ok em wait meran Smile 
    avatar
    Mehran Mahmoudi
    Administrator
    Administrator

    Posts : 485
    Points : 780
    Thanks : 194
    Join date : 2013-09-06
    Age : 19
    Location : Iran , Qazvin , Qazvin

    Open Re: Help! help! help! Bot Filters C#

    Post by Mehran Mahmoudi on Thu Jun 19, 2014 7:03 am

    Hi
    Add reference > Microsoft.VisualBasic;
    Code:
    using Microsoft.VisualBasic;
    Code:
    private void us_filter(object sender, agsXMPP.protocol.client.Presence pres)
            {
                if (InvokeRequired)
                {
                    BeginInvoke(new agsXMPP.protocol.client.PresenceHandler(us_filter), new object[] { sender, pres });
                    return;
                }
                else
                {
                    if (pres.Type == PresenceType.available)
                    {
                        if (checkBoxX10.Checked)
                        {
                            string[] usfilter = textBox16.Text.Split(new char[] { '#' });
                            for (int i = 0; i < usfilter.Length; i++)
                            {
    if (Strings.InStr(pres.MucUser.Item.Jid.User, usfilter[i], CompareMethod.Text) != 0)
                                {
                                    bot.Send("<iq to='" + textBox3.Text + "@conference.nimbuzz.com' type='set'><query xmlns='http://jabber.org/protocol/muc#admin'><item affiliation='outcast' jid='" +  pres.MucUser.Item.Jid.User+ "@nimbuzz.com' /></query></iq>");
                                    break;
                                }
                            }
                        }
                    }
                }
            }
    Use it for resource filter,too.
    Good Luck






    Anjomane Barname Nevisane Basic4Android
    __

    [You must be registered and logged in to see this link.]

    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Thu Jun 19, 2014 10:21 am

    tx meran  Cheshmak Boos 
    avatar
    zaira
    Junior Member
    Junior Member

    Posts : 70
    Points : 106
    Thanks : 0
    Join date : 2014-06-16

    Open Re: Help! help! help! Bot Filters C#

    Post by zaira on Thu Jun 19, 2014 11:17 am

    meran jan help in remote error



    Code:
    if (msg.Body != null && msg.Body.ToLower().Contains("photo#"))
                                {
                                    try
                                    {
                                        string str9 = msg.Body.ToLower().Replace("photo#", "") + "%40nimbuzz.com";
                                       bot.Send("<message to='" + textBox3.Text + "@conference.nimbuzz.com' type='groupchat'><body>avatar link\nhttp://avatar.nimbuzz.com/getAvatar?jid=" + str9 + "</body></message>");
                                        return;
                                    }
                                    catch
                                    {
                                    }
                                }


    photo#id command makes owner id  lal


    How To Make member list clear by clear#mem
    avatar
    Mehran Mahmoudi
    Administrator
    Administrator

    Posts : 485
    Points : 780
    Thanks : 194
    Join date : 2013-09-06
    Age : 19
    Location : Iran , Qazvin , Qazvin

    Open Re: Help! help! help! Bot Filters C#

    Post by Mehran Mahmoudi on Thu Jun 19, 2014 3:51 pm

    Hi
    One of your 'if' at on message event is:
    Code:
    if(msg.Body.ToLower().Contains("o#"))
    hum?? that makes owner id !!
    so.... photo# also contains o# !!!!!!
    so its work wrongly, edit command like this:
    Code:
    if (msg.Body != null && msg.Body.ToLower().StartsWith("photo#"))

    NOTE: Never use 'contains' for bot commands !!
    ----
    How To Make member list clear by clear#mem
    First get the members list, then remove them Khande Khande its very easy, but i havent time to code and give it to u !! sorry because im very busy Sad


    Good Luck






    Anjomane Barname Nevisane Basic4Android
    __

    [You must be registered and logged in to see this link.]


    Sponsored content

    Open Re: Help! help! help! Bot Filters C#

    Post by Sponsored content


      Current date/time is Wed Aug 16, 2017 10:17 am