Quote
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH Then
Form1.Send "/ban " & Username & " Ip Ban"
Can anyone see why this does not work? I do not under stand it
Because you're checking if the person ISN'T squelched.
Quote from: Gangz on November 17, 2003, 01:47 AM
Quote
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) <> BNFLAGS_SQUELCH Then
Form1.Send "/ban " & Username & " Ip Ban"
Can anyone see why this does not work? I do not under stand it
As Soul Taker said, why would you ban an unsquelched user?
<>
means not equal to, so you're saying if the flags the person has do not equal squelch flags..then ban them.
Case ID_JOIN
If (flags And BNFLAGS_SQUELCH) = BNFLAGS_SQUELCH Then Form1.Send "/ban " & Username & " Ip Ban"
Does that look right? Because all possible solutions i have tried are not working
Quote from: UserLoser. on November 17, 2003, 04:47 PM
if (0x20 and usersflags) = 0x20 then send "boo, you're banned"
so basically switch around what you have
It's the same thing.
If form1.send right?
What DOES happen?
Nothing happens
Quote from: Gangz on November 17, 2003, 05:21 PM
Nothing happens
Do this:
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"
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:
Debug.Print "Send: " & Message
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.
wow thanks let me run this through
Quote from: Spht on November 17, 2003, 05:11 PM
It's the same thing.
maybe he didn't have BNFLAGS_SQUELCH declared correctly, and also, should be &H20 :P
Quote from: UserLoser. on November 17, 2003, 05:48 PM
Quote from: Spht on November 17, 2003, 05:11 PM
It's the same thing.
maybe he didn't have BNFLAGS_SQUELCH declared correctly, and also, should be &H20 :P
Oh, that was what you were trying to accomplish. I thought you just wanted him to switch the order of And.
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
those are the codes i have tried and my send code nothing has worked so far and nothing come up on the debug[/code]
Do what I said.
I tried what you said and nothig changes
Quote from: Gangz on November 17, 2003, 07:37 PM
I tried what you said and nothig changes
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
<>.
From what i gathered <> is incorrect so i changed it to =
Quote from: Gangz on November 17, 2003, 09:16 PM
From what i gathered <> is incorrect so i changed it to =
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.