A variation of Kick Bans **UPDATED**

By TheNitelyfe on Dec 10, 2008

Kickbans, updated.

How to use:
read .txt: `kb
Kb count: -kb
Normal Service-bot style: !kb

Examples:
read .txt: [22:45] <@TheNitelyfe> `kb BluePrint xD
[22:45] BluePrint sets mode: +b !@Swift-7005C9D1.dsl.sfldmi.ameritech.net
[22:45]
BluePrint
was kicked from #test-channel by BluePrint (xD "Never stand between a dog and the hydrant.")

Kb count: [22:57] <@TheNitelyfe> -kb BluePrint xD
[22:57] BluePrint sets mode: +b !@Swift-7005C9D1.dsl.sfldmi.ameritech.net
[22:57]
BluePrint
was kicked by BluePrint (xD .:. Kick Count: 7 .:.)

Service Bot Style: [23:00] <@TheNitelyfe> !kb BluePrint xD
[23:00] BluePrint sets mode: +b !@Swift-7005C9D1.dsl.sfldmi.ameritech.net
[23:00]
BluePrint
was kicked by BluePrint (xD)

Comment and lemme know what you think about this.

on *:load:{ 
  var %x write kb.txt
  %x "Bart, with $10,000, we'd be millionaires! We could buy all kinds of useful things like...love!"
  %x "When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car"
  %x "I'm an excellent housekeeper. Every time I get a divorce, I keep the house."
  %x "I remmember the time I was kidnapped and they sent a piece of my finger to my father. He said he wanted more proof."
  %x "People think it must be fun to be a genius, but they don't realize how hard it is to put up with all the idiots in the world."
  %x "Isn't your pants' zipper supposed to be in the front?"
  %x "Cheese… milk's leap toward immortality." 
  %x "Never stand between a dog and the hydrant."
  %x "You have a cough? Go home tonight, eat a whole box of Ex-Lax, tomorrow you'll be afraid to cough."
  %x "Why does Sea World have a seafood restaurant? I'm halfway through my fish meal and I realize, I could be eating a slow learner."
  %x "He's so optimistic he'd buy a burial suit with two pairs of pants." 
  %x "Middle age is when your age starts to show around your middle."
  %x "A hippie is someone who looks like Tarzan, walks like Jane and smells like Cheetah."
  %x "I never think of the future - it comes soon enough."
  %x "You're not drunk if you can lie on the floor without holding on."
  %x "If you love your job, you haven't worked a day in your life."
  %x "Ninety percent of the game is half mental."
  %x "Thanks, you don't look so hot yourself." - after being told he looked cool.
  %x "I'm in no condition to drive...wait! I shouldn't listen to myself, I'm drunk!"
  %x "A word to the wise ain't necessary - it's the stupid ones that need the advice."
  %x "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
  %x "Marriages are made in heaven. But so again, are thunder and lightning." 
  %x "Half of the people in the world are below average."
  %x "If you don't know where you are going, you will wind up somewhere else!"
  %x "I could tell that my parents hated me. My bath toys were a toaster and a radio.
  %x "Men marry women with the hope they'll never change. Women marry men with the hope they'll change. They are both disappointed."
  %x "Marriage is like pi - natural, irrational, and very important."
  %x "Health is merely the slowest possible rate at which one can die." 
  %x "A rich man's joke is always funny."
  %x "I like pigs. Dogs look up to us. Cats look down 
  set %botowner $address($?="Nick to be botowner (address will be saved)",3)
}
on @%$*:TEXT:/^[`!-]k(ick)?b(an)?/Si:#:{
  if ($$2 == $me) || (%botowner iswm $address($2,2)) { kick # $nick Good try bro | halt }
  else {
    if ($nick(#,$nick,oh)) && ($ispower($nick $2 $chan) != $false) {
      if ($left($1,1) == `) { ban -k # $iif($2,$2,$nick) 2 $iif($3,$3-,Requested) - $read(kb.txt) }
      if ($left($1,1) == -) { inc %k | ban -k # $iif($2,$2,$nick) 2 $iif($3,$3-,Requested) - Kick Count: %k }
      if ($left($1,1) == !) { ban -k # $iif($2,$2,$nick) 2 $iif($3,$3-,Requested) }
    }
  }
}
alias ispower {
  if ($nick($3,$1,oh)) &&  ($nick($3,$2,h)) { return $false }
  elseif ($nick($3,$1,oh)) && ($2 isprotect $3) { return $false }
  elseif ($1 isprotect $3) && ($2 isprotect $3) { return $false }
  else { return $true }
}

