Email Verify Script by OrFeAsGr v0.1

By OrFeAsGr on Mar 27, 2016

SCRIPT ID: EMAIL
Hi! This is one more mIRC Script by OrFeAsGr !
Quick FAQ
-What do i need your script for?
This script uses the API provided by https://mailboxlayer.com/ to verify if the email you request is a real email
-Neat! How does it work?
The script triggers with a channel message! Type !emailver
(Of course without the < and > around the email address)
The bot responds with a channel message!
-Do i need something extra for the script to work?
Yes and no. I have registered for a free account on https://mailboxlayer.com/ so the limit of requests is 1000 per month.
If some users start using the script the limit will be reached soon and the script will message the following error:
Code: 104 Type: "usage_limit_reached" Info: User has reached or exceeded his subscription plan's monthly API Request Allowance.
You could use the key i provide to test if the limit isn't reached at the time but soon you'll have to easily sign up at https://mailboxlayer.com/ and get your API key.
Then replace my key with yours at line 8 of the script.
i.e this line:
return 00564d4dfd1e326146ed7568f367b2f6
(do not erase return)

So this is all i had to explain!
Here's the script!
v0.1 24/6/2016
-Added version and ID for Update Checker!

;;; v0.1 24/6/2016 ;;;
;;; http://humanity.ucoz.com ;;;
alias emailver {
  sockopen emailver apilayer.net 80
  set %emailver $1
  set %emailchan $2
}
alias emailverapikey {
return 00564d4dfd1e326146ed7568f367b2f6
}

ON *:SOCKOPEN:emailver: {
  if ($sockerr) { msg %emailchan 10An Error Occured While Verifying %emailver | unset %emailver %emailchan | sockclose $sockname }
  sockwrite -nt $sockname GET $iif(%emailver, $+(/api/check?access_key=,$emailverapikey,&email=,$v1,&smtp=1&format=1), $null) HTTP/1.1
  sockwrite -nt $sockname Host: apilayer.net
  sockwrite $sockname $crlf
}

ON *:SOCKREAD:emailver: {
  if ($sockerr) { msg %emailchan An Error Occured While Verifying %emailver | unset %emailchan %emailver | sockclose $sockname }
  var %ev
  sockread %ev
  if (*smtp_check":true* iswm %ev) {
    msg %emailchan 3Email14: %emailver $+($chr(03),03,$chr(10004)) 7Exists14! 
    unset %emailchan
    unset %emailver
    sockclose $sockname
  }
  elseif (*smtp_check":false* iswm %ev) {
    msg %emailchan 3Email14: %emailver $+($chr(03),04,$chr(10008)) 7Doesn14'7t Exist14! 
    unset %emailver
    sockclose $sockname
  }
  elseif (*success": false* iswm %ev) {
    set %evfalse 1
  }
  if (%evfalse) {
    if (*code":* iswm %ev) {
      set %errorcode $remove($gettok(%ev,2,58),$chr(44))
    }
    if (*type":* iswm %ev) {
      set %errortype $remove($gettok(%ev,2,58),$chr(44))
    }
    if (*info":* iswm %ev) {
      set %errorinfo $remove($gettok(%ev,2,58),$chr(44))
      unset %evfalse
      sockclose $sockname
      msg %emailchan 10Your Request For %emailver 10Returned the following error14:
      .timer 1 1 msg %emailchan 10Code14: %errorcode 10Type14: %errortype 10Info14: %errorinfo
      .timer 1 2 unset %emailchan %errorinfo %errortype %errorcode
    }
  }
}

ON *:TEXT:*:#: {
  if (!emailver == $strip($1)) {
  if (!%EMAILversion) || (%EMAILversion != v0.1) { set %EMAILversion v0.1 }
    if (*@*.* !iswm $strip($2)) {
      .timer 1 1 msg $chan 10The email you requested was not checked because it doesn't match the usual format of email adresses14. Please provide a valid email (e.g oneemail@someserver.com)
    }
    elseif (*@*.* iswm $strip($2)) {
      if (!%emvdel) {
        set -u100 %emvdel 1
        emailver $strip($2) $chan
      }
    }
  }
}
;;;;;;Script by OrFeAsGr;;;;;;;;
;;;;http://humanity.ucoz.com;;;;
;;;;;;Humanity I.R.C Bot;;;;;;;;

Thx for viewing!
Don't forget.. you need your own API key for the script to fully work! Details above^^^^
Check out Humanity IRC Bot @ http://humanity.ucoz.com MultiServer mIRC Bot with a lot of features (games, protections and a lot other usefull and fun stuff) Fully Scripted by OrFeAsGr (Credits: eL^Topo & West^ (westor))

-
Do you want to help me make some money? You can do it without paying for nothing! Just visit my site http://humanity.ucoz.com ,turn off your ad blocker, watch an ad and turn it back on! You'll be giving me something less than a cent! Thanks!

Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^

Comments

Sign in to comment.
_Dean_   -  Aug 02, 2016

there is an "echo -at" at line 23, you probably used it for debug mode... it will echo all the unnecessary information, on people screen
you should remove that... i see you kinda new to scripting, keep the good work

OrFeAsGr  -  Aug 13, 2016

Thx i will remove it soon!
I've been scripting for about 3 years.. i think!
Thx for responding <3

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.