bind pub - !addfilter proc_addfilter
bind pub - !delfilter proc_addfilter

proc proc_addfilter { nick uhost hand chan arg } {
putlog "$nick is adding $arg to filter list"
set file filterlist/filter.txt
set fs [open $file a] 
puts $fs "$arg" 
close $fs 
}

proc proc_delfilter { nick uhost hand chan arg } {
putlog "$nick is removing $arg from filter list"
set file filterlist/filter.txt
set fs [open $file w+]
set fs [split $fs \n]
set fs [$fs delete [lsearch -exact $fs *$arg*]]
puts $fs "$fs"
close $fs
} 
