Guest User

Untitled

a guest
Feb 28th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.92 KB | None | 0 0
  1. proc fepo {nick action arg} {
  2.         set arg [charfilter $arg]
  3.         set fa [open "$basedir/$autorise(fichier)" a+]
  4.         seek $fa 0
  5.         while {![eof $fa]} {
  6.              set get [gets $fa]
  7.              if {[string equal [string tolower $get] [string tolower $nick]]==1} {
  8.              }
  9.         }
  10.         close $fa
  11.         return 0
  12.     }
  13.     if {$action=="ajout"} {
  14.         if {$fa!=""} {
  15.             puts $fa $arg
  16.             return 1
  17.         }
  18.     }
  19.     if {$action=="sup"} {
  20.         if {$fa!=""} {
  21.             if {![string match -nocase $arg [lindex $fa 0]] && ![string match -nocase $arg [lindex $fa 1]]} {
  22.                 puts $fa $arg
  23.                 return 1
  24.             }
  25.         }
  26.     }
  27.     if {$action=="join"} {
  28.         if {$fa!=""} {
  29.             puts $fa
  30.             if [string match -nocase [lindex $fa 0] $arg] {
  31.                 return 1
  32.             }
  33.         }
  34.         close $fa
  35.     }
Add Comment
Please, Sign In to add comment