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.

banning nickname which has joined and unban oldest bans

Old posts that have not been replied to for several years.
Locked
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

banning nickname which has joined and unban oldest bans

Post by entrapmen »

Code: Select all

set nekadarban 120

# 1: *!*hesap@*.domain   *!*hesap@A.B.C.*
# 2: *!*@domain          *!*@A.B.C.D
# 3: Nick!*@*
set bancesidi 2

set Ban "banned: Reklam yapmayınız..!"

bind join - "*gulcinn*" kotunick
bind join - "*Afet^*" kotunick
bind join - "*Ebru_*" kotunick

global versi bancesidi

set versi "Kotu kızlar out by entrapmen"
proc kotunick {nick uhost hand chan} {
putlog "$nick $uhost $hand $chan"

  global botnick nekadarban Ban versi bancesidi
		set domain [string range $uhost [expr [string last @ $uhost] +1] end]
 	switch $bancesidi {
	  1 {set sitemask "*!*[string trimleft [maskhost $uhost] *!]"}
	  2 {set sitemask "*!*@$domain"}
	}
	set chan "#denemee"
	if {(([matchattr $hand p]) || ([matchattr $hand b]))} { return 1 }
	if {![isop $nick $chan] || ![isvoice $nick $chan]} {
	putquick "mode $chan +b $sitemask $nekadarban"
	putquick "KICK $chan $nick :$Ban"
	} 
	}
putlog "\[$versi\] Yuklendi"
i make tcl like dat, in this script bot bans the *!*@domain or host@domain. and also i wanna ban the nickname that joined the channel like Nick!*@*. (there is ban limit on server) There are lots of nicks in list (i didnt paste all of them) Maybe some1 will advise to sort it out :)

And i dun wanna open a new topic so ill ask it here:

Code: Select all

bind notc - "Banlist Full" unban_some

proc unban_some {nick uhost hand chan} {
putserv "MODE $chan -bbbbbb oldest6bans!!!!"
} 

i write a lil tcl to unban 6 six bans when the banlist is full. But im a newbie and i couldnt find a solution to unban oldest 6 ban on channel.

Tx.
<@ll the world is about smiles and cries>
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

i found how to ban nick names. but the unbaning oldest 6 ban :cry: :cry: :cry: i wonder why doesnt someone reply to that topic? :( :(
<@ll the world is about smiles and cries>
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Something like this? (not tested)

Code: Select all

foreach ban [lrange [lsort -index 2 -int -decreasing [chanbans #chan]] 0 5] {
	pushmode #chan -b $ban
}
Have you ever read "The Manual"?
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

user wrote:Something like this? (not tested)

Code: Select all

foreach ban [lrange [lsort -index 2 -int -decreasing [chanbans #chan]] 0 5] {
	pushmode #chan -b $ban
}
well it works partly, i add a line like

Code: Select all

putlog "$ban" 
and it shows the right bans. but it doesnt unban them. its about pushmode i think. any idea?[/code]
<@ll the world is about smiles and cries>
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

entrapmen wrote:
user wrote:Something like this? (not tested)

Code: Select all

foreach ban [lrange [lsort -index 2 -int -decreasing [chanbans #chan]] 0 5] {
	pushmode #chan -b $ban
}
well it works partly, i add a line like

Code: Select all

putlog "$ban" 
and it shows the right bans. but it doesnt unban them. its about pushmode i think. any idea?
im using

Code: Select all

 putserv "mode #chan -b $ban"
now, but it unbans like:

[00:19] * denemebotu sets mode: -b *!deneme18@*
[00:19] * denemebotu sets mode: -b *!deneme17@*
[00:19] * denemebotu sets mode: -b *!deneme16@*
[00:19] * denemebotu sets mode: -b *!deneme15@*
[00:19] * denemebotu sets mode: -b *!deneme14@*
[00:19] * denemebotu sets mode: -b *!deneme13@*
[00:24] * denemebotu sets mode: -b *!deneme12@*

is there a way to unban them all with -bbbbbb .. .. . .. ..?
<@ll the world is about smiles and cries>
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

why don't you use the bots intern banlist by creating the ban via newchanban? The bot should control the banlist by itself and push the requiered bans on chan when required and remove some to prevent overflow, if you have set the max ban correctly in the .conf file.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked