Question Responder and ! Responder!

By AnaBotNowYourGone on Jun 15, 2010

Question Part: It's not a great script, but it's my first time using regex I guess. Basically just type something with a question mark in it and it says a message!

! Part: Say something with a ! in it and it will say a message!

on $*:TEXT:/.*\?/:#: { msg $chan Have you tried www.google.com yet? }

on $*:TEXT:/.*\!/:#: { msg $chan Don't get too excited! }

Comments

Sign in to comment.
Jethro   -  Jun 17, 2010

Spammer!!! /me kicks Bielie silly like a spam smered between two slices of bread.

Biellie, you can combine those two text events into this:

on $*:text:/(\B[!?]\B|[!.]add)/iS:#:{
  if (!%spam) { inc -u4 %spam
    if ($istok(!add|.add,$regml(1),124)) && (!$2) {
      notice $nick Please provide a line to add!
    }
    elseif ($istok(! ?,$regml(1),32)) { 
      notice $nick $iif($isfile(text.txt),$read(text.txt),text.txt is not found!)
    }
    else {
      notice $nick Added $+(",$2-,") to the list.
      write text.txt $2-
    }
  }
}

Might want to add a check to see if the text.txt exists or not...along with a trigger control so you don't get spammed upon spamming. lol

 Respond  
TheNitelyfe   -  Jun 17, 2010

lmao @ "advanced"

but yeah napa on text events can be triggered by you in a channel if you use a BNC and log into it through different clients, but its not likely

 Respond  
napa182   -  Jun 17, 2010

lmao @ if ($nick != $me)

 Respond  
Bielie   -  Jun 17, 2010

In the end its just some annoying spam script.... :) But i will make this script advanced for you ;)

U should use $read(text.txt) and give it more options to say.

This is how to do it quikly as possible:

Step 1: /write text.txt
Step 2: /run text.txt
Step 3: Write down lines you want to say on the trigger.
Step 4: Save the file with: File -> Save

Now you change your script. (I also added a !add option to add lines without opening the file.)

Change it like this: (Used the first part of Jethro_)

on $*:text:/([!?])/S:#:{ 
;;Change this line in to the floodcontrol bellow;;
notice $nick $read(text.txt) 
  return
 }
}
on $*:text:/^[!.]add/S:#:{
  if ($nick != $me) { notice $nick You have no rights to use this command. 
 return 
}
elseif ($2- == $null) { notice $nick Please provide a line to add. 
 return 
}
else { notice $nick Added " $+ $2- $+ " to the list. 
 write text.txt $2-
 halt 
 }
}

You might wanna add a floodcontrol.

Can be done like this: (COPY IT IN THE CODE ABOVE)

It puts a 3 second delay for the channel the trigger was asked in.

if (%flood [ $+ [ $chan ] ]) { return }
set -eu3 %flood [ $+ [ $chan ] ] $true

Wrote it like this so "GoldFish" can understand it hopefully...

 Respond  
Jethro   -  Jun 16, 2010

I think that is called "dothurt."

 Respond  
TheNitelyfe   -  Jun 16, 2010

No need to get butthurt..what do you want me to say? what if the person was actually asking a legitimate question and they get this crap? Yeah, telling someone to use Google makes you look so much cooler, really. Really!

wait i shouldnt get too excited

 Respond  
AnaBotNowYourGone   -  Jun 16, 2010

...

 Respond  
GuitarMasterx7   -  Jun 16, 2010

ROFL

 Respond  
Bielie   -  Jun 16, 2010

+1 TheNiteLyfe

 Respond  
TheNitelyfe   -  Jun 15, 2010

and the reward for most useful snippet of 2010 goes to AnaBotNowYourGone

 Respond  
Jethro   -  Jun 15, 2010
on $*:text:/(\!|\?)/S:#:{ 
  msg # $replace($regml(1),!,Don't get too excited!,?,Have you tried www.google.com yet?)
}

Or you could use:

on $*:text:/([!?])/S:#:{
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.