Author | Message | Time |
---|---|---|
ChR0NiC | My original post was.....why wouldn't my sweepban code that was posted here, ban the odd man out.... Due to it not being separated but a comma.... I still haven't fixed it, but I didn't feel write leaving my code open on the forum here. | February 15, 2004, 11:03 PM |
UserLoser. | [list] [*]Don't split up the data if there isn't a comma in it [*]If there isn't a comma in the data, then ban the data (but check for operator, even though it's not 100% accurate) [/list] | February 15, 2004, 11:08 PM |
ChR0NiC | [quote author=UserLoser. link=board=17;threadid=5310;start=0#msg44490 date=1076886520] [list] [*]Don't split up the data if there isn't a comma in it [*]If there isn't a comma in the data, then ban the data (but check for operator, even though it's not 100% accurate) [/list] [/quote] well as you see above, I try banning twice, once with the brackets and once without them, just to be sure I get the whole channel. Well I'll try your advice but I am not quite sure I 100% understand | February 15, 2004, 11:11 PM |
Networks | When split by the commas how can make it so that it'll go to the next comma until the end? | February 17, 2004, 6:28 PM |
Grok | [quote author=ChR0NiC link=board=17;threadid=5310;start=0#msg44488 date=1076886236] I am removing this post, thx [/quote] Don't ever do that again, please. Because you have edited the topic message, the replies are now all useless and nobody else can learn by reading this post. That's bad form and bad etiquette on any forum, here or anywhere else on the internet. | February 17, 2004, 6:58 PM |
ChR0NiC | [quote author=Grok link=board=17;threadid=5310;start=0#msg44761 date=1077044324] Don't ever do that again, please. Because you have edited the topic message, the replies are now all useless and nobody else can learn by reading this post. That's bad form and bad etiquette on any forum, here or anywhere else on the internet. [/quote] Sorry, I was trying to *hint* the Admin's towards deleting my post.... | February 17, 2004, 11:53 PM |
Adron | [quote author=ChR0NiC link=board=17;threadid=5310;start=0#msg44805 date=1077062026] Sorry, I was trying to *hint* the Admin's towards deleting my post.... [/quote] Oh. I thought you were trying to *hint* the Admin's towards deleting you from this forum.... | February 17, 2004, 11:59 PM |
Grok | [quote author=ChR0NiC link=board=17;threadid=5310;start=0#msg44805 date=1077062026] [quote author=Grok link=board=17;threadid=5310;start=0#msg44761 date=1077044324] Don't ever do that again, please. Because you have edited the topic message, the replies are now all useless and nobody else can learn by reading this post. That's bad form and bad etiquette on any forum, here or anywhere else on the internet. [/quote] Sorry, I was trying to *hint* the Admin's towards deleting my post.... [/quote] Well ChR0NiC, the topic turns out to be instructional despite your efforts. Now others have an example of how not to edit your topics after they have been responded to and on. | February 18, 2004, 1:17 AM |
Spht | This is why people should make a habit of quoting the posts they're replying to since fatuous people tend to manipulate or completely remove their post after several people have replied. Additionally, this forum is often used as an archived reference for bot developers and if the original poster removed their post because they got their answer, then the people that took the time to make a reply get the objectionable gratitude of having only helped a few people that were around to see the original question, while the others who are later searching through the archives miss out. | February 18, 2004, 1:22 AM |
Myndfyr | Not only that, but now I'm pissed too because I don't get to see what the question was. I make it a habit to keep up on things that seem interesting; "Sweep ban" caught my eye as something that might be useful. Thanks for showing your willingness to participate. | February 18, 2004, 1:43 AM |
ChR0NiC | [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44832 date=1077068597] Not only that, but now I'm pissed too because I don't get to see what the question was. I make it a habit to keep up on things that seem interesting; "Sweep ban" caught my eye as something that might be useful. Thanks for showing your willingness to participate. [/quote] I am sorry about that......But I posted my entire sweepban code here, and I didn't want some first time programmer who has no experience just grabbing my sweepban code and putting it in his bot...I hope you understand :( | February 19, 2004, 1:33 AM |
Tuberload | Maybe you should re-post it minus the code... The people at least know what's being talked about. | February 19, 2004, 1:36 AM |
Myndfyr | [quote author=Tuberload link=board=17;threadid=5310;start=0#msg44959 date=1077154587] Maybe you should re-post it minus the code... The people at least know what's being talked about. [/quote] Hear, hear. I'm a good enough programmer to program my own bot, thanks, but what is this concept? | February 19, 2004, 1:40 AM |
ChR0NiC | [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44963 date=1077154816] Hear, hear. I'm a good enough programmer to program my own bot, thanks, but what is this concept? [/quote] Do you mean.....what does sweepban do or how did I go about it??? | February 19, 2004, 1:47 AM |
Myndfyr | [quote author=ChR0NiC link=board=17;threadid=5310;start=0#msg44965 date=1077155234] [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44963 date=1077154816] Hear, hear. I'm a good enough programmer to program my own bot, thanks, but what is this concept? [/quote] Do you mean.....what does sweepban do or how did I go about it??? [/quote] What is it? I suppose, what does it do? | February 19, 2004, 2:57 AM |
Eli_1 | I think we should just assume sweepban is another term for wildcard banning... or it's probably for parsing the /who [channel] response to get a list of names. In both cases it's just another word for wildcard banning, just a channel difference in the latter one... ;) | February 19, 2004, 3:30 AM |
Tuberload | [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44963 date=1077154816] [quote author=Tuberload link=board=17;threadid=5310;start=0#msg44959 date=1077154587] Maybe you should re-post it minus the code... The people at least know what's being talked about. [/quote] Hear, hear. I'm a good enough programmer to program my own bot, thanks, but what is this concept? [/quote] How does you being a good enough programmer, have anything to do with what I said? Chronic was being hounded for deleting his post, so I offered the obvious solution of putting it back up... | February 19, 2004, 5:04 AM |
SiMi | [quote author=ChR0NiC link=board=17;threadid=5310;start=0#msg44958 date=1077154413] [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44832 date=1077068597] Not only that, but now I'm pissed too because I don't get to see what the question was. I make it a habit to keep up on things that seem interesting; "Sweep ban" caught my eye as something that might be useful. Thanks for showing your willingness to participate. [/quote] I am sorry about that......But I posted my entire sweepban code here, and I didn't want some first time programmer who has no experience just grabbing my sweepban code and putting it in his bot...I hope you understand :( [/quote] You seem to be having problems not even a "first time" programmer could have. You want others to help you but not others to help others? Who knows if even its your code, you seem to post a new problem here every other day. Why don't you get a clue and then come back with some positive attitude and when you do come back, make sure you auctually learn some programming. After all this is a community, you give to them and they give back to you. :) | February 19, 2004, 6:12 AM |
Networks | um...anyone wanna provide some input on how to sweep and by splitting the commas because i understand that but how do u get it to go to the next comma. How about helping instead of arguing over the same damn thing. | February 19, 2004, 1:59 PM |
Myndfyr | [quote author=Tuberload link=board=17;threadid=5310;start=15#msg44997 date=1077167099] [quote author=Myndfyre link=board=17;threadid=5310;start=0#msg44963 date=1077154816] [quote author=Tuberload link=board=17;threadid=5310;start=0#msg44959 date=1077154587] Maybe you should re-post it minus the code... The people at least know what's being talked about. [/quote] Hear, hear. I'm a good enough programmer to program my own bot, thanks, but what is this concept? [/quote] How does you being a good enough programmer, have anything to do with what I said? Chronic was being hounded for deleting his post, so I offered the obvious solution of putting it back up... [/quote] My point about programming skill was to Chronic for this statement: [quote] But I posted my entire sweepban code here, and I didn't want some first time programmer who has no experience just grabbing my sweepban code and putting it in his bot... [/quote] My point being, I don't need his code. I would like to know what function a "Sweep ban" serves. The point of saying "I'm a good enough programmer" meant that I could manage to figure it out without his code. | February 19, 2004, 3:52 PM |
LoRd | [quote author=Networks link=board=17;threadid=5310;start=15#msg45021 date=1077199162] um...anyone wanna provide some input on how to sweep and by splitting the commas because i understand that but how do u get it to go to the next comma. How about helping instead of arguing over the same damn thing. [/quote] However, there is no way to be 100% accurate in any "sweepban" method, I feel this would be the most effective way: Set a timer to approximately 500 - 1500 ms, and have the timer disable itsself when time runs out. Then when you receive an EID_INFO saying "Users in channel ", enable the timer, then split up the and ban the data apon each EID_INFO data arrival until the timer runs out of time. To determine if a user in the remote channel has operator status (Excluding Diablo II/Diablo II: Lord of Destruction, which will have [*USERNAME] / [REALMCHAR (*USERNAME), instead of [USERNAME]), do the following: Check to see if the first character and the last character are "[" and "]". Then check if the UCase of the username is an exact match of the username sent. If the both are true, remove the "[" and the "]" from the user and ban. Banning a user on Diablo II/Diablo II: Lord of Destruction is slightly different. You're given a slight advantage, the username will have a "*" in it, allowing for more accurate parsing of the EID_INFO packet. Seeing how there is too much room for error, and that banning users that aren't bothering you and aren't even in your channel to be able to bother you is pointless, I'd never put "sweepban" into any of my bots. | February 19, 2004, 6:27 PM |
Tuberload | [quote author=Myndfyre link=board=17;threadid=5310;start=15#msg45038 date=1077205954] My point about programming skill was to Chronic for this statement: [quote] But I posted my entire sweepban code here, and I didn't want some first time programmer who has no experience just grabbing my sweepban code and putting it in his bot... [/quote] My point being, I don't need his code. I would like to know what function a "Sweep ban" serves. The point of saying "I'm a good enough programmer" meant that I could manage to figure it out without his code. [/quote] Sorry for the misunderstanding. I thought you were talking directly to me, because you quoted only me. I will honestly say I don't know what Chronic means by "Sweep Ban". I can only come up with conclusions, and wouldn't mind hearing about his idea's. Who knows, someone might learn something. Myself included. | February 20, 2004, 7:42 AM |
synth | [quote author=Tuberload link=board=17;threadid=5310;start=15#msg45135 date=1077262921] Sorry for the misunderstanding. I thought you were talking directly to me, because you quoted only me. I will honestly say I don't know what Chronic means by "Sweep Ban". I can only come up with conclusions, and wouldn't mind hearing about his idea's. Who knows, someone might learn something. Myself included. [/quote] SweepBan finds the users in another specific channel and bans them all from your channel. | February 20, 2004, 1:24 PM |
Networks | [quote author=LoRd[nK] link=board=17;threadid=5310;start=15#msg45055 date=1077215252] [quote author=Networks link=board=17;threadid=5310;start=15#msg45021 date=1077199162] um...anyone wanna provide some input on how to sweep and by splitting the commas because i understand that but how do u get it to go to the next comma. How about helping instead of arguing over the same damn thing. [/quote] However, there is no way to be 100% accurate in any "sweepban" method, I feel this would be the most effective way: Set a timer to approximately 500 - 1500 ms, and have the timer disable itsself when time runs out. Then when you receive an EID_INFO saying "Users in channel ", enable the timer, then split up the and ban the data apon each EID_INFO data arrival until the timer runs out of time. To determine if a user in the remote channel has operator status (Excluding Diablo II/Diablo II: Lord of Destruction, which will have [*USERNAME] / [REALMCHAR (*USERNAME), instead of [USERNAME]), do the following: Check to see if the first character and the last character are "[" and "]". Then check if the UCase of the username is an exact match of the username sent. If the both are true, remove the "[" and the "]" from the user and ban. Banning a user on Diablo II/Diablo II: Lord of Destruction is slightly different. You're given a slight advantage, the username will have a "*" in it, allowing for more accurate parsing of the EID_INFO packet. Seeing how there is too much room for error, and that banning users that aren't bothering you and aren't even in your channel to be able to bother you is pointless, I'd never put "sweepban" into any of my bots. [/quote] Once again, thank you LoRd | February 20, 2004, 1:58 PM |
Tuberload | [quote author=synth link=board=17;threadid=5310;start=15#msg45151 date=1077283468] [quote author=Tuberload link=board=17;threadid=5310;start=15#msg45135 date=1077262921] Sorry for the misunderstanding. I thought you were talking directly to me, because you quoted only me. I will honestly say I don't know what Chronic means by "Sweep Ban". I can only come up with conclusions, and wouldn't mind hearing about his idea's. Who knows, someone might learn something. Myself included. [/quote] SweepBan finds the users in another specific channel and bans them all from your channel. [/quote] So you set up your bot to monitor other channels, and then ban anyone who joins the bot's channel from one of the monitored channels... While I could see this being usefull in the old days of Battle.net warring, I think it would just be a waste of resources. [quote author=Networks link=board=17;threadid=5310;start=15#msg45021 date=1077199162] um...anyone wanna provide some input on how to sweep and by splitting the commas because i understand that but how do u get it to go to the next comma. How about helping instead of arguing over the same damn thing. [/quote] How did you manage to parse the data received from battle.net in the first place, if you can't parse a list separated with commas? | February 20, 2004, 7:12 PM |
synth | [quote author=Tuberload link=board=17;threadid=5310;start=15#msg45135 date=1077262921] So you set up your bot to monitor other channels, and then ban anyone who joins the bot's channel from one of the monitored channels... While I could see this being usefull in the old days of Battle.net warring, I think it would just be a waste of resources. [/quote] AFAIK, there are no bots that "monitor" channels. The only ones I've seen just get the list of people in the specified channel once, then ban them in the order received. I don't really see any particular use in this, but still the question remains how one would go about coding a sweepban. So I'll try and answer it with what I feel is the best answer suited to the situation: 1. Get list of users. This should give back something like this: [quote]Users in channel Clan Recruitment: D3K]Recru3t, kukubenka LoRd]ZeR0[, tourny SaRs, Wishblade CeLe[aC]ReC4, SiCkeN Noreaga74@Lordaeron, shadowman22ca WARRIORS_BLOOD, Sir_Killsalot2@Lordaeron Rc_Su, SupleX[/quote] 2. It seems that there are only 2 usernames per line in the server's return to the /who command. So, find the length of the line (e.g., "D3K]Recru3t, kukubenka" has length 22.) 3. Find the placement of the comma. 4. Get the string up to the placement of the comma using Left, then get the rest of the string up to the end of the string using Right. Place those into an array. 5. Do step 4 until there are no usernames left (no comma present). 6. Ban each user with the appropriate anti-flood technique. If you're using Visual Basic and do not have an anti-flood for your bot, I suggest the algorithm written by Adron and ported by Grok, located at: http://botdev.valhallalegends.com/documents/vbantiflood.html LMK if you have success or failure following this logic, if you feel that I am being unclear, or if you feel that my way isn't the best way or is incorrect, or has flawed logic. | February 20, 2004, 7:58 PM |
Eli_1 | [quote author=synth link=board=17;threadid=5310;start=15#msg45198 date=1077307129] [quote author=Tuberload link=board=17;threadid=5310;start=15#msg45135 date=1077262921] So you set up your bot to monitor other channels, and then ban anyone who joins the bot's channel from one of the monitored channels... While I could see this being usefull in the old days of Battle.net warring, I think it would just be a waste of resources. [/quote] AFAIK, there are no bots that "monitor" channels. The only ones I've seen just get the list of people in the specified channel once, then ban them in the order received. I don't really see any particular use in this, but still the question remains how one would go about coding a sweepban. So I'll try and answer it with what I feel is the best answer suited to the situation: 1. Get list of users. This should give back something like this: [quote]Users in channel Clan Recruitment: D3K]Recru3t, kukubenka LoRd]ZeR0[, tourny SaRs, Wishblade CeLe[aC]ReC4, SiCkeN Noreaga74@Lordaeron, shadowman22ca WARRIORS_BLOOD, Sir_Killsalot2@Lordaeron Rc_Su, SupleX[/quote] 2. It seems that there are only 2 usernames per line in the server's return to the /who command. So, find the length of the line (e.g., "D3K]Recru3t, kukubenka" has length 22.) 3. Find the placement of the comma. 4. Get the string up to the placement of the comma using Left, then get the rest of the string up to the end of the string using Right. Place those into an array. 5. Do step 4 until there are no usernames left (no comma present). 6. Ban each user with the appropriate anti-flood technique. If you're using Visual Basic and do not have an anti-flood for your bot, I suggest the algorithm written by Adron and ported by Grok, located at: http://botdev.valhallalegends.com/documents/vbantiflood.html LMK if you have success or failure following this logic, if you feel that I am being unclear, or if you feel that my way isn't the best way or is incorrect, or has flawed logic. [/quote] or you could do something like (assuming data = /who return) [code] Dim Parse() as string Parse = Split(Data, VbCrLf, 2) data = Parse(1) 'this would remove the 'users in channel w/e' Data = replace(data, vbcrlf, "") data = replace(data, " ", "") 'this would leave data = to something like name1,name2,name3,name4 ect... Parse = split(data, ",") for i = 0 to ubound(parse) Dim Username as string Username = parse(i) '... next i [/code] This is untested and ugly because it doesn't have the proper indents and such, but I wrote it while in the post window... bear with me :P [Edit=Fixed a typo in my code...] | February 20, 2004, 8:26 PM |
LoRd | [code] Visual Basic (Keep in mind this is completely untested code): Dim Splt() as string Dim I as long If Instr(Message, ", ") <> 0 Then Splt() = Split(Message, ", ") Else Redim Preserve Splt(0) Splt(0) = Message End If For I = 0 to UBound(Splt) If Left(Splt(I)) = "[" And Right(Splt(I)) = "]" And StrComp(UCase(Splt(I)), Splt(I), vbTextCompare) = 0 Then Splt(I) = Splt(I) = Mid(Splt(I), 2, Len(Splt(I) - 1) With PBuffer .InsertNTString "/ban " & Splt(I) & "Sweep Ban" .SendPacket BNCS, &HE End With Next I [/code] In a follow up to my previous post, someone game me the idea that instead of using a timer, it would be more efficient to send some packet that the BNCS replies to when sent after the /who is sent, then you will know exactly when to disable your parsing. | February 20, 2004, 8:58 PM |
Eli_1 | Ouput: That user is not logged on. Name2 was banned by OpDude <OpDude> Sweep Ban Name3 was banned by OpDude (Sweep Ban) Name4 was banned by OpDude <OpDude> Sweep Ban ect... (I think anyway) | February 20, 2004, 9:09 PM |
Kp | Addendum to synth: Be aware that if there are an odd number of users in channel, the last user gets a line all to himself (with no comma). That will need to be handled, and would likely be quite easy to detect since a) there are no spaces in that message and b) it'll be the last one before your list-completion comes in. | February 20, 2004, 9:41 PM |
Spht | [quote author=synth link=board=17;threadid=5310;start=15#msg45198 date=1077307129] 2. It seems that there are only 2 usernames per line in the server's return to the /who command. So, find the length of the line (e.g., "D3K]Recru3t, kukubenka" has length 22.) [/quote] Why get the length if you never need to use it? [quote author=synth link=board=17;threadid=5310;start=15#msg45198 date=1077307129] 4. Get the string up to the placement of the comma using Left, then get the rest of the string up to the end of the string using Right. Place those into an array. [/quote] Note this will only work if the server lists two names per message. This could change in the future to list 5 names per message (for example), or a single name. To avoid generalizing things, you should work under the logic of "each name is seperated by a comma" instead of "there are two names per message." [quote author=synth link=board=17;threadid=5310;start=15#msg45198 date=1077307129] LMK if you have success or failure following this logic, if you feel that I am being unclear, or if you feel that my way isn't the best way or is incorrect, or has flawed logic. [/quote] | February 21, 2004, 1:16 AM |
ChR0NiC | [quote author=Simi link=board=17;threadid=5310;start=15#msg45001 date=1077171141] You seem to be having problems not even a "first time" programmer could have. You want others to help you but not others to help others? Who knows if even its your code, you seem to post a new problem here every other day. Why don't you get a clue and then come back with some positive attitude and when you do come back, make sure you auctually learn some programming. After all this is a community, you give to them and they give back to you. :) [/quote] Ok you need to get over me, you still think I know nothing about anything. I did write my own sweepban code And since everyone is making such a big deal over a discontinued post, here's my sweepban code. [code] If InStr(Message, ", ") Then Call SweepBan (Message) End If [/code] That's where I call it [code] Sub SweepBan(ChannelList As String) Dim S() As String S() = Split(ChannelList, " ") For i = 0 To UBound(S) If Left(S(i), 1) = "[" And Right(S(i), 1) = "]" Then Send "/ban " & S(i) & Chr(32) & "Defense Sweep" Send "/ban " & Mid(S(i), 2, Len(S(i)) - 2) & Chr(32) & "Defense Sweep" End If Else Send "/ban " & S(i) & Chr(32) & "Defense Sweep" End If End If Next i End Sub [/code] That is where I execute it, I noticed mine is a bit similar to Lord's...anyways can someone give me an idea on how to fix the motherf***ing code to ban the odd man out?? Edit: The reason I do "/ban " twice, is to be sure I ban the name, because the name surrounded by brackets are not always operators. Just thought I'd let you know... | February 21, 2004, 1:21 AM |
Spht | [quote author=ChR0NiC link=board=17;threadid=5310;start=30#msg45255 date=1077326498] anyways can someone give me an idea on how to fix the motherf***ing code to ban the odd man out?? [/quote] That's no way to treat code! But regardless, when your bChannelScanInProgress = True, simply ban the name if no comma is in sight. | February 21, 2004, 1:29 AM |
ChR0NiC | [quote author=Spht link=board=17;threadid=5310;start=30#msg45257 date=1077326954] That's no way to treat code! But regardless, when your bChannelScanInProgress = True, simply ban the name if no comma is in sight. [/quote] So I guess when I receive "Users in channel", it will be true right? And then only split it if there is a comma. I guess I can try it. Edit: How will I know when to end it?? | February 21, 2004, 1:30 AM |
SiMi | omfg you just figured out how to do a L33T H4X, Congrats! :) This is what i used a long long time ago, very long ago. Did i mention i used it a long time ago? [code] Private Sub info(info As String) On Error Resume Next If InStr(1, info, ",") Then Dim User As Variant, UserArray() As String UserArray = Split(info, ", ") For Each User In UserArray Send "/Ban " & User & " Sweep Banned" Next User Exit Sub End If [/code] on my sendchat function it checked and filtered out the other stuff that didn't get filtered out here such as the brackets etc [Kp edit: changed quote tags to code tags. Be warned that I am getting tired of the running battle between you and Chr0nic, Simi. If this continues, you may both find yourselves getting deleted for flaming. Focus on the topic at hand, not some personal vendetta.] | February 21, 2004, 4:33 AM |
LoRd | [quote] omfg you just figured out how to do a L33T H4X, Congrats! This is what i used a long long time ago, very long ago. Did i mention i used it a long time ago? Quote: Private Sub info(info As String) On Error Resume Next If InStr(1, info, ",") Then Dim User As Variant, UserArray() As String UserArray = Split(info, ", ") For Each User In UserArray Send "/Ban " & User & " Sweep Banned" Next User Exit Sub End If on my sendchat function it checked and filtered out the other stuff that didn't get filtered out here such as the brackets etc [/quote] What if there's no comma in the data received? Looks like your "L33T H4X" failed once again. BTW: When adding code to the forum use the code tags not the quote tags. [quote] So I guess when I receive "Users in channel", it will be true right? And then only split it if there is a comma. I guess I can try it. Edit: How will I know when to end it?? [/quote] One method: Use a 500ms - 1000ms timer, enable it when you parse out "Users in channel " from EID_INFO, and disable at the end of the time. Second method: Send a packet after the /who, start the parsing of EID_INFO's and when the packet is received, you stop parsing EID_INFO's | February 21, 2004, 4:49 AM |
UserLoser. | 100% effective working method (for VB users): Requirements: BotNet connection Custom scripting [code] Sub UserInChannel(Username, Flags, Message, Ping) LocalCommand.ProcessLocalCommand "/botnetwhisper ModeratorBot ban " & Username End Sub [/code] In my case, LocalCommand is the set name for my command processor class, and UserInChannel is when you recieve 0x0F, event id 0x01 (or as some refer to as EID_USER) | February 21, 2004, 5:13 AM |
LoRd | [quote author=UserLoser. link=board=17;threadid=5310;start=30#msg45293 date=1077340399] 100% effective working method (for VB users): Requirements: BotNet connection Custom scripting [code] Sub UserInChannel(Username, Flags, Message, Ping) LocalCommand.ProcessLocalCommand "/botnetwhisper ModeratorBot ban " & Username End Sub [/code] In my case, LocalCommand is the set name for my command processor class, and UserInChannel is when you recieve 0x0F, event id 0x01 (or as some refer to as EID_USER) [/quote] Assuming the user wants to use the BotNet... | February 21, 2004, 5:49 AM |
SiMi | [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45289 date=1077338955] [quote] omfg you just figured out how to do a L33T H4X, Congrats! This is what i used a long long time ago, very long ago. Did i mention i used it a long time ago? Quote: Private Sub info(info As String) On Error Resume Next If InStr(1, info, ",") Then Dim User As Variant, UserArray() As String UserArray = Split(info, ", ") For Each User In UserArray Send "/Ban " & User & " Sweep Banned" Next User Exit Sub End If on my sendchat function it checked and filtered out the other stuff that didn't get filtered out here such as the brackets etc [/quote] What if there's no comma in the data received? Looks like your "L33T H4X" failed once again. BTW: When adding code to the forum use the code tags not the quote tags. [quote] So I guess when I receive "Users in channel", it will be true right? And then only split it if there is a comma. I guess I can try it. Edit: How will I know when to end it?? [/quote] One method: Use a 500ms - 1000ms timer, enable it when you parse out "Users in channel " from EID_INFO, and disable at the end of the time. Second method: Send a packet after the /who, start the parsing of EID_INFO's and when the packet is received, you stop parsing EID_INFO's [/quote] if you read it carefully it says my sendchat function takes care of the rest, and I wasn't talking about any "L33T H4X" it was more of a joke. Nice try, no you didnt get this one. :) | February 21, 2004, 9:08 AM |
Tuberload | [quote author=Simi link=board=17;threadid=5310;start=30#msg45308 date=1077354536] if you read it carefully it says my sendchat function takes care of the rest, and I wasn't talking about any "L33T H4X" it was more of a joke. Nice try, no you didnt get this one. :) [/quote] Says who? You? Hmmm.... :-\ | February 21, 2004, 9:20 AM |
LoRd | [quote author=Simi link=board=17;threadid=5310;start=30#msg45308 date=1077354536] [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45289 date=1077338955] [quote] omfg you just figured out how to do a L33T H4X, Congrats! This is what i used a long long time ago, very long ago. Did i mention i used it a long time ago? Quote: Private Sub info(info As String) On Error Resume Next If InStr(1, info, ",") Then Dim User As Variant, UserArray() As String UserArray = Split(info, ", ") For Each User In UserArray Send "/Ban " & User & " Sweep Banned" Next User Exit Sub End If on my sendchat function it checked and filtered out the other stuff that didn't get filtered out here such as the brackets etc [/quote] What if there's no comma in the data received? Looks like your "L33T H4X" failed once again. BTW: When adding code to the forum use the code tags not the quote tags. [quote] So I guess when I receive "Users in channel", it will be true right? And then only split it if there is a comma. I guess I can try it. Edit: How will I know when to end it?? [/quote] One method: Use a 500ms - 1000ms timer, enable it when you parse out "Users in channel " from EID_INFO, and disable at the end of the time. Second method: Send a packet after the /who, start the parsing of EID_INFO's and when the packet is received, you stop parsing EID_INFO's [/quote] if you read it carefully it says my sendchat function takes care of the rest, and I wasn't talking about any "L33T H4X" it was more of a joke. Nice try, no you didnt get this one. :) [/quote] Your send chat function would never receive the user on the last line of the data stream if the last line only contained one user. Debate it all you want, your coding is flawed. | February 21, 2004, 5:13 PM |
Kp | [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45300 date=1077342562] [quote author=UserLoser. link=board=17;threadid=5310;start=30#msg45293 date=1077340399]In my case, LocalCommand is the set name for my command processor class, and UserInChannel is when you recieve 0x0F, event id 0x01 (or as some refer to as EID_USER)[/quote]Assuming the user wants to use the BotNet...[/quote] and assuming that the user doesn't flood himself on botnet due to sending so many whispers so quickly! Since botnet flood controls are more oriented to quantity of messages than to their length, it'd be much better to batch up the usernames. | February 21, 2004, 5:30 PM |
SiMi | [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45340 date=1077383611] [quote author=Simi link=board=17;threadid=5310;start=30#msg45308 date=1077354536] [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45289 date=1077338955] [quote] omfg you just figured out how to do a L33T H4X, Congrats! This is what i used a long long time ago, very long ago. Did i mention i used it a long time ago? Quote: Private Sub info(info As String) On Error Resume Next If InStr(1, info, ",") Then Dim User As Variant, UserArray() As String UserArray = Split(info, ", ") For Each User In UserArray Send "/Ban " & User & " Sweep Banned" Next User Exit Sub End If on my sendchat function it checked and filtered out the other stuff that didn't get filtered out here such as the brackets etc [/quote] What if there's no comma in the data received? Looks like your "L33T H4X" failed once again. BTW: When adding code to the forum use the code tags not the quote tags. [quote] So I guess when I receive "Users in channel", it will be true right? And then only split it if there is a comma. I guess I can try it. Edit: How will I know when to end it?? [/quote] One method: Use a 500ms - 1000ms timer, enable it when you parse out "Users in channel " from EID_INFO, and disable at the end of the time. Second method: Send a packet after the /who, start the parsing of EID_INFO's and when the packet is received, you stop parsing EID_INFO's [/quote] if you read it carefully it says my sendchat function takes care of the rest, and I wasn't talking about any "L33T H4X" it was more of a joke. Nice try, no you didnt get this one. :) [/quote] Your send chat function would never receive the user on the last line of the data stream if the last line only contained one user. Debate it all you want, your coding is flawed. [/quote] Maybe you did, did I mention the coding was really old? It really was. | February 21, 2004, 6:37 PM |
synth | [quote author=Kp link=board=17;threadid=5310;start=15#msg45228 date=1077313281] Addendum to synth: Be aware that if there are an odd number of users in channel, the last user gets a line all to himself (with no comma). That will need to be handled, and would likely be quite easy to detect since a) there are no spaces in that message and b) it'll be the last one before your list-completion comes in. [/quote] Good idea. It makes it more complicated, but it'll work when there's only one username returned. So if what is returned is not null (i.e., has a length) but doesn't have a comma, then /ban the whole of what you get. +1 to you for catching that. To Spht: [quote] Why get the length if you never need to use it? [/quote] So you can get the length of the username you need to grab at the end. Like this: [code] strLen = Len(strReturned) 'get length of the string returned commaPlace = InStr(strReturned, ",") 'get the placement of the comma charsRight = strLen - (commaPlace + 1) 'get the number of chars after comma and space usernameTwo = Right(strReturned, charsRight) [/code] Inflexible, but it should work for now. [quote] Note this will only work if the server lists two names per message. This could change in the future to list 5 names per message (for example), or a single name. To avoid generalizing things, you should work under the logic of "each name is seperated by a comma" instead of "there are two names per message." [/quote] I see. Search for the numbers of commas, then add one so that you get the number of names. Good idea, it has more flexibility than mine. +1 to you also. | February 21, 2004, 7:40 PM |
UserLoser. | [quote author=Kp link=board=17;threadid=5310;start=30#msg45341 date=1077384657] [quote author=LoRd[nK] link=board=17;threadid=5310;start=30#msg45300 date=1077342562] [quote author=UserLoser. link=board=17;threadid=5310;start=30#msg45293 date=1077340399]In my case, LocalCommand is the set name for my command processor class, and UserInChannel is when you recieve 0x0F, event id 0x01 (or as some refer to as EID_USER)[/quote]Assuming the user wants to use the BotNet...[/quote] and assuming that the user doesn't flood himself on botnet due to sending so many whispers so quickly! Since botnet flood controls are more oriented to quantity of messages than to their length, it'd be much better to batch up the usernames. [/quote] I'm still yet to see something happen for flooding with whispers... People all the time on my database spam many messages at once, and nothing happens to them! (Whispers aren't calculated same way botnet chat messages are?) Also, what about accounts that use WebChannel? I'd have to say that's the closest thing there is to flooding :P | February 21, 2004, 10:56 PM |
Kp | [quote author=UserLoser. link=board=17;threadid=5310;start=30#msg45395 date=1077404178]I'm still yet to see something happen for flooding with whispers... People all the time on my database spam many messages at once, and nothing happens to them! (Whispers aren't calculated same way botnet chat messages are?) Also, what about accounts that use WebChannel? I'd have to say that's the closest thing there is to flooding :P [/quote] It's possible they're running right at the edge of the algorithm. Without seeing it happen, I can't comment for sure. However, there is a special exemption hard-wired into the server to permit Webbots to whisper to Webchannel without it being dropped for flooding (all other traffic is still flood controlled). This was necessary to prevent Webbots from flooding out upon joining large channels. | February 22, 2004, 12:38 AM |
ChR0NiC | One thing to keep in mind, because it kept messing me up and I kept getting confused.....during that 0.5 of a second where the timer is enabled 1 ban might take place, in which it will try and capitolize on that as a person in the channel, so use an exit sub just to be safe [code] If Instr(Info, "was banned by") Then Exit Sub [/code] Something along those lines.... | February 22, 2004, 1:08 AM |
Kp | [quote author=ChR0NiC link=board=17;threadid=5310;start=45#msg45421 date=1077412083] One thing to keep in mind, because it kept messing me up and I kept getting confused.....during that 0.5 of a second where the timer is enabled 1 ban might take place, in which it will try and capitolize on that as a person in the channel, so use an exit sub just to be safe[/quote] Sounds like your analysis routine is really buggy. There are no commas in the ban notify message (unless you put them in the reason, but that's easy enough to detect). You ought to be flagging only those messages which either have no spaces and no commas (listing of the final user) or messages which have a number of spaces and commas equal (this could theoretically still get confused if someone put the right number of commas in a ban reason, but some additional heuristics ought to detect and filter that). I'll leave it to you to figure the exact logic necessary to verify someone isn't using bizarre ban reasons. | February 22, 2004, 5:17 PM |
Spht | [quote author=ChR0NiC link=board=17;threadid=5310;start=45#msg45421 date=1077412083] One thing to keep in mind, because it kept messing me up and I kept getting confused.....during that 0.5 of a second where the timer is enabled 1 ban might take place, in which it will try and capitolize on that as a person in the channel, so use an exit sub just to be safe [code] If Instr(Info, "was banned by") Then Exit Sub [/code] Something along those lines.... [/quote] That's why you should be sending some binary message out which contains a cookie that would allow you to identify /who requests. You wouldn't be having those types of problems if you did. Then once you get the message back, you know that the channel listing is over, instead of using a very inaccurate constant measuring of how long it took to get a reply *on your connection* (on my connection it could take me a couple seconds to get all the results back from listing a full channel). To over explain myself, on /who, set a bChannelScanInProgress to True then send the command along with a the binary message of your choice which uses an identifier so you can later detect that the received one was because of your /who listing. Messages you get while bChannelScanInProgress=True can be processed as channel listing (assuming they follow correct format, otherwise process them as normal). When you get your binary message back, check that it triggered in response to the one you sent after the /who, then set bChannelScanInProgress to False. Note that Battle.net handles requests asynchronously, so on rare cases this may not always work. But it's a much better method than assuming the user is on X connection and not using up Y bandwidth. | February 22, 2004, 5:37 PM |