Hey,
I need script what will ban user from channel (only ban no kick) when he joins...
But i need to set host exceptions myself into some other file or somewhere...
Maybe someone can help me
Code: Select all
bind join * * join:ban
proc join:ban {nick host hand chan} {
set host [getchanhost $nick $chan]
set fs "exceptions.txt"
if {![file exists $fs]} {
close [open $fs w]
}
set fs [open $fs]
set data [split [read -nonewline $fs] \n]
close $fs
if {[lsearch $data "$host"] == -1} {
putserv "MODE $chan +b *!*@*.[join [lrange [split $host .] end-1 end] .]
}
return
}
Code: Select all
bind join * * join:ban
proc join:ban {nick host hand chan} {
If {![matchattr $hand |A $chan]} {
set host [getchanhost $nick $chan]
putserv "MODE $chan +b *!*@*.[join [lrange [split $host .] end-1 end] .]"
}
return
}
Code: Select all
set host [getchanhost $nick $chan]
Code: Select all
set host [string trim [getchanhost $nick $chan] ~]