|
|
@ -30,6 +30,8 @@ GetOptions( |
|
|
|
"name=s" => \$opt->{name}, |
|
|
|
"name=s" => \$opt->{name}, |
|
|
|
"alias=s" => \$opt->{alias}, |
|
|
|
"alias=s" => \$opt->{alias}, |
|
|
|
"topic=s" => \$opt->{topic}, |
|
|
|
"topic=s" => \$opt->{topic}, |
|
|
|
|
|
|
|
"preset=s" => \$opt->{preset}, |
|
|
|
|
|
|
|
"visibility=s" => \$opt->{visibility} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (-e File::HomeDir->my_home . "/.patrixrc" && !$opt->{conf}){ |
|
|
|
if (-e File::HomeDir->my_home . "/.patrixrc" && !$opt->{conf}){ |
|
|
@ -284,6 +286,8 @@ sub create_room { |
|
|
|
$json->{topic} = $opt->{topic} if $opt->{topic}; |
|
|
|
$json->{topic} = $opt->{topic} if $opt->{topic}; |
|
|
|
$json->{name} = $opt->{name} if $opt->{name}; |
|
|
|
$json->{name} = $opt->{name} if $opt->{name}; |
|
|
|
$json->{invite} = $opt->{invite} if $opt->{invite}; |
|
|
|
$json->{invite} = $opt->{invite} if $opt->{invite}; |
|
|
|
|
|
|
|
$json->{preset} = $opt->{preset} if $opt->{preset}; |
|
|
|
|
|
|
|
$json->{visibility} = $opt->{visibility} if $opt->{visbility}; |
|
|
|
$req->header( 'Content-Type' => 'application/json' ); |
|
|
|
$req->header( 'Content-Type' => 'application/json' ); |
|
|
|
$req->content( to_json($json) ); |
|
|
|
$req->content( to_json($json) ); |
|
|
|
my $resp = $lwp->request( $req ); |
|
|
|
my $resp = $lwp->request( $req ); |
|
|
|