Author | Message | Time |
---|---|---|
ObJeCtiVe | Hi, im new here, and I need some help... I need help on VB, I am making a bot, pure Ops control, I need some help with The accesses I would want to make a bot with only 2 access ranks, Master and Leader. and I have No clue where to start. and How to make the commands only work for Master, and the rest for leader. Anythiing will help. | June 10, 2003, 12:36 AM |
RhiNo | [quote author=ObJeCtiVe link=board=17;threadid=1596;start=0#msg11951 date=1055205409] Hi, im new here, and I need some help... I need help on VB, I am making a bot, pure Ops control, I need some help with The accesses I would want to make a bot with only 2 access ranks, Master and Leader. and I have No clue where to start. and How to make the commands only work for Master, and the rest for leader. Anythiing will help. [/quote] just a suggesetion get the book Visual Basic 6 for windows by harold davis pretty easy to learn from and shows u database controls its a great help for beginers and for refrence. or look online for tutorials/refrences | June 11, 2003, 11:24 PM |
ObJeCtiVe | Yeah thanks, i got that part down But not i got another prob, I have Flood protection and so on But the only time it will work is when its activated befor the flooding happens, IE Im in the channel and then a flood comes and i turn on flood proection, it dont ban, but if i reconnect and turn it on befor the next one comes in it works. any ideas for this? | June 11, 2003, 11:53 PM |
WiLD | Just a though, do you have a queue? if so try clear queue, it might be trying to ban the first floodbot but since its not on it moves to the seconds and so on, this will cause it to try and ban the ones that arnt online.... just a though | June 12, 2003, 11:35 PM |
Eternal | [quote author=ObJeCtiVe link=board=17;threadid=1596;start=0#msg12134 date=1055375602] Yeah thanks, i got that part down But not i got another prob, I have Flood protection and so on But the only time it will work is when its activated befor the flooding happens, IE Im in the channel and then a flood comes and i turn on flood proection, it dont ban, but if i reconnect and turn it on befor the next one comes in it works. any ideas for this? [/quote] Sounds like something in your code is not activating flood protection properly. It's hard to comment without seeing it. All I can really say is read it line by line and see exactly what it is doing. Look at it when you turn on and off the protection and what happens when a user joins the channel (which may be calling a separate function). | June 18, 2003, 3:43 PM |
UnkNOwN..MaN. | well first of all you gana have to put this in da moddel. you gana have to make a AccessList.ini (config) thing that will go where ur bot goes and put htis code in a model [code] Function RetrieveAccess(appname As String, key As String) As String Dim sFile As String Dim sDefault As String Dim lSize As Integer Dim L As Long Dim sUser As String sUser = Space$(128) lSize = Len(sUser) sFile = App.Path & "\AccessList.ini" 'ini is config settings sDefault = "" L = GetPrivateProfileString(appname, key, sDefault, sUser, lSize, sFile) sUser = Mid(sUser, 1, InStr(sUser, Chr(0)) - 1) RetrieveAccess = sUser End Function [/code] then your gana have to make cmds have like a "access=m then" for cmds for master access and so on and so on, i'm to lazy t type it all up. cya | July 1, 2003, 1:33 AM |
UserLoser | You could do something with flags/numbers [for access], and a listview to hold the database in, here's a simple example... Make a LoadDatabase() sub like this... [code] Public Sub LoadDatabase() Open app.path & "\Database.txt" for Input as #1 Do Until EOF(1) Line Input #1, strTemp Splt() = Split(strTemp, " ") With SomeListview .ListItems.Add , , Splt(0) 'Username .ListItems(.ListItems.Count).Tag = Splt(1) 'User's Flags End With Loop Close #1 End Sub [/code] That would load the database into a listview, assuming that the database is stored in <name> <flags> format in Database.txt For commands, you could do something like this.... [code] Sub ProcessCommand(ByVal Username as String, ByVal Message as String) For I = 1 to SomeListView.ListItems.Count If LCase(SomeListView.ListItems(I).text) = LCase(Username) Then Found = True: Exit For Next I If Not Found Then Exit Sub BlahBlahBlah command code here... End Sub [/code] | July 1, 2003, 2:06 AM |