Author Topic: Close spambot queries  (Read 4193 times)

r2t3

  • Newbie
  • *
  • Posts: 5
Close spambot queries
« on: November 11, 2006, 08:18:13 AM »
irc.enterthegame.com tends to get alot of porno spam queries, and I wanted to write a script that would auto close the queries, once i know the message they are sending.  For ex, the message "visit this website", in a query should automatically close the query, and hopefully prevent the query message sound from playing.  I have the following code (using the icechat 5/vb script method) which does not work.  Could someone please help me with a version of this in either icechat7, or 5 scripting?  Thanks.

Code: [Select]
Sub ONQUERY(Message,Nickname,Host,ServerNumber)
if Instr(Message,GetIdentifier("visit this website",ServerNumber)) then
 SendCommand "/closeallquery"
 
End If
End Sub

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Close spambot queries
« Reply #1 on: November 11, 2006, 10:19:10 AM »
the /closeallquery command closes all your query windows, not a specific one.
Also, you use GetIdentifier for parsing out $variables.

Code: [Select]
Sub ONQUERY(Message,Nickname,Host,ServerNumber)
if Instr(Message,"visit this website") then
   SendCommand "/closemsg " & Nickname,ServerNumber
End If
End Sub
The IceChat God

r2t3

  • Newbie
  • *
  • Posts: 5
Re: Close spambot queries
« Reply #2 on: November 11, 2006, 02:47:15 PM »
Thank you Snerf  :-D