Advertisement
Guest User

MNammt

a guest
Jan 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. if (isset($update['update']['message']['action']) &&
  2. ($update['update']['message']['action']['_'] === "messageActionChatAddUser")){
  3. if(in_array($userID, $gaID))
  4. {
  5.  
  6. foreach($update['update']['message']['action']['users'] as $user){
  7.  
  8. $about = $MadelineProto->get_info($user);
  9.  
  10. $nomenuovo = $about['User']['first_name'];
  11. $unomenuovo = $about['User']['username'];
  12. $a = $MadelineProto->get_pwr_chat($user);
  13. if(file_exists("benvenuto/nobot$chatID.txt"))
  14. {
  15. if($a['type'] == 'bot')
  16. {
  17. try
  18. {
  19. $daban[] = array();
  20. $MadelineProto->channels->deleteUserHistory(['channel' => $chatID, 'user_id' => $user, ]);
  21.  
  22. $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], ]);
  23. $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], ]);
  24. array_push($daban, $user);
  25. $id = $a['updates']['0']['id']; $sone->channels->deleteMessages(['channel' => $chatID, 'id' => [$id, $msgID], ]);
  26. }
  27. catch(Exception $e) {continue;
  28.  
  29.  
  30. }
  31.  
  32. }
  33. }
  34.  
  35. }
  36. $counter = count($daban);
  37. sm($chatID, "<b>Ho bannato</b> $name <b>perchè ha aggiunto $counter bot.</b>\n", 1);
  38.  
  39.  
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement