projects
/
PHP-P10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed last commit
[PHP-P10.git]
/
Uplink
/
Uplink.class.php
diff --git
a/Uplink/Uplink.class.php
b/Uplink/Uplink.class.php
index 387f32406e207c71966fabda389990a0b783c4a5..8d0451fb5c27c223288eb252b425399bb186b816 100644
(file)
--- a/
Uplink/Uplink.class.php
+++ b/
Uplink/Uplink.class.php
@@
-786,7
+786,7
@@
class Uplink {
$priv_values = array(P10_Channel::USERPRIV_OPED, P10_Channel::USERPRIV_HALFOP, P10_Channel::USERPRIV_VOICE );
$priv_combinations = array();
$sorted_users = array();
$priv_values = array(P10_Channel::USERPRIV_OPED, P10_Channel::USERPRIV_HALFOP, P10_Channel::USERPRIV_VOICE );
$priv_combinations = array();
$sorted_users = array();
- $combinations =
expr
(2, count($privs_to_burst)); //binary possibilities => 2^count($privs_to_burst)
+ $combinations =
pow
(2, count($privs_to_burst)); //binary possibilities => 2^count($privs_to_burst)
for($i = 0; $i < $combinations; $i++) {
//make a binary number out of $i
$binary = decbin($i);
for($i = 0; $i < $combinations; $i++) {
//make a binary number out of $i
$binary = decbin($i);
@@
-797,7
+797,7
@@
class Uplink {
for($j = 0; $j < count($privs_to_burst); $j++) {
if($binary[$j] == '1') {
$combination_name .= $privs_to_burst[$j];
for($j = 0; $j < count($privs_to_burst); $j++) {
if($binary[$j] == '1') {
$combination_name .= $privs_to_burst[$j];
- $combination_value
.
= $priv_values[$j];
+ $combination_value
+
= $priv_values[$j];
}
}
$priv_combinations[] = array("name" => $combination_name, "value" => $combination_value);
}
}
$priv_combinations[] = array("name" => $combination_name, "value" => $combination_value);
@@
-818,7
+818,7
@@
class Uplink {
if($userStr != "") $userStr.=",";
$userStr .= $user->getNumeric();
if(($i++) == 0 && $combination['value'] > 0) {
if($userStr != "") $userStr.=",";
$userStr .= $user->getNumeric();
if(($i++) == 0 && $combination['value'] > 0) {
- $userStr .= $combination['name'];
+ $userStr .=
":".
$combination['name'];
}
}
}
}
}
}