mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-26 20:14:34 +01:00
Remove leading/trailing whitespace from nick/channel/lang/code
This commit is contained in:
parent
8999e22db1
commit
76ead7c8cb
@ -30,6 +30,12 @@ sub new {
|
|||||||
$self->{default_options} = '';
|
$self->{default_options} = '';
|
||||||
$self->{cmdline} = 'echo Hello, world!';
|
$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);
|
$self->initialize(%conf);
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
Loading…
Reference in New Issue
Block a user