-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_comandi.php
45 lines (37 loc) · 1.07 KB
/
_comandi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
//set me to data
include '_config.php';
/*
QUESTO FILE SERVE PER AVERE SEPARATI I COMANDI DELL'USERBOT
DAI FILE BASE DI FUNZIONAMENTO DELLO STESSO
*/
if (isset($userID) && in_array($userID, $lista_admin)) {
$isadmin = true;
} else {
$isadmin = false;
}
if (isset($msg) && isset($chatID)) {
if ($isadmin) {
if (stripos($msg, '!say ') === 0) {
sm($chatID, explode(' ', $msg, 2)[1]);
}
if ($msg == '!off' and (time() - $started) > 5) {
sm($chatID, 'Mi spengo.');
exit;
}
if (stripos($msg, '!join ') === 0) {
joinChat(explode(' ', $msg, 2)[1], $chatID);
}
if ($msg == '!leave' && stripos($chatID, '-100') === 0) {
abbandonaChat($chatID);
}
//ALTRI COMANDI RISERVATI AGLI ADMIN
}
if ($msg == '!on') {
sm($chatID, "Hello world, I'm alive.");
}
if ($msg == '!pony') {
sm($chatID, "This bot is powered by altervistabot & MadelineProto.\n\nCreated by a pony and a bruno.");
}
//COMANDI DESTINATI AL PUBBLICO
}