Valhalla Legends Forums Archive | Battle.net Bot Development | User Access

AuthorMessageTime
Yegg
I cant get my csb bot to recognize users as having access:
I have a module that writes and gets stuff from users.txt:
In users.txt, at the top i have [users] and under that is where the username go: I have something like this:
username=100

so the bot should read to see if the username is in there and wut its access is.
In my usertalk event i have stuff like this:


If LCase(username) = GetUser("users", username) = "70" And LCase(Message) = Trigger & "rejoin" Then
CleanSlateBot1.Send "/join The Void"
CleanSlateBot1.Send "/join " & strCurrentChannel
End If

I have no clue wut im doing wrong because i used this same code for shitlist, and my shitlist works. can ne1 help me with this?
September 26, 2004, 6:34 PM
shadypalm88
[code]If LCase(username) = GetUser("users", username) = "70" And LCase(Message) = Trigger & "rejoin" Then[/code]
Likely should be:
[code]If GetUser("users", LCase(username)) >= 70 And LCase(Message) = Trigger & "rejoin" Then[/code]
I just check if the trigger is at the beginning of the message right away, and then strip it out, so you're not going through this whole sequence on messages that aren't commands.
September 26, 2004, 6:40 PM
Yegg
Ok, shady, thanks for that part, but i also have commands that i use to add ppl to the userlist. Now that im using ur code for the bot to GetUser, how do i WriteUser?
September 26, 2004, 6:55 PM
l2k-Shadow
WriteUser User, Access

...?
September 26, 2004, 8:58 PM
Yegg
nvm it works now.
September 26, 2004, 10:28 PM

Search