• Welcome to Valhalla Legends Archive.
 

User Access

Started by Yegg, September 26, 2004, 01:34 PM

Previous topic - Next topic

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?

shadypalm88

If LCase(username) = GetUser("users", username) = "70" And LCase(Message) = Trigger & "rejoin" Then
Likely should be:
If GetUser("users", LCase(username)) >= 70 And LCase(Message) = Trigger & "rejoin" Then
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.

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?

l2k-Shadow

WriteUser User, Access

...?
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Yegg