return ($this->kickuser($user_out, $out_reas));
}
- function chatt_send($user, $mesg)
+ function chatt_send($user, $mesg, $mlang_indwr = NULL)
{
GLOBAL $G_base, $G_alarm_passwd, $mlang_brisk, $G_lang;
$only_you = FALSE;
} while (0);
} // nick chat command
else if (strncmp($msg, "/info ", 6) == 0) {
- $info_user = substr($msg, 6);
+ do {
+ if (! $user->is_auth()) {
+ if ($mlang_indwr) {
+ $to_user = nickserv_msg($dt, $mlang_indwr['info_auth'][$G_lang]);
+ }
+ else {
+ $to_user = nickserv_msg($dt, "error");
+ }
+ break;
+ }
+ $info_user = substr($msg, 6);
- echo $this->info_show($user, urldecode($info_user), $dt);
+ echo $this->info_show($user, urldecode($info_user), $dt);
+ } while(0);
}
else if (strncmp($msg, "/st ", 4) == 0) {
log_main("chatt_send BEGIN");
$user->step_inc();
}
else if ($argz[0] == 'chatt') {
- $bin5->chatt_send(&$user,$mesg);
+ $bin5->chatt_send(&$user, $mesg);
}
else if ($argz[0] == 'preferences_update') {
log_wr("PER DI PREFERENCES_UPDATE");
Saluti e buone partite, mop.<br>',
'en' => 'EN mhtml [%s] [%s]'),
'info_err' => array( 'it' => 'E\' occorso un errore (%d), riprova più tardi.',
+ 'en' => 'Some error occurs (%d), retry later.'),
+ 'info_auth' => array('it' => 'Non essendo autenticato non puoi costruire una rete di preferenze.',
'en' => 'Some error occurs (%d), retry later.')
);
log_wr("PING RECEIVED");
}
else if ($argz[0] == 'info') {
- if ($argz[1] == 'save') {
- if (!isset($post['info'])) {
+ if ($user->is_auth()) {
+ if ($argz[1] == 'save') {
+ if (!isset($post['info'])) {
+ return FALSE;
+ }
+ if (($ret = $brisk->info_save($user, $post['info'])) == 0) {
+ echo "1";
+ return TRUE;
+ }
+
+ printf($mlang_indwr['info_err'][$G_lang], $ret);
return FALSE;
}
- if (($ret = $brisk->info_save($user, $post['info'])) == 0) {
- echo "1";
- return TRUE;
- }
-
- printf($mlang_indwr['info_err'][$G_lang], $ret);
+ }
+ else {
+ printf($mlang_indwr['info_auth'][$G_lang]);
return FALSE;
}
}
}
else if ($argz[0] == 'chatt') {
- $brisk->chatt_send(&$user, xcapemesg($mesg));
+ $brisk->chatt_send(&$user, xcapemesg($mesg), $mlang_indwr);
}
else if ($argz[0] == 'tosmgr') {
// check IF is authnticated user, both terms of service versions matches