Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($update['update']['message']['action']) &&
- ($update['update']['message']['action']['_'] === "messageActionChatAddUser")){
- if(in_array($userID, $gaID))
- {
- foreach($update['update']['message']['action']['users'] as $user){
- $about = $MadelineProto->get_info($user);
- $nomenuovo = $about['User']['first_name'];
- $unomenuovo = $about['User']['username'];
- $a = $MadelineProto->get_pwr_chat($user);
- if(file_exists("benvenuto/nobot$chatID.txt"))
- {
- if($a['type'] == 'bot')
- {
- try
- {
- $daban[] = array();
- $MadelineProto->channels->deleteUserHistory(['channel' => $chatID, 'user_id' => $user, ]);
- $a = $MadelineProto->channels->editBanned(['channel' => $chatID, 'user_id' => $user, 'banned_rights' => ['_' => 'channelBannedRights', 'view_messages' => 1, 'send_messages' => 1, 'send_media' => 1, 'send_stickers' => 1, 'send_gifs' => 1, 'send_games' => 1, 'send_inline' => 1, 'embed_links' => 1, 'until_date' => 0], ]);
- $MadelineProto->channels->editBanned(['channel' => $chatID, 'user_id' => $userID, 'banned_rights' => ['_' => 'channelBannedRights', 'view_messages' => 1, 'send_messages' => 1, 'send_media' => 1, 'send_stickers' => 1, 'send_gifs' => 1, 'send_games' => 1, 'send_inline' => 1, 'embed_links' => 1, 'until_date' => 0], ]);
- array_push($daban, $user);
- $id = $a['updates']['0']['id']; $sone->channels->deleteMessages(['channel' => $chatID, 'id' => [$id, $msgID], ]);
- }
- catch(Exception $e) {continue;
- }
- }
- }
- }
- $counter = count($daban);
- sm($chatID, "<b>Ho bannato</b> $name <b>perchè ha aggiunto $counter bot.</b>\n", 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement