| View previous topic :: View next topic |
| Author |
Message |
bubl Voice
Joined: 27 Apr 2006 Posts: 5
|
Posted: Thu Apr 27, 2006 2:21 pm Post subject: ban on part |
|
|
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 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Apr 27, 2006 3:07 pm Post subject: |
|
|
| Code: |
bind part - * partban
proc partban {n u h c t} {
newchanban $c *!$u $::botnick partban %0
}
|
|
|
| Back to top |
|
 |
bubl Voice
Joined: 27 Apr 2006 Posts: 5
|
Posted: Thu Apr 27, 2006 3:19 pm Post subject: |
|
|
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!  |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Apr 27, 2006 4:23 pm Post subject: |
|
|
| 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: | bind part - * partban
proc partban {n u h c t} {
putquick "MODE $c +b *!$u"
} |
| Quote: | if it could be possible to specifiy banmask/hostmask, it would be great! thanks!  |
to change the mask used, edit the "*!$u" part of the procedure |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Apr 27, 2006 5:21 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
bubl Voice
Joined: 27 Apr 2006 Posts: 5
|
Posted: Thu Apr 27, 2006 6:12 pm Post subject: |
|
|
| 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: | bind part - * partban
proc partban {n u h c t} {
putquick "MODE $c +b *!$u"
} |
| Quote: | if it could be possible to specifiy banmask/hostmask, it would be great! thanks!  |
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.
 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Apr 27, 2006 7:15 pm Post subject: |
|
|
| 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.
 |
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 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Apr 27, 2006 7:24 pm Post subject: |
|
|
| caesar wrote: | What about a 'botisop' and check some flags like if it's friend or something?  |
sure:
| Code: | 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 | Quote: | | I would like a script that ban's any parting user in a channel (including operators) |
|
|
| Back to top |
|
 |
bubl Voice
Joined: 27 Apr 2006 Posts: 5
|
Posted: Thu Apr 27, 2006 10:37 pm Post subject: |
|
|
| Code: | 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: | bind part - * partban
proc partban {n u h c t} {
putquick "MODE $c +b $u"
}
|
|
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Apr 27, 2006 11:12 pm Post subject: |
|
|
| bubl wrote: | | Code: | 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: | 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 |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Apr 28, 2006 3:59 am Post subject: |
|
|
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 . _________________ 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... |
|
| Back to top |
|
 |
bubl Voice
Joined: 27 Apr 2006 Posts: 5
|
Posted: Fri Apr 28, 2006 8:56 am Post subject: |
|
|
Thanks! Works great now!
another quick question;
If I have a tcl script with lets say this function;
| Code: | | 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). |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri Apr 28, 2006 9:14 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|