Valhalla Legends Forums Archive | Battle.net Bot Development | Ignore flag not working right

AuthorMessageTime
Gangz
[quote]
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH Then
Form1.Send "/ban " & Username & " Ip Ban"
[/quote]

Can anyone see why this does not work? I do not under stand it
November 17, 2003, 7:47 AM
Soul Taker
Because you're checking if the person ISN'T squelched.
November 17, 2003, 5:36 PM
hismajesty
[quote author=Gangz link=board=17;threadid=3665;start=0#msg29650 date=1069055265]
[quote]
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH Then
Form1.Send "/ban " & Username & " Ip Ban"
[/quote]

Can anyone see why this does not work? I do not under stand it
[/quote]

As Soul Taker said, why would you ban an unsquelched user?
[code]<>[/code] means not equal to, so you're saying if the flags the person has do not equal squelch flags..then ban them.
November 17, 2003, 7:49 PM
Gangz
[code]
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) = BNFLAGS_SQUELCH Then Form1.Send "/ban " & Username & " Ip Ban"[/code]

Does that look right? Because all possible solutions i have tried are not working
November 17, 2003, 9:42 PM
Spht
[quote author=UserLoser. link=board=17;threadid=3665;start=0#msg29773 date=1069109277]
if (0x20 and usersflags) = 0x20 then send "boo, you're banned"

so basically switch around what you have
[/quote]

It's the same thing.
November 17, 2003, 11:11 PM
iago
If form1.send right?

What DOES happen?
November 17, 2003, 11:20 PM
Gangz
Nothing happens
November 17, 2003, 11:21 PM
Spht
[quote author=Gangz link=board=17;threadid=3665;start=0#msg29793 date=1069111269]
Nothing happens
[/quote]

Do this:

[code]Case ID_JOIN
Debug.Print "flags = " & flags
Debug.Print "BNFLAGS_SQUELCH = " & BNFLAGS_SQUELCH
If (flags And BNFLAGS_SQUELCH) = BNFLAGS_SQUELCH Then Form1.Send "/ban " & Username & " Ip Ban"
[/code]

Then, at the top of your Form1.Send function (which takes only one parameter and since you never pasted the contents of that function, I'll use the title Message as the parameter's name for an example), do this:

[code] Debug.Print "Send: " & Message
[/code]

Replace Message with the name of the parameter in your Form1.Send function.

Now, when a squelched user joins your channel, paste the results here (result will be in the "Immediate" debug window).

If Form1.Send is never called, then flags or BNFLAGS_SQUELCH is most likely wrong.
November 17, 2003, 11:29 PM
Gangz
wow thanks let me run this through
November 17, 2003, 11:46 PM
UserLoser.
[quote author=Spht link=board=17;threadid=3665;start=0#msg29782 date=1069110692]
It's the same thing.
[/quote]

maybe he didn't have BNFLAGS_SQUELCH declared correctly, and also, should be &H20 :P
November 17, 2003, 11:48 PM
Spht
[quote author=UserLoser. link=board=17;threadid=3665;start=0#msg29812 date=1069112889]
[quote author=Spht link=board=17;threadid=3665;start=0#msg29782 date=1069110692]
It's the same thing.
[/quote]

maybe he didn't have BNFLAGS_SQUELCH declared correctly, and also, should be &H20 :P
[/quote]

Oh, that was what you were trying to accomplish. I thought you just wanted him to switch the order of And.
November 17, 2003, 11:51 PM
Gangz
[code]Case ID_JOIN
If if (&20 and usersflags) = &20 Then Form1.Send "/ban " & Username & " Ip Ban"

Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH Then Form1.Send "/ban " & Username & " Ip Ban"

Public Sub Send(ByVal strText As String)
On Error Resume Next
With tcp
TextAdd Time & " - " & strText
strText = Mid(strText, 1, 255)
.InsertNTString strText
.sendPacket &HE
End With
End Sub[/Code]

those are the codes i have tried and my send code nothing has worked so far and nothing come up on the debug[/code]
November 18, 2003, 12:49 AM
Spht
Do what I said.
November 18, 2003, 1:27 AM
Gangz
I tried what you said and nothig changes
November 18, 2003, 1:37 AM
Spht
[quote author=Gangz link=board=17;threadid=3665;start=0#msg29863 date=1069119432]
I tried what you said and nothig changes
[/quote]

Are you doing If (flags And BNFLAGS_SQUELCH) = BNFLAGS_SQUELCH or If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH? In what you pasted, you were using <>.
November 18, 2003, 1:52 AM
Gangz
From what i gathered <> is incorrect so i changed it to =
November 18, 2003, 3:16 AM
Spht
[quote author=Gangz link=board=17;threadid=3665;start=15#msg29875 date=1069125399]
From what i gathered <> is incorrect so i changed it to =
[/quote]

Right...

So you say nothing was displayed in the debug box? Then that means that ID_JOIN is never called, so your problem goes back further.
November 18, 2003, 3:25 AM

Search