egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ban on part

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
bubl
Voice


Joined: 27 Apr 2006
Posts: 5

PostPosted: Thu Apr 27, 2006 2:21 pm    Post subject: ban on part Reply with quote

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Apr 27, 2006 3:07 pm    Post subject: Reply with quote

Code:

bind part - * partban
proc partban {n u h c t} {
newchanban $c *!$u $::botnick partban %0
}
Back to top
View user's profile Send private message
bubl
Voice


Joined: 27 Apr 2006
Posts: 5

PostPosted: Thu Apr 27, 2006 3:19 pm    Post subject: Reply with quote

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! Surprised
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Apr 27, 2006 4:23 pm    Post subject: Reply with quote

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! Surprised

to change the mask used, edit the "*!$u" part of the procedure
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Apr 27, 2006 5:21 pm    Post subject: Reply with quote

What about a 'botisop' and check some flags like if it's friend or something? Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
bubl
Voice


Joined: 27 Apr 2006
Posts: 5

PostPosted: Thu Apr 27, 2006 6:12 pm    Post subject: Reply with quote

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! Surprised

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.

Embarassed
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Apr 27, 2006 7:15 pm    Post subject: Reply with quote

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.

Embarassed

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Apr 27, 2006 7:24 pm    Post subject: Reply with quote

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

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
View user's profile Send private message
bubl
Voice


Joined: 27 Apr 2006
Posts: 5

PostPosted: Thu Apr 27, 2006 10:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Apr 27, 2006 11:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Fri Apr 28, 2006 3:59 am    Post subject: Reply with quote

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 Very Happy.
_________________
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
View user's profile Send private message MSN Messenger
bubl
Voice


Joined: 27 Apr 2006
Posts: 5

PostPosted: Fri Apr 28, 2006 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Apr 28, 2006 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber