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.

Special anti Advertising Script

Old posts that have not been replied to for several years.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

This line:
} || [isop $nick $chan]} { return }
It should be:

Code: Select all

if {[isop $nick $chan]} { return } 
Anyway, here is the how the code should look like:

Code: Select all

bind pubm - {* *#*} my:spam 

proc my:spam {nick uhost hand chan text} { 
  if {[isop $nick $chan]} { return } 
  foreach bla [split $text] { 
    if {[string match "#" $bla]} { continue } 
    if {[string match "#*" $bla]} { 
      if {[validchan $bla]} { 
        continue 
      } 
      set mask "*!*@[lindex [split $uhost @] 1]" 
      newban $mask Spam "\00220 minutes\002 ban for \002Spaming\002 within \002$chan\002 " 20 
      if {[string match "*@*.users.undernet.org" $uhost]} { 
        putserv "PRIVMSG X :ban $chan $mask 336 100 spaming" 
      }
      break 
    } 
  } 
}
Once the game is over, the king and the pawn go back in the same box.
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

invite after pub ban

Post by kurt_nirvana »

Hi. can u help me? how to make the bot invite the ppl who was ban by the bot when the ban time is over?
Thx
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

...

Post by kurt_nirvana »

someone out there :roll:
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

You can do this in two way (or many, right now I have only two in my mind):
1. after a spammer is banned make a timer equal with the ban time wich will do the invite.
2. store in an array the mask and the nick of the spammer and upon a ban expire match the mask of the ban and invite the *nick*..
Once the game is over, the king and the pawn go back in the same box.
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

:)

Post by kurt_nirvana »

:) thx, but that on a tcl will be like what??
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

try adding this after the ban line.
timer 20 "putserv \"INVITE $chan $nick\""

but I'm not sure if there is a command like INVITE in tcl.
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

hmm

Post by kurt_nirvana »

bind pubm - {* *#*} my:spam

proc my:spam {nick uhost hand chan text} {
if {![botisop $chan] || [isop $nick $chan]} { return }
foreach bla [split $text] {
if {[string match "#" $bla]} { continue }
if {[string match "#*" $bla]} {
if {[validchan $bla]} {
continue
}
set mask "*!*@[lindex [split $uhost @] 1]"
newban $mask Spam "\002 pela \002Pub\002 no \002$chan\002 " 20
timer 20 "putserv \"INVITE $nick $chan\""
break
}
}
}

IT WORKS :D thx
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

first replace the:

Code: Select all

timer 20 "putserv \"INVITE $nick $chan\"" 
with:

Code: Select all

timer 20 [list putserv "INVITE $nick $chan"]

move the *invite* thing before the "break" and it should work.
Once the game is over, the king and the pawn go back in the same box.
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

ops

Post by kurt_nirvana »

one more thing.
when the registered ops in chanserv are banned for pub, the chanserv unbans them and when they enter again to the channel the bot bans them again. How to make this stop?
:)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Make a bind for mode +b and check if nick is chanserv then killchanban $ban..
Once the game is over, the king and the pawn go back in the same box.
k
kurt_nirvana
Voice
Posts: 16
Joined: Thu Jun 05, 2003 7:52 am

...

Post by kurt_nirvana »

can you make that on the tcl pleaaaase :)
thx :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

read doc/tcl-commands.doc
on how to bind.
u need to bind mode. its not so hard if u try it.
Locked