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.

Simple Need

Old posts that have not been replied to for several years.
Locked
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Simple Need

Post by Sir_Fz »

Code: Select all

set spambantime 10

bind msgm - "*" pv_kick


proc pv_kick {nick uhost hand text} {
global botnick spambantime

 if {[regexp -nocase "#" $text] || [regexp -nocase "join" $text] || [regexp -nocase "channel" $text] || [regex$
   foreach kickchan [channels] {
     if {![isop $nick $kickchan] || ![isvoice $nick $kickchan]} {
       if {[onchan $nick $kickchan]} {
          set bmask "*!*[string range $uhost [string first "@" $uhost] end]"
          if {![ischanban $bmask $kickchan] || [botisop $kickchan]} {
                set kickmsg "Private Spamming detected - Banned 10mins."
                putquick "KICK $kickchan $nick :$kickmsg"
                putquick "mode $kickchan +b $bmask $spambantime"

              }
        }
     }
}
}
}
what should i add to this script so it won't ban masters and owners on private spam ?

and does the ban-time work in this script, like will it unban the user after 10mins ?
M
Moo_Moo

Ignoring masters/owners

Post by Moo_Moo »

Above the regexp matching, add:

Code: Select all

if {[matchattr $hand m]} { return }
This will cause the remaining code not to be executed if the user is recognized as either a global master, or a global owner.
M
Moo_Moo

Ban-time

Post by Moo_Moo »

As for the ban-time, lookup the newban function in tcl-commands.doc
Locked