IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: r2t3 on November 11, 2006, 08:18:13 AM

Title: Close spambot queries
Post by: r2t3 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
Title: Re: Close spambot queries
Post by: Snerf 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
Title: Re: Close spambot queries
Post by: r2t3 on November 11, 2006, 02:47:15 PM
Thank you Snerf  :-D