Author | Message | Time |
---|---|---|
TriCk | Ok It's TriCk again sorry for askin for so much help :( I want to know how to wildcard in code not case... like /ban tr* and it will ban TriCk or something Thanks | May 25, 2003, 2:08 AM |
Kp | [quote author=TriCk link=board=17;threadid=1422;start=0#msg10577 date=1053828489] Ok It's TriCk again sorry for askin for so much help :( I want to know how to wildcard in code not case... like /ban tr* and it will ban TriCk or something Thanks [/quote]For each user, if the user matches your wildcarding function, enqueue a ban on that user. Proceed to the next user and perform the text for them. You'll need to loop through the list manually; afaik, there are no built-in functions that can wild-match. P.S. You keep saying "in code not case": what do you mean? | May 25, 2003, 2:34 AM |
TriCk | P.S. You keep saying "in code not case": what do you mean? i mean for Commands like: Select Case(LCase) Case "say" and other stuff in here End Select by Code I mean: 'say command If Username = Form2.txtMaster.Text Then If Left((LCase(Message)), 5) = (Form2.txtTrigger.Text & "say ") Then Dim saymessage As String saymessage = Right(Message, (Len(Message) - 5)) CleanSlateBot1.Send saymessage End If End If | May 25, 2003, 2:37 AM |
Kp | [quote author=TriCk link=board=17;threadid=1422;start=0#msg10584 date=1053830258] P.S. You keep saying "in code not case": what do you mean? i mean for Commands like: [code]Select Case(LCase) Case "say" and other stuff in here End Select[/code] by Code I mean: [code]'say command If Username = Form2.txtMaster.Text Then If Left((LCase(Message)), 5) = (Form2.txtTrigger.Text & "say ") Then Dim saymessage As String saymessage = Right(Message, (Len(Message) - 5)) CleanSlateBot1.Send saymessage End If End If[/code][/quote]So it's a way of saying you want us to give you code rather than an abstract description, correct? Use [ code ] tags, btw. They make your code easier to read and render. | May 25, 2003, 2:41 AM |
TriCk | yes i guess... :-\ do u know how to do it ? | May 25, 2003, 3:27 AM |
Kp | [quote author=TriCk link=board=17;threadid=1422;start=0#msg10589 date=1053833228] yes i guess... :-\ do u know how to do it ? [/quote]I told you above how to do it. :) Even ignoring that, it ought to be apparent given my works. | May 25, 2003, 5:06 AM |
TriCk | Kp i don't know how to Enqueue commands ... How do u do that with csb ? | May 25, 2003, 7:41 AM |
MrRaza | this topic has been discussed before, iirc Search the forums for WildCard https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=search | May 25, 2003, 9:13 PM |
UserLoser | If "you should die" Like "*should*" Then MsgBox "You should die soon" | May 26, 2003, 12:28 AM |
TheMinistered | Yes, userlooser, you are correct. For those of you who were to stupid to read between the lines, Userlooser is referring to the LIKE operator. If you want to know how to use it, then, I suggest you look it up on msdn. As to how to do a /ban tr* and have it ban user "trick"... you could have some sort of abstract data structure that i am going to call a list. you would cycle through the list and use the LIKE operator to determine if that item in the list should be banned or not. This thought may not be complete or right, but I'm insanely tired and I hope this helps | May 26, 2003, 2:43 AM |
TriCk | Thanks for the help ill try and figure it out with the Like Commands I guess ... Just a thought do u think something like this would be correct: [code] If UserName Like "a" Then CleanSlateBot1.Send "/ban " & Username ??? [/code] | May 26, 2003, 5:57 AM |
iago | Like isn't a command, it's an operator. | May 26, 2003, 6:16 AM |
______ | [quote author=TriCk link=board=17;threadid=1422;start=0#msg10696 date=1053928638] Thanks for the help ill try and figure it out with the Like Commands I guess ... Just a thought do u think something like this would be correct: [code] If UserName Like "a" Then CleanSlateBot1.Send "/ban " & Username ??? [/code] [/quote] that wouldnt work very well u might wanna try Lcase(username) Like "a" that would be a little better. and also if a user joined you would flood off with that code for trying to ban the user(s) with an "a" :-\ | May 26, 2003, 6:27 AM |
MrRaza | A while back i posted code that printed out the percentage of how much a string was "like" another string. Search the forums for my posts, say 3 pages back. | May 26, 2003, 11:43 AM |