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.

auto-ban

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
e
edu
Voice
Posts: 31
Joined: Sun Oct 29, 2006 2:10 pm

Post by edu »

Code: Select all

setudef flag X

bind join - * edu:join:X

proc edu:join:X {nickname hostname handle channel} {
	if {![channel get $channel X]} { return }
	foreach ban [banlist $channel] {
		set ban_host [lindex $ban 0]
		set ban_reason [lindex $ban 1]
		set ban_by [lindex $ban 5]
		if {[string match -nocase $ban_host $nickname!$hostname]} {
			putquick "PRIVMSG X :ban $channel $ban_host 1 75 $ban_reason"
		}
	}
}
Seek the truth
User avatar
mavericku
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 11:32 pm
Location: somewhere in the world
Contact:

Post by mavericku »

Thank you very much... :D
mavericku
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Pointless foreach but anyway you should add a 'break' statement when a match had been found as there is no need to continue matching internal bans with his host as he in theory got banned tough X.
Once the game is over, the king and the pawn go back in the same box.
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

I'm sorry .. but can someone explain how to add bans to this list ?
I tried to ban through telnet ( .+ban <nick> <#chan> reason ) but it doesnt work
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

setudef flag X 
Did you forget to .chanset #yourchan +X?
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

speechles wrote:

Code: Select all

setudef flag X 
Did you forget to .chanset #yourchan +X?

THX ... it work's now
Post Reply