Comments

Sign in to comment.
TheNitelyfe   -  Aug 31, 2009

sup guys

 Respond  
Jethro   -  Aug 31, 2009

While I admit the chances of unloading the same script over and over are relatively slim. My point being it's foolproof to add a check to that, which, in turn, will not diminish the purpose of your script working as it is. However, since you think it's pointless at best, I'll take back what I've said in the first place.

Also, if you look at Napa182's suggestion to you above my posts, you will see that he event showed you this line of code, and I quote:> on *:load:{
if (!$isfile(kb.txt)) { Similarly it's the same for $exists identifier. This is called a check to see if something already exists or not...to prevent the script from doing the needless routine.

 Respond  
TheNitelyfe   -  Aug 31, 2009

So it's not the same difference?

You're saying every time the script is loaded, the commands will be initialized.

Obviously it wouldn't make sense to go file>load for no particular reason, and it's not like someone's gonna unload the same script over and over again for the sake of it.

tl;dr: pointless

 Respond  
Jethro   -  Aug 31, 2009

Dude, did I even mention about the on start event?

 Respond  
TheNitelyfe   -  Aug 31, 2009

on LOAD is not the same as on START

 Respond  
Jethro   -  Aug 31, 2009

It's the same difference, except you add an unload event to make me happy. The truth is, my emotion doesn't apply here.

 Respond  
TheNitelyfe   -  Aug 31, 2009

Nobody's gonna reload the script 5151306503 times bro

But just to make you happy:

on *:unload:write -c kb.txt | unset %botowner

 Respond  
Jethro   -  Aug 31, 2009

TheNiteLyfe, have you realized that every time this script is loaded, it will add the kick messages to the same kb.txt again and again? Script being unloaded can happen, and once it's been reloaded, the kb.txt can get really big in size over time. You need to add this: if (!$lines(kb.txt)) { to your existing load event. This will make sure the content of kb.txt exists before writing the kick info to it:

on *:LOAD: {
  set %botowner $address($?="Nick to be botowner (address will be saved)",3)
  if (!$lines(kb.txt)) { 
    var %x write kb.txt
    %x "Bart, with $10,000, we'd be millionaires! We could buy all kinds of useful things like...love!"
    %x "When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car"
    %x "I'm an excellent housekeeper. Every time I get a divorce, I keep the house."
    %x "I remmember the time I was kidnapped and they sent a piece of my finger to my father. He said he wanted more proof."
    %x "People think it must be fun to be a genius, but they don't realize how hard it is to put up with all the idiots in the world."
    %x "Isn't your pants' zipper supposed to be in the front?"
    %x "Cheese… milk's leap toward immortality." 
    %x "Never stand between a dog and the hydrant."
    %x "You have a cough? Go home tonight, eat a whole box of Ex-Lax, tomorrow you'll be afraid to cough."
    %x "Why does Sea World have a seafood restaurant? I'm halfway through my fish meal and I realize, I could be eating a slow learner."
    %x "He's so optimistic he'd buy a burial suit with two pairs of pants." 
    %x "Middle age is when your age starts to show around your middle."
    %x "A hippie is someone who looks like Tarzan, walks like Jane and smells like Cheetah."
    %x "I never think of the future - it comes soon enough."
    %x "You're not drunk if you can lie on the floor without holding on."
    %x "If you love your job, you haven't worked a day in your life."
    %x "Ninety percent of the game is half mental."
    %x "Thanks, you don't look so hot yourself." - after being told he looked cool.
    %x "I'm in no condition to drive...wait! I shouldn't listen to myself, I'm drunk!"
    %x "A word to the wise ain't necessary - it's the stupid ones that need the advice."
    %x "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
    %x "Marriages are made in heaven. But so again, are thunder and lightning." 
    %x "Half of the people in the world are below average."
    %x "If you don't know where you are going, you will wind up somewhere else!"
    %x "I could tell that my parents hated me. My bath toys were a toaster and a radio.
    %x "Men marry women with the hope they'll never change. Women marry men with the hope they'll change. They are both disappointed."
    %x "Marriage is like pi - natural, irrational, and very important."
    %x "Health is merely the slowest possible rate at which one can die." 
    %x "A rich man's joke is always funny."
    %x "I like pigs. Dogs look up to us. Cats look down 
  }
}

set %botowner $address($?="Nick to be botowner (address will be saved)",3)this line goes on top under the load so that it'll be set anew each time when the script is loaded.

 Respond  
TheNitelyfe   -  Aug 31, 2009

updated

 Respond  
sunslayer   -  Jul 21, 2009

yes

F11 ban -k # $$?="Enter the name of the person you want to ban" 2 $read(kb.txt)
F12 kick # $$?="Enter the name of the person you want to kick" $read(kb.txt)

put that in your Aliases tab not remote

F11 = kb
F12 = kick

 Respond  
silent.nahid   -  Jul 10, 2009

is there any way to use dese kicks by fkeys?

 Respond  
sunslayer   -  Dec 11, 2008

good script :D 7/10

 Respond  
TheNitelyfe   -  Dec 11, 2008

Yeah uhh, I'm kinda retarded, so I only know simple stuff, but thanks for that ;) Thanks for commenting.

 Respond  
napa182   -  Dec 10, 2008

you can combine

/mode $chan +b $address($2,2)
/kick $chan $2

into

ban -k # $2 2 reason

As well as combining

if ($nick isop $chan) || ($nick ishop $chan) {

into

if ($nick(#,$nick,oh)) {

also i see you have it read a var for the kick count that you dont set.
On the part where you have

if ($2 == <nickhere>) {

you can have away to either set a var with nicks to make it not trigger on, or leave it the way it is, or use $istok so you can add more on that line without doing a bunch of

if ($2 == <nick1here>) || ($2 == <nick2here>) || ($2 == <nick3here>) {

$istok way

if ($istok(nick1 nick2 nick3,$2,32)) {

or useing $istok with a var to hold the nicks

if ($istok(%nicks,$2,44)) {

so that way you could set a var like %nicks nick1,nick2,nick3 and so on. The 44 = comma, and 32 = space. it's what ever is between nick1 and nick2 so on.

You can also place all them "on text event's" under one event. This is just one of many ways it can be done.

on $@*:text:/^[!-`]kb/Si:#:{
  if ($nick(#,$nick,oh) && $2 != $me && $2 ison # && !$($+(%,kbflood,.,$nick),2)) {
    set -u3 $+(%,kbflood,.,$nick) on
    if ($istok(nick1 nick2,$2,32)) { .notice $nick xD Nub nice try | halt }
    if ($left($strip($1),1) == $chr(45)) { inc $+(%,k,.,$chan,.,$server) 1 | ban -k # $2 2 0.:. 7Kick Count: $($+(%,k,.,$chan,.,$server),2) 0.:. }
    if ($left($strip($1),1) == $chr(96) || $left($strip($1),1) == $chr(33)) { ban -k # $2 2 $iif($left($1,1) == $chr(33),Bannned.,$read(kb.txt)) } 
  }
}

One more thing. You could have it write the txt file on an "on load event" like..

on *:load:{
  if (!$isfile(kb.txt)) {
    write kb.txt "Bart, with $10,000, we'd be millionaires! We could buy all kinds of useful things like...love!"
    write kb.txt "When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car"
    write kb.txt "I'm an excellent housekeeper. Every time I get a divorce, I keep the house."
    write kb.txt "I remmember the time I was kidnapped and they sent a piece of my finger to my father. He said he wanted more proof."
  }
}

Anyway's nice idea, and keep up the coding...

 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.