[prev] [thread] [next] [lurker] [Date index for 2002/09/06]
Update of /cvsroot/siesta/siesta/bin In directory usw-pr-cvs1:/tmp/cvs-serv13695/bin Modified Files: nacho Log Message: Added even more stuff. Index: nacho =================================================================== RCS file: /cvsroot/siesta/siesta/bin/nacho,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- nacho 6 Sep 2002 11:29:08 -0000 1.6 +++ nacho 6 Sep 2002 13:16:37 -0000 1.7 @@ -13,7 +13,7 @@ show-users new-user delete-user modify-user show-list show-user create-alias show-users-list show-lists-user - add-user-list + add-user-list remove-user-list list-all-plugins list-plugins ); @@ -197,6 +197,7 @@ $user->delete(); + print "User '$user_id' deleted\n"; } =head2 modify-user [user id] [key] [value] @@ -256,7 +257,7 @@ print "Created the new list '$list_id' <$post_addr>\n"; print "Paste this into your alias file to activate the list\n\n"; - print create_alias($list_id); + create_alias($list_id); } @@ -279,6 +280,8 @@ } $list->delete(); + + print "List '$list_id' deleted\n"; } =head2 show-list [list id] @@ -352,8 +355,11 @@ printf "## %s mailing list\n", $list_id; printf "## created: %s nacho (the siesta config tool)\n", strftime("%d-%b-%Y", localtime(time)); - printf "%s: \"%s%s %s\"\n", $post, $path, 'tequila', $list->id(); - printf "%s: %s\n\n\nq", $ret, $list->owner(); + printf "%s: \"%s%s %s\"\n", $post, $path, 'tequila', $list->id(); + printf "%s-sub: \"%s%s %s sub\"\n", $post, $path, 'tequila', $list->id(); + printf "%s-unsub: \"%s%s %s unsub\"\n", $post, $path, 'tequila', $list->id(); + printf "%s-admin: %s\n", $post, $list->owner(); + printf "%s: %s\n\n\n", $ret, $list->owner(); } @@ -390,6 +396,34 @@ } +=head2 remove-user-list [list id] [user id(s)] + +removes the specified user(s) from the list. + +=cut + +sub remove_user_list +{ + my $list_id = shift || die "You must pass a user id\n"; + + my $list = Siesta::List->new($list_id) || die "Not a valid list id\n"; + + + my $user_id = shift || die "You must pass a user id\n"; + + while ($user_id) + { + # TODO - create new user if not valid + my $user = Siesta::User->new($user_id) || die "$user_id is not a valid user id\n"; + + $list->remove_member($user); + + print "User '$user_id' removed from list '$list_id'\n"; + + $user_id = shift; + } +} + =head2 list-all-plugins List all plugins in the system. @@ -444,7 +478,7 @@ (my $name = $0) =~ s!^.*[\\/]!!; return join '', "Usage: $name ", join (" ", map { "[$_]" } @modes), - "\n See the $name manpage for more details"; + "\nSee the $name manpage for more details";
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52