Author | Message | Time |
---|---|---|
TriCk | How would i make a working command queue? Like when Channel LockDown is on sometimes my bot will flood out from banning username too many times, with this thought i would also like to know how to smartban like if someone joins 9 times ban once.... but i'd like queue first. I've asked this question a few times but noone has given me much help with it... i need to know how to add them to a queue to be banned and send them every couple of seconds instead of like 10 at a time when my bot fails to ban a flood or mass joins... | May 26, 2003, 6:48 AM |
______ | sigh....im just gonna shut up now. | May 26, 2003, 6:52 AM |
TriCk | The thing is ive looked over most of the other ones... and they use Winsocks And im using csb... so some of the stuff doesnt work... | May 26, 2003, 6:54 AM |
______ | Most of the time it doesnt matter. | May 26, 2003, 6:55 AM |
TriCk | is SendQueue transferrable to CSB ? | May 26, 2003, 6:58 AM |
______ | https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=999 go there i gave some code just change the list view into a list box and change listitsms(i).text to .list(i) and Remove(i) when removing them and it should work. Edit: it should give you an idea of how to do this. | May 26, 2003, 6:59 AM |
TriCk | OK 1 question what was easy to fix ??? And something about sending more than 1... Thats not what i want i want it to wait ... | May 26, 2003, 7:04 AM |
______ | Make a list box name lquemsg make a timer named que1 give it an interval of 1800 [code] Private Sub Que1_Timer() Dim quetick1 As Integer Dim queinterval1 As Integer queinterval1 = 1800 If LQueMsg.ListCount >= 1 Then quetick1 = quetick1 + 1 If quetick1 >= queinterval1 Then Send LQueMsg.List(0), True 'cleanslatebot1.send LQueMsg.List(0) LQueMsg.RemoveItem (0) quetick1 = 0 End If End If End Sub [/code] thats how i que them when a command is issued like !ver Lquemsg.additem "version" but so far as i know of this is not a good way of queueing messages becasues it slower but i dont care it works fine for me. | May 26, 2003, 7:12 AM |
TriCk | So i'll need two timers and to Call it in a command like this ban code ... If Username = Form2.txtMaster Then If Left((LCase(Message)), 5) = (Form2.txtTrigger.Text & "ban ") Then Dim bannedname As String banned2name = Right(Message, (Len(Message) - 5)) Text1.Text = Text1.Text + 1 Dim banCount As String banCount = Text1.Text If ProtectedUsers.IsOnList(Username) = True Then 'Don't Ban Else 'Ban CleanSlateBot1.Send "/ban " & banned2name & " Jew #" & banCount End If End If End If Where would it go ??? | May 26, 2003, 7:15 AM |
______ | instead of saying cleanslatebot use Lquemsg.additem "/ban " & banned2name & " Jew #" & banCount and i said u only need 1 timer for my lquemsg | May 26, 2003, 7:18 AM |
TriCk | Would where CleanSlateBot1.Send "/ban " etc.... Be CleanSlateBot1.Send LQueMsg.AddItem then something here i dont know what though .... :-X | May 26, 2003, 7:20 AM |
TriCk | oh that last post was sent before i read ur last one... ummm but then how does the Que1_Timer() send the Item ?? | May 26, 2003, 7:21 AM |
______ | under this [code] Private Sub Que1_Timer() Dim quetick1 As Integer Dim queinterval1 As Integer queinterval1 = 1800 If LQueMsg.ListCount >= 1 Then quetick1 = quetick1 + 1 If quetick1 >= queinterval1 Then cleanslatebot1.send LQueMsg.List(0) LQueMsg.RemoveItem (0) quetick1 = 0 End If End If End Sub [/code] and on your !ban code replace cleanslatebot with lquemsg.additem "ban " etc. | May 26, 2003, 7:23 AM |
TriCk | ok.. Its triggering an error on this... CleanSlateBot1.Send LQueMsg.List(0), True | May 26, 2003, 7:25 AM |
______ | [quote author=TriCk link=board=17;threadid=1436;start=0#msg10718 date=1053933954] ok.. Its triggering an error on this... CleanSlateBot1.Send LQueMsg.List(0), True [/quote] of course get rid of ,true | May 26, 2003, 7:27 AM |
TriCk | i did that ... but i was wondering if i use & in commands will it still add it all to the list ?? | May 26, 2003, 7:29 AM |
______ | if you mean like lquemsg.additem "you are " & username & "using " & product then yes | May 26, 2003, 7:31 AM |
TriCk | Ummm Its enqueueing the commands But CleanSlateBot is not sending them.... i made the ListBox visible and its adding them to queue but its not actually sending through csb... | May 26, 2003, 7:32 AM |
______ | what do u have under Private Sub Que1_Timer() | May 26, 2003, 7:34 AM |
TriCk | Private Sub Que1_Timer() Dim quetick1 As Integer Dim queinterval1 As Integer queinterval1 = 1800 If LQueMsg.ListCount >= 1 Then quetick1 = quetick1 + 1 If quetick1 >= queinterval1 Then CleanSlateBot1.Send LQueMsg.List(0) LQueMsg.RemoveItem (0) quetick1 = 0 End If End If End Sub | May 26, 2003, 7:35 AM |
TriCk | And ____ do u have AIM or MSN so i dont have to be waiting ages for a reply ...? | May 26, 2003, 7:36 AM |
______ | 2 things 1 did u set the que interval in its proerties to 1800? 2nd put if cleanslatebot.connected then 'added If LQueMsg.ListCount >= 1 Then quetick1 = quetick1 + 1 If quetick1 >= queinterval1 Then cleanslatebot1.send LQueMsg.List(0) LQueMsg.RemoveItem (0) quetick1 = 0 End If End If Endif ' added End Sub Edit: put this right above cleanslatebot.send Addtext vbBlue, txtName.Text & ": ", vbWhite, LQueMsg.List(0) so you can see it txtname.text is my username on logon change it to whatever fits. | May 26, 2003, 7:39 AM |
TriCk | First thing its not removing them... And its not banning them... | May 26, 2003, 7:56 AM |
TriCk | And i just read some of the comments on the other post u gave me earlier it says u used a ListView... I'm using a listbox... should i change to listview ?? | May 26, 2003, 7:58 AM |
______ | Then the way your checking the user is prob somewhat off, this code works fine. for cleanslate bot and winsocks. ' you 5's seem they should be 4's if u have only 1 letter trigger If Username = Form2.txtMaster Then If Left((LCase(Message)), 5) = (Form2.txtTrigger.Text & "ban ") Then Dim bannedname As String banned2name = Right(Message, (Len(Message) - 5)) Text1.Text = Text1.Text + 1 Dim banCount As String banCount = Text1.Text If ProtectedUsers.IsOnList(Username) = True Then 'Don't Ban Else 'Ban lquemsg.additem "/ban " & banned2name & " Jew #" & banCount ' this has been added, this hsould work if it worked for cleanslatebot End If End If End If hmm on ur form2.txtmaster you dont have form2txtmaster.text shouldnt bancount be dim'ed as an integer? | May 26, 2003, 8:03 AM |
TriCk | well they're 5's because i made it "$ban " the space is there because i havent added if User types.. "$ban" then nothin happens coz "$ban" on its own causes the bot to crash ... ??? and it still doesnt work >:( | May 26, 2003, 8:07 AM |
______ | nvm about the 4's your right about the 5 i missed the space... the only thing i could see wrong with this is that If Username = Form2.txtMaster Then make it If lcase(Username) = lcase(Form2.txtMaster) Then | May 26, 2003, 8:11 AM |
TriCk | nvm i found the problem.... CleanSlateBot1.Send LQueMsg.List(1) LQueMsg.RemoveItem (0) u gave me CleanSlateBot1.Send LQueMsg.List(0) LQueMsg.RemoveItem (0) I only just realised that then because i know for a fact that List(0) would select the Zero on the List... which there is none 1 selected Item 1 and RemoveItem(0) removes Item(1) Thanks ____ for all the help PS: We got a Very Hot Topic hehe ;D Later... -TriCk | May 26, 2003, 8:13 AM |
______ | np ;D | May 26, 2003, 8:15 AM |
TriCk | ______ **** i been callin u ____ soz :P | May 26, 2003, 8:17 AM |
Camel | use the [ code ] tag plz. | May 26, 2003, 5:00 PM |