Advertisement
lostcalpolydude

Whitelist to BFFH

Sep 8th, 2021
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import <zlib.ash>
  2.  
  3. string [int] bffhlist;
  4.  
  5. boolean whitelistRequests( kmessage m )
  6. {
  7. if ( index_of( m.message.to_lower_case(), "whitelist bffh" ) != -1 )
  8. {
  9. bffhlist[ m.fromid ] = m.fromname;
  10. return true;
  11. }
  12. return false;
  13. }
  14.  
  15.  
  16. void addToWL()
  17. {
  18. string initialclan = get_clan_name();
  19.  
  20. if ( count( bffhlist ) > 0 )
  21. {
  22. cli_execute( "/whitelist bonus fights from hell" );
  23. }
  24. foreach key in bffhlist
  25. {
  26. print( "whitelisting " + bffhlist[ key ] + " to bffh" );
  27. visit_url( "clan_whitelist.php?action=add&pwd&level=0&title=autoadded&addwho=" + key );
  28. }
  29.  
  30. if ( get_clan_name() != initialclan ) cli_execute( "/whitelist " + initialclan );
  31. }
  32.  
  33.  
  34. void main()
  35. {
  36. process_kmail( "whitelistRequests" );
  37. addToWL();
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement