ID:184012
 
I was wondering if there are any demos out there on how to make a member system and how to give some people admin?
bump
In response to Upinflames (#1)
Since you were so considerate as to bump your post and bring it to my attention repeatedly, I'm obliged to help you out.

var/list
members=new
admins=new
proc
add_member(var/non_member_key)
ASSERT(!is_member(non_member_key))
members.Add(non_member_key)
remove_member(var/member_key)
ASSERT(is_member(member_key))
members.Remove(member_key)
is_member(var/test_key)
ASSERT(istext(test_key))
return members.Find(test_key)
add_admin(var/member_key)
ASSERT(is_member(member_key))
ASSERT(!is_admin(member_key))
admins.Add(member_key)
remove_admin(var/admin_key)
ASSERT(is_admin(admin_key))
admins.Remove(admin_key)
is_admin(var/test_key)
ASSERT(is_member(test_key))
return admins.Find(test_key)
//example admin command
mob/verb/boot(mob/m in world)
set category="admin"
if(is_admin(src.key))
if(m != src)
m << "A channel administrator booted you."
del m
else src << "Don't boot yourself, silly."
else src << "Only channel administrators may access this command."
In response to PirateHead (#2)
PirateHead wrote:
Since you were so considerate as to bump your post and bring it to my attention repeatedly, I'm obliged to help you out.

The (justified) sarcasm is killing me!