diff options
Diffstat (limited to 'clients/zctl/zctl.c')
-rw-r--r-- | clients/zctl/zctl.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clients/zctl/zctl.c b/clients/zctl/zctl.c index 1dfa792..f18df10 100644 --- a/clients/zctl/zctl.c +++ b/clients/zctl/zctl.c @@ -75,6 +75,7 @@ void current(int argc, char *argv[]); void do_hide(int argc, char *argv[]); void do_punt(int argc, char *argv[]); void flush_locations(int argc, char *argv[]); +void flush_subscr(int argc, char *argv[]); void hm_control(int argc, char *argv[]); void list_punts(int argc, char *argv[]); void load_subs(int argc, char *argv[]); @@ -232,6 +233,22 @@ flush_locations(int argc, } void +flush_subscr(int argc, + char *argv[]) +{ + int retval; + + if (argc > 2) { + fprintf(stderr,"Usage: %s [recipient]\n",argv[0]); + return; + } + + retval = ZFlushUserSubscriptions((argc > 1) ? argv[1] : NULL); + if (retval != ZERR_NONE) + com_err(whoami, retval, "while flushing subscriptions"); +} + +void wgc_control(int argc, char *argv[]) { @@ -1306,6 +1323,8 @@ static const struct { { "new_server" } }, { flush_locations, "Flush all location information.", { "flush_locs" } }, + { flush_subscr, "Flush all subscription information.", + { "flush_subs" } }, { do_hide, "Hide your location.", { "hide" } }, { do_hide, "Show (un-hide) your location.", |