Added fpfmt() to API::Std, and removed the %20's from Bin.

This commit is contained in:
Elijah Perrault committed 2011-02-27 16:17:40 -07:00
1 parent ec363be888
commit b0fc9065f5
3 files changed
+10 -2

No files matched your search

+9 -1
View File
@@ -12,7 +12,7 @@ use base qw(Exporter);
our (%LANGE, %MODULE, %EVENTS, %HOOKS, %CMDS);
our @EXPORT_OK = qw(conf_get trans err awarn timer_add timer_del cmd_add
cmd_del hook_add hook_del rchook_add rchook_del match_user
has_priv mod_exists ratelimit_check);
has_priv mod_exists ratelimit_check fpfmt);
# Initialize a module.
@@ -516,6 +516,14 @@ sub awarn
return 1;
}
# Formatting a file path.
sub fpfmt {
my ($path) = @_;
if ($path =~ m/\s/xsm) { return "\"$path\""; }
else { return $path; }
}
1;
# vim: set ai et sw=4 ts=4: