From b8643345db466e87d1fa4cd7b0e990ee1b080550 Mon Sep 17 00:00:00 2001 From: "B.Greenham" Date: Sat, 27 Feb 2010 22:50:41 -0500 Subject: [PATCH] Update find_channel_status() for halfop and owner. --- src/channel.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/channel.c b/src/channel.c index 1809ec0..8e3f570 100644 --- a/src/channel.c +++ b/src/channel.c @@ -175,11 +175,18 @@ find_channel_membership(struct Channel *chptr, struct Client *client_p) const char * find_channel_status(struct membership *msptr, int combine) { - static char buffer[3]; + static char buffer[5]; char *p; p = buffer; + if(is_owner(msptr)) + { + if(!combine) + return "!"; + *p++ = '!'; + } + if(is_chanop(msptr)) { if(!combine) @@ -187,6 +194,13 @@ find_channel_status(struct membership *msptr, int combine) *p++ = '@'; } + if(is_halfop(msptr)) + { + if(!combine) + return "%"; + *p++ = '%'; + } + if(is_voiced(msptr)) *p++ = '+';