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.

ban on part

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
bubl
Voice
Posts: 5
Joined: Thu Apr 27, 2006 1:43 pm

ban on part

Post by bubl »

Hello!

I would like a script that ban's any parting user in a channel (including operators). (it doesnt matter how long they have been in there, ANY part should result in a ban).

thanks! /bubl
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Code: Select all

bind part - * partban
proc partban {n u h c t} {
newchanban $c *!$u $::botnick partban %0
}
b
bubl
Voice
Posts: 5
Joined: Thu Apr 27, 2006 1:43 pm

Post by bubl »

Ok, user joins, parts and the bot sets a +ban. all good.
but, then when I removed the ban the user joined again and he got bankicked directly with the reason, partban. I only wan't it to ban on part.
and, if it could be possible to specifiy banmask/hostmask, it would be great! thanks! :o
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

bubl wrote:Ok, user joins, parts and the bot sets a +ban. all good.
but, then when I removed the ban the user joined again and he got bankicked directly with the reason, partban. I only wan't it to ban on part.
ok, so now we keep the ban off the bot:

Code: Select all

bind part - * partban
proc partban {n u h c t} {
putquick "MODE $c +b *!$u"
}
if it could be possible to specifiy banmask/hostmask, it would be great! thanks! :o
to change the mask used, edit the "*!$u" part of the procedure
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

What about a 'botisop' and check some flags like if it's friend or something? :)
Once the game is over, the king and the pawn go back in the same box.
b
bubl
Voice
Posts: 5
Joined: Thu Apr 27, 2006 1:43 pm

Post by bubl »

DragnLord wrote:
bubl wrote:Ok, user joins, parts and the bot sets a +ban. all good.
but, then when I removed the ban the user joined again and he got bankicked directly with the reason, partban. I only wan't it to ban on part.
ok, so now we keep the ban off the bot:

Code: Select all

bind part - * partban
proc partban {n u h c t} {
putquick "MODE $c +b *!$u"
}
if it could be possible to specifiy banmask/hostmask, it would be great! thanks! :o
to change the mask used, edit the "*!$u" part of the procedure
sry, my english is not that great.. :/
what I am trying to say is that the first example worked great, exept that it banned people when they joined the SECOND time, BEFORE they LEFT the second time.
gah, I suck at explaining.

:oops:
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

bubl wrote: sry, my english is not that great.. :/
what I am trying to say is that the first example worked great, exept that it banned people when they joined the SECOND time, BEFORE they LEFT the second time.
gah, I suck at explaining.

:oops:
of course the bot would ban on them rejoining, you are removing the ban from the channel's banlist but not off the bot's banlist

the bot was doing what it was made to do

the second example only places the ban into the channel's banlist so that when you remove it the bot does not ban on rejoin
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

caesar wrote:What about a 'botisop' and check some flags like if it's friend or something? :)
sure:

Code: Select all

proc partban {n u h c t} {
  if {[botisop $c]} {
    putquick "MODE $c +b *!$u"
  }
}
not checking for friends since his first post clearly stated
I would like a script that ban's any parting user in a channel (including operators)
b
bubl
Voice
Posts: 5
Joined: Thu Apr 27, 2006 1:43 pm

Post by bubl »

Code: Select all

00:00 ::: username!~user@192.168.0.1 has left #channel
00:00 ::: mode/#channel: +b *!user@192.168.0.1 by bot <- works! great!
00:00 ::: mode/#channel: -b+b *!user@192.168.0.1 *!*@192.168.0.1 by bot <- sad panda :cry: 
Why does the bot do this? :/

I am using this snippet atm

Code: Select all

 bind part - * partban

proc partban {n u h c t} {
putquick "MODE $c +b $u"
}

User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

bubl wrote:

Code: Select all

00:00 ::: username!~user@192.168.0.1 has left #channel
00:00 ::: mode/#channel: +b *!user@192.168.0.1 by bot <- works! great!
00:00 ::: mode/#channel: -b+b *!user@192.168.0.1 *!*@192.168.0.1 by bot <- sad panda :cry: 
Why does the bot do this? :/

I am using this snippet atm

Code: Select all

 bind part - * partban

proc partban {n u h c t} {
putquick "MODE $c +b $u"
}

1) check for other scripts that react to bans
2) try using the part ban on a "clean" bot (no other scripts, except the ones loaded by default)

the codes I gave you are not causing the second ban line that you showed
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

If you use my BanManager, you could also use newchanban. However the ban would only be removeable by known masters and owners (+m/+n) and not by regular ops :D.
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...
b
bubl
Voice
Posts: 5
Joined: Thu Apr 27, 2006 1:43 pm

Post by bubl »

Thanks! Works great now!

another quick question;

If I have a tcl script with lets say this function;

Code: Select all

bind pub o .kick pub_do_kick
is it +o flag the user need's to be able to use the public command?
and, is it possible to add a user without a handle, only host. (damn basterds keeps changing there nicks).
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

a user's handle does not have to be their nickname

the bot matches handles by hostmask, using *!ident@host.domain.tld for hostmasks will match when they change their nick
Post Reply