Author Topic: Basic Spambot Blocker  (Read 3044 times)

Jacob

  • Newbie
  • *
  • Posts: 45
Basic Spambot Blocker
« on: June 23, 2008, 10:02:29 AM »
This script uses a code so when someone querys you it asks them to enter a code to prove they are not a spambot. They only have to enter the code once then they can query you.

Code: [Select]
Sub ONQUERY(Message,Nickname,Host,ServerNumber)
Status = GetIniFile("QueryAuthed.ini",Nickname,"Status","PMed")
CKey= GetIniFile("QueryAuthed.ini",Nickname,"Key","")
Key = GetIdentifier("$randnick")
if Status = "PMed" then
WriteIniFile "QueryAuthed.ini",Nickname,"Key",Key
WriteIniFile "QueryAuthed.ini",Nickname,"Status","PMed2"
SendCommand "/query " & Nickname & " Notice: You Have Not Authed. Authing Proves You Are Not A SpamBot Please Type The Key '" & Key & "' And Then Resubmit Your Query",ServerNumber
SendCommand "/close -q " & Nickname,ServerNumber
end if
if Status = "PMed2" then
If Message = CKey then
WriteIniFile "QueryAuthed.ini",Nickname,"Status","Authed"
SendCommand "/query " & Nickname & " Code Accepted. You May Now Send PMs",ServerNumber
Else
SendCommand "/query " & Nickname & " Incorrect Code - You Are Being /ignored",ServerNumber
SendCommand "/ignore " & Nickname,ServerNumber
End If
end if
End Sub

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Basic Spambot Blocker
« Reply #1 on: June 23, 2008, 04:39:35 PM »
Nicely done, good idea using $randnick for getting a random value.
The IceChat God

HackBenjamin

  • Newbie
  • *
  • Posts: 35
Re: Basic Spambot Blocker
« Reply #2 on: June 23, 2008, 05:33:50 PM »
I gotta say, nice script.