Jump to content
chain

Email Verify Script by OrFeAsGr v0.1

Recommended Posts

  • Administrators

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;;;;;;;;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...