| View previous topic :: View next topic |
| Author |
Message |
h1x0r1 Voice
Joined: 22 Jan 2020 Posts: 5
|
Posted: Wed Jan 22, 2020 5:59 am Post subject: Redirect Ban with eggdrop (inspircd) |
|
|
Hello to all. I have to write some script to make ban with redirect chan. This option in inspircd server is possible with command mode +b banmask!*@*#channel
This is the code but it's not working:
| Code: |
set redirectchan "#sex"
proc sex_ban { nick uhost hand chan text } {
global botnick redirectchan
set banmask [getchanhost $text $chan]
if {[onchan $text]} {
putquick "MODE $chan +b $banmask$redirectchan" #this raw not working
putquick "KICK $chan $text Here is not a sex chan!"
} else { putserv "PRIVMSG $chan :$text Is Not In The Channel" }
}
|
Please help me  |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Wed Jan 22, 2020 11:52 am Post subject: Re: Redirect Ban with eggdrop (inspircd) |
|
|
| Code: |
putquick "MODE $chan +b $banmask$redirectchan" #this raw not working
|
Should there be a space between $banmask and $redirectchan ? _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
h1x0r1 Voice
Joined: 22 Jan 2020 Posts: 5
|
Posted: Wed Jan 22, 2020 3:35 pm Post subject: |
|
|
No, the command is $banmask#chan like: *!*ddd@dasd.com#channel
I try with space and didn't work ! |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Wed Jan 22, 2020 4:54 pm Post subject: |
|
|
This is the manual page for The "banredirect" Module in InspIRCd v2
https://docs.inspircd.org/2/modules/banredirect/
The same seems to apply for InspIRCd v3
That explains what is required to make the banredirect command work.
Try changing your banmask line to like this:
| Code: | | set banmask *![getchanhost $text $chan] |
Maybe a kick is not required after setting this banredirect mode? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
h1x0r1 Voice
Joined: 22 Jan 2020 Posts: 5
|
Posted: Thu Jan 23, 2020 1:56 am Post subject: |
|
|
Thanks for replay!
The change of banmask not working.
Bot didn't put any error in dcc. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 23, 2020 2:01 am Post subject: |
|
|
You also need to get rid of this text after the code on that line...
#this raw not working _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
h1x0r1 Voice
Joined: 22 Jan 2020 Posts: 5
|
Posted: Thu Jan 23, 2020 3:52 am Post subject: |
|
|
Code is :
| Code: |
#sexBAN
set redirectchan "#sex"
proc sex_ban { nick uhost hand chan text } {
global botnick redirectchan
set banmask *![getchanhost $text $chan]
if {[onchan $text]} {
putquick "MODE $chan +b $banmask$redirectchan"
putquick "KICK $chan $text This is not a sex channel"
} else { putserv "PRIVMSG $chan :$text Is Not In The Channel" }
}
|
and didn't work eggdrop is 1.6.21 |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 23, 2020 11:12 am Post subject: |
|
|
I believe the redirect only affects users trying to join after the ban has been set and is active on the channel.
Your script is setting a ban on a user already in the channel.
The kick is removing the user from the channel, Not the redirectban:) _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
h1x0r1 Voice
Joined: 22 Jan 2020 Posts: 5
|
Posted: Fri Jan 24, 2020 9:37 am Post subject: |
|
|
I'm so sorry for disturbing you.
Code is working fine but i forgot the fact user who sets redirect ban need to be operator not only in first channel. Need to be operator in redirectchan also !
Thanks for the help again! |
|
| Back to top |
|
 |
|