- This topic has 39 replies, 6 voices, and was last updated 14 years ago by Mbirmbilis.
-
AuthorPosts
-
August 19, 2010 at 5:01 pm #175631MbirmbilisMember
Hello Admin!
It was this delay. As i told you i have no idea of programming. May be it is something that should stay as You changed it. But the swearbounce should work! Aswell the Autobounce and the Autoredot do not work! The question is why? Did Paltalk change something and the prog does not work? I realy don’t know!@Admin wrote:
Aigh, I put a delay on the bouncing. One thing does it happens when you try to redot them, and see if it takes you out right after the bounce window comes on or like a second later. Here, its not an installer is just the files in a folder :swift:
August 20, 2010 at 7:42 am #175630express01MemberMight i have the source code for the Bot please?
Thanks alot !August 20, 2010 at 9:37 am #175629StringMember@express01 wrote:
Might i have the source code for the Bot please?
You might. Have you tried searching this forum for it?
August 20, 2010 at 11:29 am #175628DepartureMemberYes auto bots can be hard to code, I used a Pos in delphi meaning that if a string exists in another string it will return its position in that string, so in other words if it does not exsists it will return 0, I dont know if this helps but it might be useful
procedure TForm1.HandleRmText(copyDataStruct: PCopyDataStruct);
var
sData, sNickname: string;
iLoop, iFound: Integer;
beginif NOT isAdmin then
Exit;iFound := 0;
sData := PChar(copyDataStruct.lpData);
Trim(sData);
sNickname := GetToken(sData, ‘:’, 1);for iLoop := 0 to pred(lbWords.Count) do
begin
iFound := iFound + PosEx(Uppercase((‘>’ + lbWords.Items.Strings[iLoop] + ‘<')), Uppercase(sData));
iFound := iFound + PosEx(Uppercase((‘>’ + lbWords.Items.Strings[iLoop] + ‘ ‘)), Uppercase(sData));
iFound := iFound + PosEx(Uppercase((‘ ‘ + lbWords.Items.Strings[iLoop] + ‘<')), Uppercase(sData));
iFound := iFound + PosEx(Uppercase((‘ ‘ + lbWords.Items.Strings[iLoop] + ‘ ‘)), Uppercase(sData));
if iFound 0 then
begin
case Integer(lbWords.Items.Objects[iLoop]) of
0: RedDotNick(sNickname);
1: BounceNick(sNickname);
end;
iFound:= 0;
end;
end;
end;Basically I set EVERYTHING to uppercase and then chack if the word is used at the beginning of the line or just by its self or in-between or at the end the of line.. so 4 checks are done for each word in Auotbounce/Autoban AKA “SwearBot” so it minimizes the chance of missing a word.
August 20, 2010 at 12:01 pm #175627autopilotMember@Departure wrote:
Basically I set EVERYTHING to uppercase and then chack if the word is used at the beginning of the line or just by its self or in-between or at the end the of line.. so 4 checks are done for each word in Auotbounce/Autoban AKA “SwearBot” so it minimizes the chance of missing a word.
With VB6, the InStr function returns the possition if a string match is found. It does not matter were in the line it matches, or what is before or after. The case however is included in the evaluation and therefore a force to upper or lower case should be done with the InStr call. So only 1 check needs to be done using InStr as long as both input and pattern are in the same case.
loco, in your timer, you get the last line and then run all your bot actions on it. this is the reason for the multiple bounce attempts. you need to put the different bot actions into there own subs and you need a variable to hold the last incoming text. then do a check against the the last text and incoming text and only run your bot actions if it is new incoming text.
'if last text and incoming are different
If Not incomingtext = lasttext then
'process new incoming
'save new incoming
lasttext = incomingtext
'if bot is on, then run its check
if swearboton then checkswear(lasttext)
if greeteron then checkgreet(lasttext)
if whateverboton then dowhatever(lasttext)
end ifthe code above is just the logic not actual code
August 21, 2010 at 9:56 am #175626DepartureMember@autopilot wrote:
With VB6, the InStr function returns the possition if a string match is found. It does not matter were in the line it matches, or what is before or after. The case however is included in the evaluation and therefore a force to upper or lower case should be done with the InStr call. So only 1 check needs to be done using InStr as long as both input and pattern are in the same case.
Yes I understand that, But notice the Integer value “If > 0” meaning that if any of the search patterns are found it will bounce/kick/red ect… Reason for the 4 checks is because if it was plain “asshole” as bad word and someones nickname was “ImAaSShOle” asshole ” or last word in last line example “asshole<" so what we are trying to do is NOT look for the Word "asshole" but look for the word in how it might be used otherwise it might bounce people with that word in there nicknames or sub word of a word. So if any of these matches are found the integer value becomes greater than 0 which mean bounce them.
Sorry if this makes no sense at all to you, It makes perfect sense in my twisted way of thinking im just sorry I couldn’t explain it better.
Now for second part of my example, Use a case statement to determine if the bot should bounce/kick/reddot the user…
if iFound 0 then
begin
case Integer(lbWords.Items.Objects[iLoop]) of
0: RedDotNick(sNickname);
1: BounceNick(sNickname);
end;The case Statement will only get executed if the pattern matches(what I described above). Basically for each item in the list I have set a “Tag” or knowen in Delphi as Object ID which when adding the “BadWord” to the list it also added “Tag” to that word in this case if the tag was 0 it would reddot the user or if I had set it 1 when adding the “bad word” it would bounce the user. This removes the need for multiple checks and multiple lists. Also in theory should speed up your code because we are using “case of” statement instead of “if then” and not to mention it will only need to search through 1 list not half a dozen. Hope this help you loco.
Just another Idea, in your “bad word” list you could assign a image 1 image for bounce and another for reddot, when checking the list check what image is used and based upon the image used you will know if you should reddot the user or bounce the user. Also would cool to see little images instead of heaps of different lists
P.s
@AutoPilot
Nice to see your still around mate, Long time since we talked, Hope to catch up with you soonAugust 21, 2010 at 8:37 pm #175625autopilotMember@Departure wrote:
P.s
@AutoPilot
Nice to see your still around mate, Long time since we talked, Hope to catch up with you sooni been trying to get you on messenger, but not been seeing you. 🙁
anyway, if a sensored word is in the nic, then we most likely dont want that person in room anyway! but the way i do it, i strip the nic off before running checks in chat text.
EDIT: I do understand the thought to check for the word as stand alone, but people like to get past the bot by running words together. So if i were to make a censorbot, i would leave it to the user to decide what is censored and what is not. and they can be as tough or loose as they want in the list, but if the list word is contained in the post, no matter how it is used, it bounces. this means that small words that can easily be used in other non offensive words dont get added to the list.
August 30, 2010 at 4:04 pm #175624express01Membercan i have the source code for the latest stand of the admin bot please?
Thanks!
August 31, 2010 at 4:13 am #175623AdminAdministratorHere the latest, I haven’t done more changes cause I am back to school 😀 man I got some hard classes this year lol anyways chek it here I pus it in this post for ya
paltalk-9-9-source-codes-t32314.html#p81245August 31, 2010 at 6:06 pm #175622express01Memberthanks alot Admin 😀
-
AuthorPosts
Related
- You must be logged in to reply to this topic.