| View previous topic :: View next topic |
| Author |
Message |
dMTOn Voice
Joined: 30 Aug 2005 Posts: 6
|
Posted: Fri Jan 27, 2006 10:26 pm Post subject: Chan ban |
|
|
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  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 28, 2006 12:12 am Post subject: |
|
|
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 |
|
 |
dMTOn Voice
Joined: 30 Aug 2005 Posts: 6
|
Posted: Sat Jan 28, 2006 8:06 am Post subject: |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Jan 28, 2006 10:15 am Post subject: |
|
|
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 |
|
 |
dMTOn Voice
Joined: 30 Aug 2005 Posts: 6
|
Posted: Sat Jan 28, 2006 2:20 pm Post subject: |
|
|
| 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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Jan 28, 2006 4:34 pm Post subject: |
|
|
| 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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 28, 2006 5:31 pm Post subject: |
|
|
hmm I spoke too early... no, you can't do that with xchannel 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 |
|
 |
dMTOn Voice
Joined: 30 Aug 2005 Posts: 6
|
Posted: Sat Jan 28, 2006 7:06 pm Post subject: |
|
|
Thanks a lot caesar, the script does the job!  |
|
| Back to top |
|
 |
|