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:
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" }
}
#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" }
}
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 !