mIRC Home    About    Download    Register    News    Help

Print Thread
#140509 26/01/06 09:54 AM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
i got a script that sas a message whne osme1 says a message u know those spammy things laugh (ecept mine if for enemy territory voicechats)

but m prob is i wated to have a protection that if 1 person did more then 4 vsays in a short time it would wait a short time before he could do any more

but atm they can spam as much as they want since it doesnt stop them at all

oke the script is kinda big so i cut out the importent pices
Code:
on *:LOAD: {
  set -n %vsaycount = o
  hmake vsayfloodcontroll
}

on *:TEXT:v*:*: vsayblock $nick $chan $1 $address $server $2

alias vsayblock {
  %vsaystrip = 0
  %vsayself = %defvsayself

  ;color strip on channels that dont allow it
  if (c isincs $chan($2).mode) %vsaystrip = 1

  ;blocking channels that dont like it
  if ($2 == #nnscript) Halt

  ;blocking spammy nicks
  if (vrt3c isin $1) %vsayself = 1
  if (vrtec isin $1) %vsayself = 1
  if (tb`vrc isin $1) %vsayself = 1
  if (tb`bot isin $1) %vsayself = 1

  ;blockig spammy adresses
  if (@xxxxx.users.quakenet.org isin $5) %vsayself = 1

  ;anti vsay spam
  if ($4 != fakeadress) {
    %vsaycount = $hget(vsayfloodcontroll,$4)
    if (%vsaycount > 4) {
      notice $1 4,1 $+ Spam Protection $+ 0: VoiceChat ignored
      Halt
    }
    else {
      if (!%vsaycount) %vsaycount = 0
      inc %vsaycount 1
      hadd -mu20 mycoolbot $4 %vsaycount
    }
  }

  vsaydetect $3 $2 $1 $6
}


fakeadress is used whne i do it from the right mouse bottun menu

Last edited by Im2good4u; 26/01/06 09:56 AM.
#140510 27/01/06 01:13 AM
D
DaveC
DaveC
D
You get %vsaycount from $hget(vsayfloodcontroll,$4) but you set it with hadd -mu20 mycoolbot $4 %vsaycount, is this correct becuase it looks like your setting it in the wrong hashtable?.
If this is right (or wrong), and someone is still spamming ya heaps of these, then the notice should be spamming them back every time, if so then you need to put a .notice in place of the notice to make it silent, and maybe change it to a ON^*:TEXT:v*:*: event so the halt well halt its display.


Link Copied to Clipboard