- Also fixed a place where a newline was not sent to the client
- Added a "door" flag
USER_TYPE_WHEEL = 0x02,
USER_TYPE_GOD = 0x03,
- USER_FLAG_DISABLED = 0x80
+ USER_FLAG_DOORGROUP = 0x40,
+ USER_FLAG_DISABLED = 0x80
};
// --- Cokebank Functions ---
// Get recipient
uid = GetUserID(recipient);
if( uid == -1 ) {
- sendf(Client->Socket, "404 Invalid target user");
+ sendf(Client->Socket, "404 Invalid target user\n");
return ;
}
reason ++;
// TODO: Check if the current user is in coke/higher
+ if( (GetFlags(Client->UID) & USER_FLAG_TYPEMASK) < USER_TYPE_COKE ) {
+ sendf(Client->Socket, "403 Not in coke\n");
+ return ;
+ }
// Get recipient
uid = GetUserID(user);
if( uid == -1 ) {
- sendf(Client->Socket, "404 Invalid user");
+ sendf(Client->Socket, "404 Invalid user\n");
return ;
}