Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc fepo {nick action arg} {
- set arg [charfilter $arg]
- set fa [open "$basedir/$autorise(fichier)" a+]
- seek $fa 0
- while {![eof $fa]} {
- set get [gets $fa]
- if {[string equal [string tolower $get] [string tolower $nick]]==1} {
- }
- }
- close $fa
- return 0
- }
- if {$action=="ajout"} {
- if {$fa!=""} {
- puts $fa $arg
- return 1
- }
- }
- if {$action=="sup"} {
- if {$fa!=""} {
- if {![string match -nocase $arg [lindex $fa 0]] && ![string match -nocase $arg [lindex $fa 1]]} {
- puts $fa $arg
- return 1
- }
- }
- }
- if {$action=="join"} {
- if {$fa!=""} {
- puts $fa
- if [string match -nocase [lindex $fa 0] $arg] {
- return 1
- }
- }
- close $fa
- }
Add Comment
Please, Sign In to add comment