Forgot to send the patch :)
Index: include/config.h
===================================================================
RCS file: /home/cvs/repository/epic4/include/config.h,v
retrieving revision 1.11
diff -u -r1.11 config.h
--- include/config.h    2002/01/25 21:57:09     1.11
+++ include/config.h    2002/02/13 19:04:16
@@ -414,6 +414,7 @@
 #define DEFAULT_STATUS_AWAY " (Away)"
 #define DEFAULT_STATUS_CHANNEL " %C"
 #define DEFAULT_STATUS_CHANOP "@"
+#define DEFAULT_STATUS_HALFOP "%"
 #define DEFAULT_STATUS_SSL_ON "*SSL*"
 #define DEFAULT_STATUS_SSL_OFF "*RAW*"
 #define DEFAULT_STATUS_CLOCK " %T"
Index: include/names.h
===================================================================
RCS file: /home/cvs/repository/epic4/include/names.h,v
retrieving revision 1.5
diff -u -r1.5 names.h
--- include/names.h     2001/09/27 15:57:33     1.5
+++ include/names.h     2002/02/13 19:04:16
@@ -46,6 +46,7 @@
        Char *  fetch_userhost          (int, Char *);
        int     get_channel_oper        (Char *, int);
        int     get_channel_voice       (Char *, int);
+       int     get_channel_halfop      (Char *, int);
 struct WindowStru *get_channel_window  (Char *, int);
        void    set_channel_window      (struct WindowStru *, Char *);
        char *  create_channel_list     (int);
Index: include/vars.h
===================================================================
RCS file: /home/cvs/repository/epic4/include/vars.h,v
retrieving revision 1.8
diff -u -r1.8 vars.h
--- include/vars.h      2002/01/25 21:57:09     1.8
+++ include/vars.h      2002/02/13 19:04:16
@@ -136,6 +136,7 @@
        STATUS_FORMAT_VAR,
        STATUS_FORMAT1_VAR,
        STATUS_FORMAT2_VAR,
+       STATUS_HALFOP_VAR,
        STATUS_HOLD_VAR,
        STATUS_HOLD_LINES_VAR,
        STATUS_INSERT_VAR,
Index: source/names.c
===================================================================
RCS file: /home/cvs/repository/epic4/source/names.c,v
retrieving revision 1.18
diff -u -r1.18 names.c
--- source/names.c      2002/01/24 10:45:25     1.18
+++ source/names.c      2002/02/13 19:04:19
@@ -1517,6 +1517,16 @@
                return 0;
 }
 
+int    get_channel_halfop (const char *channel, int server)
+{
+       Channel *chan;
+
+       if ((chan = find_channel(channel, server)))
+               return chan->half_assed;
+       else
+               return 0;
+}
+
 int    get_channel_voice (const char *channel, int server)
 {
        Channel *chan;
Index: source/status.c
===================================================================
RCS file: /home/cvs/repository/epic4/source/status.c,v
retrieving revision 1.6
diff -u -r1.6 status.c
--- source/status.c     2002/01/25 21:57:10     1.6
+++ source/status.c     2002/02/13 19:04:21
@@ -1007,10 +1007,16 @@
 {
        char    *text;
 
-       if (window->current_channel && window->server != -1 &&
-           get_channel_oper(window->current_channel, window->server) &&
-           (text = get_string_var(STATUS_CHANOP_VAR)))
-               return text;
+       if (!window->current_channel && window->server == -1)
+               return empty_string;
+       
+       if (get_channel_oper(window->current_channel, window->server) &&
+               (text = get_string_var(STATUS_CHANOP_VAR)))
+                       return text;
+
+       if (get_channel_halfop(window->current_channel, window->server) &&
+               (text = get_string_var(STATUS_HALFOP_VAR)))
+                       return text;
 
        return empty_string;
 }
Index: source/vars.c
===================================================================
RCS file: /home/cvs/repository/epic4/source/vars.c,v
retrieving revision 1.10
diff -u -r1.10 vars.c
--- source/vars.c       2002/01/25 21:57:10     1.10
+++ source/vars.c       2002/02/13 19:04:24
@@ -209,6 +209,7 @@
        { "STATUS_FORMAT",              STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
        { "STATUS_FORMAT1",             STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
        { "STATUS_FORMAT2",             STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
+       { "STATUS_HALFOP",              STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
        { "STATUS_HOLD",                STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
        { "STATUS_HOLD_LINES",          STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
        { "STATUS_INSERT",              STR_TYPE_VAR,   0, NULL, build_status, 0, 0 },
@@ -329,6 +330,7 @@
        set_string_var(STATUS_AWAY_VAR, DEFAULT_STATUS_AWAY);
        set_string_var(STATUS_CHANNEL_VAR, DEFAULT_STATUS_CHANNEL);
        set_string_var(STATUS_CHANOP_VAR, DEFAULT_STATUS_CHANOP);
+       set_string_var(STATUS_HALFOP_VAR, DEFAULT_STATUS_HALFOP);
        set_string_var(STATUS_SSL_ON_VAR, DEFAULT_STATUS_SSL_ON);
        set_string_var(STATUS_SSL_OFF_VAR, DEFAULT_STATUS_SSL_OFF);
        set_string_var(STATUS_CLOCK_VAR, DEFAULT_STATUS_CLOCK);


Reply via email to