… | |
… | |
201 | $cnt++; |
201 | $cnt++; |
202 | } |
202 | } |
203 | } |
203 | } |
204 | |
204 | |
205 | if ($cnt) { |
205 | if ($cnt) { |
206 | $who->reply ($npc, $cnt == 1 ? "Here is your pakage." : "Here are your packages."); |
206 | $who->reply ($npc, $cnt == 1 ? "Here is your package." : "Here are your packages."); |
207 | } else { |
207 | } else { |
208 | $who->reply ($npc, "Sorry, no deliverys for you sir."); |
208 | $who->reply ($npc, "Sorry, no deliveries for you sir."); |
209 | } |
209 | } |
210 | } |
210 | } |
211 | |
211 | |
212 | } elsif ($cmd eq 'send') { |
212 | } elsif ($cmd eq 'send') { |
213 | unless ($arguments =~ /^\S+$/) { |
213 | unless ($arguments =~ /^\S+$/) { |
… | |
… | |
262 | package CFMail; |
262 | package CFMail; |
263 | |
263 | |
264 | use POSIX qw/strftime/; |
264 | use POSIX qw/strftime/; |
265 | use CFDB; |
265 | use CFDB; |
266 | |
266 | |
267 | my $MAILDB = CFDB->new (db_file => cf::localdir . "/crossfiremail"); |
267 | my $MAILDB = CFDB->new (db_file => "$LOCALDIR/crossfiremail"); |
268 | |
268 | |
269 | sub get_mail { |
269 | sub get_mail { |
270 | my ($toname) = @_; |
270 | my ($toname) = @_; |
271 | $MAILDB->get ($toname); |
271 | $MAILDB->get ($toname); |
272 | } |
272 | } |