Update find_channel_status() for halfop and owner.

This commit is contained in:
B.Greenham 2010-02-27 22:50:41 -05:00
parent 823e288d57
commit b8643345db
1 changed files with 15 additions and 1 deletions

View File

@ -175,11 +175,18 @@ find_channel_membership(struct Channel *chptr, struct Client *client_p)
const char * const char *
find_channel_status(struct membership *msptr, int combine) find_channel_status(struct membership *msptr, int combine)
{ {
static char buffer[3]; static char buffer[5];
char *p; char *p;
p = buffer; p = buffer;
if(is_owner(msptr))
{
if(!combine)
return "!";
*p++ = '!';
}
if(is_chanop(msptr)) if(is_chanop(msptr))
{ {
if(!combine) if(!combine)
@ -187,6 +194,13 @@ find_channel_status(struct membership *msptr, int combine)
*p++ = '@'; *p++ = '@';
} }
if(is_halfop(msptr))
{
if(!combine)
return "%";
*p++ = '%';
}
if(is_voiced(msptr)) if(is_voiced(msptr))
*p++ = '+'; *p++ = '+';