Swearing

By asakura on Jul 18, 2008

i made thsi a while back for my bot it did work but i may have done somethign wrong so do comment so i can edit it

on !*:TEXT:*:#: {
  if (($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) {
    halt
  }
  elseif ((fuck isin $1-) || (shit isin $1-) || (dick isin $1-) || (cunt isin $1-)) {
    inc -u900 %swearin. [ $+ [ $nick ] ]
    if (%swearin. [ $+ [ $nick ] ] = 1 ) { notice $nick please do not swear you have been warned }
    if (%swearin. [ $+ [ $nick ] ] = 2 ) { kick $chan $nick I Told You you once $nick once more its a ban got it? } 
    if (%swearin. [ $+ [ $nick ] ] = 3 ) { 
      notice $nick $nick you were told not to swear you've had your chances bye. 
      mode $chan +b $address($nick,0)
    }
    kick $chan $nick you were told to many times dont swear you have an hour ban if ops want to take it further they will. 
    unset %swearin. [ $+ [ $address($nick,0) ] ]
    .timer 1 3600 mode $chan -b $address($nick,0)
  }
}

Comments

Sign in to comment.
asakura   -  Jul 18, 2008

lol ok cheers i dont know all these bracket placements as long as it works its good enough for me ill change it to what u said tho mountain

 Respond  
BlueThen   -  Jul 18, 2008

Yea, what mountaindew said, also, it looks like your missing some brackets/not enough brackets somewhere else in your scripts file.

 Respond  
guest598594   -  Jul 18, 2008

Brackets look a little messed up, I think this is how it\'s supposed to go:

on !*:TEXT:*:#: {
  if (($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) {
    halt
  }
  elseif ((fuck isin $1-) || (shit isin $1-) || (dick isin $1-) || (cunt isin $1-)) {
    inc -u900 %swearin. [ $+ [ $nick ] ]
    if (%swearin. [ $+ [ $nick ] ] = 1 ) { notice $nick please do not swear you have been warned }
    if (%swearin. [ $+ [ $nick ] ] = 2 ) { kick $chan $nick I Told You you once $nick once more its a ban got it? } 
    if (%swearin. [ $+ [ $nick ] ] = 3 ) { 
      notice $nick $nick you were told not to swear you\'ve had your chances bye. 
      mode $chan +b $address($nick,0)
    }
    kick $chan $nick you were told to many times dont swear you have an hour ban if ops want to take it further they will. 
    unset %swearin. [ $+ [ $address($nick,0) ] ]
    .timer 1 3600 mode $chan -b $address($nick,0)
  }
}

With

  if (($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) {
    halt
  }

You can just use \"isreg\". if ($nick isreg $chan) { ;rest of script }

    .timer 1 3600 mode $chan -b $address($nick,0)

In the /ban alias, there\'s a -u switch which you could use right here. Instead of /mode $chan +b $address($nick,0), you can combine the two things and do

ban -u3600 $chan $nick 0 $nick you were told not to swear you\'ve had your chances bye. 

(The $nick 0 is the same as $address($nick,0) in the other case)

 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.