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 

Chan ban

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


Joined: 30 Aug 2005
Posts: 6

PostPosted: Fri Jan 27, 2006 10:26 pm    Post subject: Chan ban Reply with quote

Hi
I need a script similar to BanChan
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=34
but that works in diffrent way. It has to do a whois on user and kickban them if they're NOT on specified channel, if they're on specified channel bot should just leave them. Thanks for any help Smile
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jan 28, 2006 12:12 am    Post subject: Reply with quote

xchannel supports that via regexps
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
dMTOn
Voice


Joined: 30 Aug 2005
Posts: 6

PostPosted: Sat Jan 28, 2006 8:06 am    Post subject: Reply with quote

It does something like that ?
I looked at code and can't find that (only bad channel) but as i said i need something diffrent. If it does that could you write here how to set it up ?
Thanks
Back to top
View user's profile Send private message
caesar
Mint Rubber


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

PostPosted: Sat Jan 28, 2006 10:15 am    Post subject: Reply with quote

The bot is in that *specified* channel and chould see if it's there or not or you need to collect this information by doing a whois on a user upon join?
_________________
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
dMTOn
Voice


Joined: 30 Aug 2005
Posts: 6

PostPosted: Sat Jan 28, 2006 2:20 pm    Post subject: Reply with quote

caesar wrote:
The bot is in that *specified* channel and chould see if it's there or not or you need to collect this information by doing a whois on a user upon join?

Bot is on that channel
Back to top
View user's profile Send private message
caesar
Mint Rubber


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

PostPosted: Sat Jan 28, 2006 4:34 pm    Post subject: Reply with quote

Code:

set badchan(channel) "#foo"
set badchan(reason) "You aren't on the BadChan!"
set badchan(duration) "60"

bind join * * bad:chan:join

proc bad:chan:join {nick uhost hand chan} {
  global badchan
  if {[isbotnick $nick] || [string match -nocase $chan $badchan(channel)] || ![validchan $badchan(channel)]} return
  if {![botisop $chan] || ![botonchan $badchan(channel)] || [onchan $nick $badchan(channel)]} return
  newchanban $chan *!*@[lindex [split $uhost @] 1] BadChan $badchan(duration) $badchan(reason)
  putquick "KICK $chan $nick :$badchan(reason)" -next
}

_________________
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
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jan 28, 2006 5:31 pm    Post subject: Reply with quote

hmm I spoke too early... no, you can't do that with xchannel Twisted Evil if the script was checking /whois channel reply only, you could add something like [^#foobar] in your badwhois file... alas, it also checks ircname/gecos and server, so it would punish for no match on these with #foobar
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
dMTOn
Voice


Joined: 30 Aug 2005
Posts: 6

PostPosted: Sat Jan 28, 2006 7:06 pm    Post subject: Reply with quote

Thanks a lot caesar, the script does the job! Wink
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