Total channel protection v0.5

By ChunkieMonkey on Aug 28, 2008

This script is meant to go on a bot to protect a channel. There is more to come slowly

Thanks to all who helped. Thanks typo for the advertisement part. I promise I'll learn sooner or later xD

on *:LOAD: {
 if (!%Nick) { set set %Nick $$?="Please enter the bots main nick." }
 if (!%pass) { set %pass $$?*="Please enter the bots password here." }
 if (!%network) { set %network $$?="Enter the network you want the bot to run on." }
 if (!%channel) { set %channel $$?="Please enter the bots channel starting with the pound sign #" }
 if (!%botmaster) { set %botmaster $$?="Enter your nick or the head administrators nick." }
 auser 5 %botmaster
}
on *:connect:%network:{
 nick %Nick
 ns identify %pass
}
on *:disconnect:%network:{
 timer 1 60 server %network
}
On *:TEXT:*:%channel: {
 If (bitch isin $1-) || (fuck isin $1-) || (whore isin $1-) || (nigger isin $1-) || (slut isin
$1-) || (cunt isin $1-) || (kike isin $1-) { 
 Msg %channel Do not cuss $nick 
 .timer 1 4 ban %channel $nick 
 .timer 1 3  Kick %channel $nick
}
on *:text:*:%channel:{
 var %numofwords 1
 while (%numofwords <= $0) {
 if ($left($($chr(36) $+ %numofwords,2),1) == $chr(35)) {
 Msg %channel no advertisments $nick
 ban %channel $nick 300
 kick %channel $nick
}
 inc %numofwords
  }
}

Comments

Sign in to comment.
InSuRedByMaFia   -  Dec 06, 2010

LooooLz !! You CAll This Protection !

 Respond  
o3m4r   -  Sep 02, 2010

suck full protection!

 Respond  
a careful warchild   -  Oct 01, 2008

lol at some of the mistakes

 Respond  
Superior   -  Oct 01, 2008

I pointed out (some of the) mistakes in the script, I think ChunkieMonkey will learn more of the scripting, if he fixes his mistakes himself! Ofcourse he can always ask how to :D

 Respond  
a careful warchild   -  Oct 01, 2008
on *:LOAD: {
 if (!%Nick) { set set %Nick $$?="Please enter the bots main nick." }

should that not be..

on *:LOAD: {
 if (!%Nick) { set %Nick $$?="Please enter the bots main nick." }

nvm i just read the comment above me....

 Respond  
Superior   -  Oct 01, 2008

You have used 'set' twice..

set set %Nick $$?="Please enter the bots main nick."

Add a timer with an -u switch..

 ban %channel $nick 300

Add a -k switch to perform a kickban..

 .timer 1 4 ban %channel $nick 
 .timer 1 3  Kick %channel $nick

You want to reconnect the server after 60 seconds? Silence timer(s)...

on *:disconnect:%network:{
 timer 1 60 server %network
}
 Respond  
guest598594   -  Aug 28, 2008

You should silence you timer in the on disconnect. And you still have a bracket mismatch...

 Respond  
ChunkieMonkey   -  Aug 28, 2008

updated btw, a while ago o.0

 Respond  
ChunkieMonkey   -  Aug 28, 2008

I will later on, I said it wasn't complete yet x.x

edit

V 0.5

 Respond  
guest598594   -  Aug 28, 2008

%nick,%pass,%network, and %botmaster are redundant; you don't use them in the script.

 Respond  
ChunkieMonkey   -  Aug 28, 2008

Thanks typo. and I should have tested it. No excuses for that x.x

 Respond  
Typo   -  Aug 28, 2008

Having trouble sleeping and noticed this script so figured I would comment.

You need to try and slow down a little bit man.
Your releasing better quality stuff than before because it shows that your thinking now and you arent ripping anything which is great but your still in a hurry to release things and you should be taking more time with your codes.

For one your title says complete channel protection and this is far from that.

Like mountaindew said, the way your processing the cusswords is wrong. Your using && instead of || which will make it so all the words must be present instead of just one of them. This shows a real lack of testing.

Your second on text event is a really bad way to catch channel advertisements. The only ones it will catch are when the channel is the first word in the sentence. The best way is regex but thats a little too complicated for you so instead I will show you a way you can do it with coding you know.

The idea here is to individually process each word in the entered text and see if the left character is a pound sign.

on *:text:*:#testing1234:{
  var %numofwords 1
  while (%numofwords <= $0) {
    if ($left($($chr(36) $+ %numofwords,2),1) == $chr(35)) {
      Msg %channel no advertisments $nick
      Tban %channel $nick 300
      kick %channel $nick
    }
    inc %numofwords
  }
}

You really need to take a little more time with the coding before release and always test test test. It's a waste of everyones time when you make them tell you that your script doesnt even work right. We all miss some errors now and again but missing the scripts basic functions not working shows a complete lack of any testing.

Anyhow I'm going go figure out if I want to try and sleep or just give up and plan for a nap later. Keep up the improving. :)

 Respond  
guest598594   -  Aug 28, 2008
On *:TEXT:*:%channel: {
 If (bitch isin $1-) || (fuck isin $1-) || (whore isin $1-) || (nigger isin $1-) || (slut isin $1-) || (cunt isin $1-) || (kike isin $1-) { Msg %channel Do not cuss $nick 
 .timer 1 4 Tban %channel $nick 300
 .timer 1 3  Kick %channel $nick
}

should be

On *:TEXT:*:%channel: {
  If (bitch isin $1-) || (fuck isin $1-) || (whore isin $1-) || (nigger isin $1-) || (slut isin $1-) || (cunt isin $1-) || (kike isin $1-) { 
    Msg %channel Do not cuss $nick 
    .timer 1 4 Tban %channel $nick 300
    .timer 1 3  Kick %channel $nick
  }
}
 Respond  
ChunkieMonkey   -  Aug 28, 2008

Tban Timeban. 12:18 -ChanServ- TBAN Bans the user for a given length of time

and thanks, I'll switch 'em.

edit--

where is the bracket mismatch?

 Respond  
guest598594   -  Aug 28, 2008

Did you test this?

1) Bracket mismatch
2) What's Tban? Is it a typo or did you not include the alias?
3) You have && instead of ||. That means you'd need to have all of those swears for it to trigger.

 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.