Added POD to Onis::Plugins::Weekdays
[onis.git] / lib / Onis / Users.pm
index d8be529..20c2e3f 100644 (file)
@@ -3,11 +3,14 @@ package Onis::Users;
 use strict;
 use warnings;
 use Exporter;
-use Onis::Config qw#get_config#;
-use Onis::Data::Core qw(nick_to_ident);
-use Onis::Data::Persistent;
-
-@Onis::Users::EXPORT_OK = qw#host_to_username nick_to_username get_link get_image get_realname#;
+use Onis::Config (qw(get_config));
+use Onis::Data::Persistent ();
+
+@Onis::Users::EXPORT_OK =
+(qw(
+       ident_to_name chatter_to_name name_to_ident
+       get_realname get_link get_image
+));
 @Onis::Users::ISA = ('Exporter');
 
 =head1 NAME
@@ -20,12 +23,11 @@ Parses user-info and provides query-routines. The definition of "name" can be fo
 
 =head1 USAGE
 
-    use Onis::Users qw#ident_to_name chatter_to_name nick_to_name get_realname get_link get_image#;
+    use Onis::Users qw#ident_to_name chatter_to_name get_realname get_link get_image#;
 
     # Functions to query the name
     $name = ident_to_name ($ident);
     $name = chatter_to_name ($chatter);
-    $name = nick_to_name ($nick);
 
     # Functions to query a name's properties
     my $realname  = get_realname ($name);
@@ -43,13 +45,25 @@ our $IdentToName = {};
 our $NameToIdent = {};
 
 
-my $VERSION = '$Id: Users.pm,v 1.2 2004/08/01 13:45:27 octo Exp $';
+my $VERSION = '$Id$';
 print STDERR $/, __FILE__, ": $VERSION" if ($::DEBUG);
 
 read_config ();
 
 return (1);
 
+=head1 CONFIGURATION OPTIONS
+
+=over 4
+
+=item B<users_config>: I<users.conf>;
+
+Sets the file from which to read the user configuration.
+
+=back
+
+=cut
+
 sub read_config
 {
        my $config_file = 'users.conf';
@@ -240,29 +254,6 @@ sub chatter_to_name
        return (ident_to_name ($ident));
 }
 
-=item B<nick_to_name> (I<$nick>)
-
-Return the name associated with I<$nick>. This function uses B<nick_to_ident>
-(see L<Onis::Data::Core>) to convert I<$nick> to an ident and then calls
-B<ident_to_name>.
-
-=cut
-
-sub nick_to_name
-{
-       my $nick = shift;
-       my $ident = nick_to_ident ($nick);
-
-       if ($ident)
-       {
-               return (ident_to_name ($ident));
-       }
-       else
-       {
-               return ('');
-       }
-}
-
 =item B<name_to_ident> (I<$name>)
 
 Does the reverse of B<ident_to_name>: Returns the most recent association of
@@ -350,3 +341,5 @@ sub get_image
 =head1 AUTHOR
 
 Florian octo Forster E<lt>octo at verplant.orgE<gt>
+
+=cut