]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
suppress free email
authorEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 23:56:26 +0000 (19:56 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 23:56:26 +0000 (19:56 -0400)
plugins/DomainStatusNetwork/DomainStatusNetworkPlugin.php
plugins/DomainStatusNetwork/lib/freeemail.php [new file with mode: 0644]

index e11cb082d6dc0a470b8c94428df25fc3f215bee7..10208cfbe7376d4263fc6df5de8ea0e2ecaa5eaa 100644 (file)
@@ -103,9 +103,8 @@ class DomainStatusNetworkPlugin extends Plugin
             include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
             return false;
         case 'DomainStatusNetworkInstaller':
-            include_once $dir . '/lib/' . strtolower($cls) . '.php';
-            return false;
         case 'GlobalApiAction':
+        case 'FreeEmail':
             include_once $dir . '/lib/' . strtolower($cls) . '.php';
             return false;
         default:
@@ -245,6 +244,10 @@ class DomainStatusNetworkPlugin extends Plugin
     {
         $domain = self::toDomain($email);
 
+        if (FreeEmail::isFree($domain)) {
+            throw new ClientException(_("Use your work email."));
+        }
+
         $sn = self::siteForDomain($domain);
 
         if (empty($sn)) {
diff --git a/plugins/DomainStatusNetwork/lib/freeemail.php b/plugins/DomainStatusNetwork/lib/freeemail.php
new file mode 100644 (file)
index 0000000..fe3cc5a
--- /dev/null
@@ -0,0 +1,474 @@
+<?php
+
+class FreeEmail {
+
+    static $domains =
+        array('111mail.com',
+              '123iran.com',
+              '1-usa.com',
+              '2die4.com',
+              '37.com',
+              '420email.com',
+              '4degreez.com',
+              '4-music-today.com',
+              '5.am',
+              '5005.lv',
+              '8.am',
+              'a.org.ua',
+              'abha.cc',
+              'accountant.com',
+              'actingbiz.com',
+              'adexec.com',
+              'africamail.com',
+              'agadir.cc',
+              'ahsa.ws',
+              'ajman.cc',
+              'ajman.us',
+              'ajman.ws',
+              'albaha.cc',
+              'alex4all.com',
+              'alexandria.cc',
+              'algerie.cc',
+              'allergist.com',
+              'allhiphop.com',
+              'alriyadh.cc',
+              'alumnidirector.com',
+              'amman.cc',
+              'anatomicrock.com',
+              'animeone.com',
+              'anjungcafe.com',
+              'aqaba.cc',
+              'arar.ws',
+              'archaeologist.com',
+              'arcticmail.com',
+              'artlover.com',
+              'asia.com',
+              'asiancutes.com',
+              'aswan.cc',
+              'a-teens.net',
+              'ausi.com',
+              'australiamail.com',
+              'autoindia.com',
+              'autopm.com',
+              'baalbeck.cc',
+              'bahraini.cc',
+              'banha.cc',
+              'barriolife.com',
+              'b-boy.com',
+              'beautifulboy.com',
+              'berlin.com',
+              'bgay.com',
+              'bicycledata.com',
+              'bicycling.com',
+              'bigheavyworld.com',
+              'bigmailbox.net',
+              'bikerheaven.net',
+              'bikerider.com',
+              'bikermail.com',
+              'billssite.com',
+              'bizerte.cc',
+              'bk.ru',
+              'blackandchristian.com',
+              'blackcity.net',
+              'blackvault.com',
+              'blida.info',
+              'bmx.lv',
+              'bmxtrix.com',
+              'boarderzone.com',
+              'boatnerd.com',
+              'bolbox.com',
+              'bongmail.com',
+              'bowl.com',
+              'buraydah.cc',
+              'butch-femme.org',
+              'byke.com',
+              'calle22.com',
+              'cameroon.cc',
+              'cannabismail.com',
+              'catlover.com',
+              'catlovers.com',
+              'certifiedbitches.com',
+              'championboxing.com',
+              'chatway.com',
+              'cheerful.com',
+              'chemist.com',
+              'chillymail.com',
+              'classprod.com',
+              'classycouples.com',
+              'clerk.com',
+              'cliffhanger.com',
+              'columnist.com',
+              'comic.com',
+              'company.org.ua',
+              'congiu.net',
+              'consultant.com',
+              'coolmail.ru',
+              'coolshit.com',
+              'corpusmail.com',
+              'counsellor.com',
+              'cutey.com',
+              'cyberunlimited.org',
+              'cycledata.com',
+              'darkfear.com',
+              'darkforces.com',
+              'deliveryman.com',
+              'dhahran.cc',
+              'dhofar.cc',
+              'dino.lv',
+              'diplomats.com',
+              'dirtythird.com',
+              'djibouti.cc',
+              'doctor.com',
+              'doglover.com',
+              'dominican.cc',
+              'dopefiends.com',
+              'dr.com',
+              'draac.com',
+              'drakmail.net',
+              'dr-dre.com',
+              'dreamstop.com',
+              'dublin.com',
+              'earthling.net',
+              'earthling.net',
+              'eclub.lv',
+              'egypt.net',
+              'e-mail.am',
+              'email.com',
+              'e-mail.ru',
+              'emailfast.com',
+              'emails.ru',
+              'e-mails.ru',
+              'eminemfans .com',
+              'envirocitizen.com',
+              'eritrea.cc',
+              'eritrea.cc',
+              'escapeartist.com',
+              'europe.com',
+              'execs.com',
+              'ezsweeps.com',
+              'falasteen.cc',
+              'famous.as',
+              'farts.com',
+              'feelingnaughty.com',
+              'financier.com',
+              'firemyst.com',
+              'fit.lv',
+              'freeonline.com',
+              'fromru.com',
+              'front.ru',
+              'fudge.com',
+              'fujairah.cc',
+              'fujairah.us',
+              'fujairah.ws',
+              'funkytimes.com',
+              'gabes.cc',
+              'gafsa.cc',
+              'gala.net',
+              'gamerssolution.com',
+              'gardener.com',
+              'gawab.com',
+              'gazabo.net',
+              'geologist.com',
+              'giza.cc',
+              'glittergrrrls.com',
+              'gmail.com',
+              'goatrance.com',
+              'goddess.com',
+              'gohip.com',
+              'goldenmail.ru',
+              'goldmail.ru',
+              'gospelcity.com',
+              'gothicgirl.com',
+              'gotomy.com',
+              'grapemail.net',
+              'graphic-designer.com',
+              'greatautos.org',
+              'guinea.cc',
+              'guinea.cc',
+              'guy.com',
+              'hacker.am',
+              'hairdresser.net',
+              'haitisurf.com',
+              'hamra.cc',
+              'happyhippo.com',
+              'hasakah.com',
+              'hateinthebox.com',
+              'hebron.tv',
+              'hip hopmail.com',
+              'homs.cc',
+              'hotbox.ru',
+              'hotmail.com',
+              'hotmail.ru',
+              'hot-shot.com',
+              'houseofhorrors.com',
+              'hugkiss.com',
+              'hullnumber.com',
+              'human.lv',
+              'ibra.cc',
+              'idunno4recipes.com',
+              'ihatenetscape.com',
+              'iname.com',
+              'inbox.ru',
+              'inorbit.com',
+              'insurer.com',
+              'intimatefire.com',
+              'iphon.biz',
+              'irbid.ws',
+              'irow.com',
+              'ismailia.cc',
+              'jadida.cc',
+              'jadida.org',
+              'japan.com',
+              'jazzemail.com',
+              'jerash.cc',
+              'jizan.cc',
+              'jouf.cc',
+              'journalist.com',
+              'juanitabynum.com',
+              'kairouan.cc',
+              'kanoodle.com',
+              'karak.cc',
+              'khaimah.cc',
+              'khartoum.cc',
+              'khobar.cc',
+              'kickboxing.com',
+              'kidrock.com',
+              'kinkyemail.com',
+              'kool-things.com',
+              'krovatka.net',
+              'kuwaiti.tv',
+              'kyrgyzstan.cc',
+              'land.ru',
+              'latakia.cc',
+              'latchess.com',
+              'latinabarbie.com',
+              'latinogreeks.com',
+              'lawyer.com',
+              'lebanese.cc',
+              'leesville.com',
+              'legislator.com',
+              'list.ru',
+              'live.com',
+              'lobbyist.com',
+              'london.com',
+              'loveable.com',
+              'loveemail.com',
+              'loveis.lv',
+              'lovers-mail.com',
+              'lowrider.com',
+              'lubnan.cc',
+              'lubnan.ws',
+              'lucky7lotto.net',
+              'lv-inter.net',
+              'mad.scientist.com',
+              'madeniggaz.net',
+              'madinah.cc',
+              'madrid.com',
+              'maghreb.cc',
+              'mail.com',
+              'mail.ru',
+              'mail15.com',
+              'mail333.com',
+              'mailbomb.com',
+              'manama.cc',
+              'mansoura.tv',
+              'marillion.net',
+              'marrakesh.cc',
+              'mascara.ws',
+              'megarave.com',
+              'meknes.cc',
+              'mesra.net',
+              'mindless.com',
+              'minister.com',
+              'mofa.com',
+              'moscowmail.com',
+              'motley.com',
+              'munich.com',
+              'muscat.tv',
+              'muscat.ws',
+              'music.com',
+              'musician.net',
+              'musician.org',
+              'musicsites.com',
+              'myself.com',
+              'nabeul.cc',
+              'nabeul.info',
+              'nablus.cc',
+              'nador.cc',
+              'najaf.cc',
+              'narod.ru',
+              'netbroadcaster.com',
+              'netfingers.com',
+              'net-surf.com',
+              'nettaxi.com',
+              'newmail.ru',
+              'ni cedriveway.com',
+              'nightmail.ru',
+              'nm.ru',
+              'nocharge.com',
+              'nycmail.com',
+              'omani.ws',
+              'omdurman.cc',
+              'operationivy.com',
+              'optician.com',
+              'oran.cc',
+              'oued.info',
+              'oued.org',
+              'oujda.biz',
+              'oujda.cc',
+              'paidoffers.net',
+              'pakistani.ws',
+              'palmyra.cc',
+              'palmyra.ws',
+              'pcbee.com',
+              'pediatrician.com',
+              'persian.com',
+              'petrofind.com',
+              'phunkybitches.com',
+              'pikaguam.com',
+              'pinkcity.net',
+              'pisem.net',
+              'pitbullmail.com',
+              'planetsmeg.com',
+              'playful.com',
+              'pochta.ru',
+              'pochtamt.ru',
+              'poetic.com',
+              'pookmail.com',
+              'poop.com',
+              'poormail.com',
+              'pop3.ru',
+              'popstar.com',
+              'portsaid.cc',
+              'post.com',
+              'potsmokersnet.com',
+              'presidency.com',
+              'priest.com',
+              'primetap.com',
+              'programmer.net',
+              'project420.com',
+              'prolife.net',
+              'publicist.com',
+              'puertoricowow.com',
+              'puppetweb.com',
+              'qassem.cc',
+              'quds.cc',
+              'rabat.cc',
+              'rafah.cc',
+              'ramallah.cc',
+              'rambler.ru',
+              'rapstar.com',
+              'rapworld.com',
+              'rastamall.com',
+              'ratedx.net',
+              'ravermail.com',
+              'rbcmail.ru',
+              'realtyagent.com',
+              'rediffmail.com',
+              'registerednurses.com',
+              'relapsecult.com',
+              'remixer.com',
+              'repairman.com',
+              'representative.com',
+              'rescueteam.com',
+              'rockeros.com',
+              'romance106fm.com',
+              'rome.com',
+              'sa veourplanet.org',
+              'safat.biz',
+              'safat.info',
+              'safat.us',
+              'safat.ws',
+              'saintly.com',
+              'salalah.cc',
+              'salmiya.biz',
+              'samerica.com',
+              'sanaa.cc',
+              'sanfranmail.com',
+              'scientist.com',
+              'seductive.com',
+              'seeb.cc',
+              'sexriga.lv',
+              'sfax.ws',
+              'sharm.cc',
+              'sinai.cc',
+              'singalongcenter.com',
+              'singapore.com',
+              'siria.cc',
+              'sketchyfriends.com',
+              'slayerized.com',
+              'smartstocks.com',
+              'smtp.ru',
+              'sociologist.com',
+              'sok.lv',
+              'soon.com',
+              'soulja-beatz.org',
+              'sousse.cc',
+              'spam.lv',
+              'specialoperations.com',
+              'speedymail.net',
+              'spells.com',
+              'streetracing.com',
+              'subspacemail.com',
+              'sudanese.cc',
+              'suez.cc',
+              'sugarray.com',
+              'superbikeclub.com',
+              'superintendents.net',
+              'supermail.ru',
+              'surfguiden.com',
+              'sweetwishes.com',
+              'tabouk.cc',
+              'tajikistan.cc',
+              'tangiers.cc',
+              'tanta.cc',
+              'tattoodesign.com',
+              'tayef.cc',
+              'teamster.net',
+              'techie.com',
+              'technologist.com',
+              'teenchatnow.com',
+              'tetouan.cc',
+              'the5thquarter.com',
+              'theblackmarket.com',
+              'timor.cc',
+              'tokyo.com',
+              'tombstone.ws',
+              'troamail.org',
+              'tunisian.cc',
+              'tunisian.cc',
+              'tut.by',
+              'tx.am',
+              'u2tours.com',
+              'ua.fm',
+              'uaix.info',
+              'umpire.com',
+              'urdun.cc',
+              'usa.com',
+              'vipmail.ru',
+              'vitalogy.org',
+              'whatisthis.com',
+              'whoever.com',
+              'winning.com',
+              'witty.com',
+              'wrestlezone.com',
+              'writeme.com',
+              'yahoo.ca',
+              'yahoo.com',
+              'yanbo.cc',
+              'yandex.ru',
+              'yepmail.com',
+              'yemeni.cc',
+              'yogaelements.com',
+              'yours.com',
+              'yunus.cc',
+              'zabor.lv',
+              'zagazig.cc',
+              'zambia.cc',
+              'zarqa.cc',
+              'zerogravityclub.com');
+
+    static function isFree($domain) {
+        return in_array($domain, self::$domains);
+    }
+}
\ No newline at end of file