version 1.534, 2017/03/20 03:19:37
|
version 1.535, 2017/03/20 13:53:22
|
Line 265 my %trust = (
|
Line 265 my %trust = (
|
putstore => {remote => 1, enroll => 1}, |
putstore => {remote => 1, enroll => 1}, |
queryreply => {anywhere => 1}, |
queryreply => {anywhere => 1}, |
querysend => {anywhere => 1}, |
querysend => {anywhere => 1}, |
|
querysend_activitylog => {remote => 1}, |
|
querysend_allusers => {remote => 1, domroles => 1}, |
|
querysend_courselog => {remote => 1}, |
|
querysend_fetchenrollment => {remote => 1}, |
|
querysend_getinstuser => {remote => 1}, |
|
querysend_getmultinstusers => {remote => 1}, |
|
querysend_instdirsearch => {remote => 1, domroles => 1, coaurem => 1}, |
|
querysend_institutionalphotos => {remote => 1}, |
|
querysend_portfolio_metadata => {remote => 1, content => 1}, |
|
querysend_userlog => {remote => 1, domroles => 1}, |
|
querysend_usersearch => {remote => 1, enroll => 1, coaurem => 1}, |
quit => {anywhere => 1}, |
quit => {anywhere => 1}, |
readlonnetglobal => {institutiononly => 1}, |
readlonnetglobal => {institutiononly => 1}, |
reinit => {manageronly => 1}, #not used currently |
reinit => {manageronly => 1}, #not used currently |
Line 3954 sub retrieve_chat_handler {
|
Line 3965 sub retrieve_chat_handler {
|
# serviced. |
# serviced. |
# |
# |
# Parameters: |
# Parameters: |
# $cmd - COmmand keyword that initiated the request. |
# $cmd - Command keyword that initiated the request. |
# $tail - Remainder of the command after the keyword. |
# $tail - Remainder of the command after the keyword. |
# For this function, this consists of a query and |
# For this function, this consists of a query and |
# 3 arguments that are self-documentingly labelled |
# 3 arguments that are self-documentingly labelled |
Line 3968 sub retrieve_chat_handler {
|
Line 3979 sub retrieve_chat_handler {
|
sub send_query_handler { |
sub send_query_handler { |
my ($cmd, $tail, $client) = @_; |
my ($cmd, $tail, $client) = @_; |
|
|
|
|
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
|
|
my ($query,$arg1,$arg2,$arg3)=split(/\:/,$tail); |
my ($query,$arg1,$arg2,$arg3)=split(/\:/,$tail); |
Line 6542 sub process_request {
|
Line 6552 sub process_request {
|
$ok = 0; |
$ok = 0; |
} |
} |
if ($ok) { |
if ($ok) { |
|
my $realcommand = $command; |
|
if ($command eq 'querysend') { |
|
my ($query,$rest)=split(/\:/,$tail,2); |
|
$query=~s/\n*$//g; |
|
my @possqueries = |
|
qw(userlog courselog fetchenrollment institutionalphotos usersearch instdirsearch getinstuser getmultinstusers); |
|
if (grep(/^\Q$query\E$/,@possqueries)) { |
|
$command .= '_'.$query; |
|
} elsif ($query eq 'prepare activity log') { |
|
$command .= '_activitylog'; |
|
} |
|
} |
if (ref($trust{$command}) eq 'HASH') { |
if (ref($trust{$command}) eq 'HASH') { |
my $donechecks; |
my $donechecks; |
if ($trust{$command}{'anywhere'}) { |
if ($trust{$command}{'anywhere'}) { |
Line 6583 sub process_request {
|
Line 6605 sub process_request {
|
} |
} |
} |
} |
} |
} |
|
$command = $realcommand; |
} |
} |
|
|
if($ok) { |
if($ok) { |