Author | Message | Time |
---|---|---|
JaMi | Could someone help me out with adding a safelist? i dont want the source code for it (unless you feel thats the only way) id prefer to have it explained, where i can actually learn something from it. I only come here and ask questions when ive tried to figure it out myself and can't.. ive tried a few methods for this and all of them = nowhere near the result i was trying to achieve. Any help would be greatly appreciated, Thanx in advance | February 10, 2003, 3:11 AM |
KBL_BlackIce | My thoughts on a Safe List are this: Users who are on the safe list cannot be banned/kicked/etc. You add users to a safe list by adding a flag to their status (for the bot, not bnet). For example, in VB6, where the flags S == Safe, A == Admin [code] Dim UserX as New USERCLASS UserX.Flags = SA [/code] That would mean that the user is safelisted and is the bot master. Then, on a kick event sent to the bot, you simply check the flags. I never was good at AND and OR checking (bitwise, not logical), but I think you would do something comparable to the following: [code] Sub KickUser (User as USERCLASS) If (User.Flags AND S) = S Then 'The user is safelisted, do not kick Else KickUser(User.Name) End If End Sub [/code] I hope this is something along the lines of what you were looking for. | February 10, 2003, 4:38 AM |
Skywing | Looks good.. bitwise OR combines flags, so you'd probably want 'UserX.Flags = A OR S'. | February 10, 2003, 9:39 AM |