Remove leading/trailing whitespace from nick/channel/lang/code

This commit is contained in:
Pragmatic Software 2015-01-18 05:42:28 -08:00
parent 8999e22db1
commit 76ead7c8cb
1 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,12 @@ sub new {
$self->{default_options} = '';
$self->{cmdline} = 'echo Hello, world!';
# remove leading and trailing whitespace
$self->{nick} =~ s/^\s+|\s+$//g;
$self->{channel} =~ s/^\s+|\s+$//g;
$self->{lang} =~ s/^\s+|\s+$//g;
$self->{code} =~ s/^\s+|\s+$//g;
$self->initialize(%conf);
return $self;