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.
Old posts that have not been replied to for several years.
Carnage69
Halfop
Posts: 64 Joined: Sat Jun 07, 2003 8:25 pm
Post
by Carnage69 » Tue Nov 11, 2003 3:33 pm
Hello i am trying to make a anti advertise script and it bans everyone in the chan that talks can someone help me here is the script.
Code: Select all
set advertiseban(banmessage) "Do Not Advertise In #ProFrag"
set advertiseban(time) "120"
set advertiseban(chan) "#profrag"
bind pubm - "$advertiseban(chan) *#*" chanadvertise
proc chanadvertise { nick host hand chan text } {
global advertiseban botnick
if { [isop $nick $chan] || [isvoice $nick $chan] } {
return 1
}
set newhost "*!*[string range $host [string first @ $host] end]"
set comment " $advertiseban(banmessage) (2 Hours)"
newchanban $chan $newhost $botnick $comment $advertiseban(time)
return 1
}
putlog "Anti Advertise v1.0 by Carnage Loaded."
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Nov 11, 2003 3:55 pm
Code: Select all
set advertiseban(banmessage) "Do Not Advertise In #ProFrag"
set advertiseban(time) "120"
set advertiseban(chans) "#profrag #somechannel"
bind pubm - {* *#*} chanadvertise
proc chanadvertise {nick uhost hand chan text} {
global advertiseban
if {[lsearch -exact [split [strlwr $advertiseban(chans)]] [string tolower $chan]] == -1 || [isop $nick $chan] || [isvoice $nick $chan]} {
return
}
scan $uhost "%\[^@\]@%s" user host
newchanban $chan *!*@$host spam "$advertiseban(banmessage)" $advertiseban(time)
}
Once the game is over, the king and the pawn go back in the same box.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Tue Nov 11, 2003 6:21 pm
Just a tip:
caesar wrote: Code: Select all
scan $uhost "%\[^@\]@%s" user host
There's no need to create variables you're not going to use... add a '*' to the first part of the conversion rule to avoid having the value assigned to a variable.
Have you ever read "The Manual"?