|
|
|
@ -78,4 +78,33 @@ function inviteUser(array $user, $userid, array $clan = NULL){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function challengeClan(array $user, array $charids, $clanid, $validTime = 24) {
|
|
|
|
|
if($clan === NULL) {
|
|
|
|
|
$qry = mysql_query('Select * from clan where id = ' . $user['clan']);
|
|
|
|
|
$clan = mysql_fetch_assoc($qry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($clan['leader'] != $user['id'] && $clan['co_leader'] != $user['id']){
|
|
|
|
|
return 'Nur der Leader, bzw. der Co-Leader kann andere Clans herausfordern!!';
|
|
|
|
|
}
|
|
|
|
|
// TODO: Further implementation
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function acceptChallenge(array $user, array $charids) {
|
|
|
|
|
if($clan === NULL) {
|
|
|
|
|
$qry = mysql_query('Select * from clan where id = ' . $user['clan']);
|
|
|
|
|
$clan = mysql_fetch_assoc($qry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($clan['leader'] != $user['id'] && $clan['co_leader'] != $user['id']){
|
|
|
|
|
return 'Nur der Leader, bzw. der Co-Leader kann herausforderungen anderer Clans annehmen!!';
|
|
|
|
|
}
|
|
|
|
|
// TODO: Further implementation
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|