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.

Chan ban

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
d
dMTOn
Voice
Posts: 6
Joined: Tue Aug 30, 2005 3:59 am

Chan ban

Post by dMTOn »

Hi
I need a script similar to BanChan
http://www.egghelp.org/cgi-bin/tcl_arch ... load&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 :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

xchannel supports that via regexps
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
d
dMTOn
Voice
Posts: 6
Joined: Tue Aug 30, 2005 3:59 am

Post by dMTOn »

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
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
d
dMTOn
Voice
Posts: 6
Joined: Tue Aug 30, 2005 3:59 am

Post by dMTOn »

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
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm I spoke too early... no, you can't do that with xchannel :twisted: 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: Select all

 tag when posting logs, code
d
dMTOn
Voice
Posts: 6
Joined: Tue Aug 30, 2005 3:59 am

Post by dMTOn »

Thanks a lot caesar, the script does the job! :wink:
Post Reply