This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ban user notice

Old posts that have not been replied to for several years.
Locked
u
up^to^you

ban user notice

Post by up^to^you »

how to make my bot ban user with hostmask *!*user@domain.com who send any notice message to the channel?

Thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Search the forum, there are few script laying about for this.

One of which, has been psoted in the last 4 days.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

or u could just use this...

Code: Select all

set bantime "1"

bind notc - * do_ban_on_notc

proc do_ban_on_notc {nick host hand text {dest ""}} {
  global botnick bantime
  foreach c [channels] {
    if {$dest == $c} {
      newchanban $c [maskhost [getchanhost $nick $c]] $botnick "$nick banned for noticing $c!" $bantime sticky
      putkick $c $nick "Do not send notice to this channel! Banned for $bantime min"
    }
  }
 }
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

That script is overly complicated.

You seem to have thing about using foreach.

Try using [validchan $dest]
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

sorry guess ur right ;) I didn't think of validchan
Elen sila lúmenn' omentielvo
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

. how to delete a post ? arghh
u
up^to^you

Post by up^to^you »

thanks guys
u
up^to^you

why?

Post by up^to^you »

thanks Papillon, i try to use your script but why my bot ban user ike this:

*!host@domain.com and not *!*host@domain.com ??

for user that have ident like this: *!~host@domain.com this banmask didnt effective and that user will be able to enter my channel after being kicked, and also...how to make this script will not kick/ban people if he/she has @/+ ??


thanks a lot
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

here's the code so it doesn't kick ops or voices (I just added one line).

Code: Select all

set bantime "1" 

bind notc - * do_ban_on_notc 

proc do_ban_on_notc {nick host hand text {dest ""}} { 
  global botnick bantime 
  foreach c [channels] { 
    if {$dest == $c} { 
      if {[isop $nick $c] || [isvoice $nick $c]} { continue }
      newchanban $c [maskhost [getchanhost $nick $c]] $botnick "$nick banned for noticing $c!" $bantime sticky 
      putkick $c $nick "Do not send notice to this channel! Banned for $bantime min" 
    } 
  } 
} 
Locked