Communauté Eggdrop
Message de blackliste en minuscule - Version imprimable

+- Communauté Eggdrop (https://forum.eggdrop.fr)
+-- Forum : Eggdrop et TCL (https://forum.eggdrop.fr/forumdisplay.php?fid=8)
+--- Forum : Scripts TCL (https://forum.eggdrop.fr/forumdisplay.php?fid=4)
+--- Sujet : Message de blackliste en minuscule (/showthread.php?tid=662)



Message de blackliste en minuscule - Julien23 - 26/04/2010

hello à tous,

je vient vers vous car je rencontre un souci sur un tcl de blackliste.en effet lors de l'ajout de l'indésirable faut y ajouter une raison et cet raison s'enregistre en minuscule et non comme je l'ai écris.j'aimerai savoir ce qu'il faudrait que je remplace, pour qu'il enregistre et lisent le pseudo et la raison normalement svp.

TCL
proc bl:do:add {hand arg} {
 global blackl BLNicks
 set added 0
 if {[llength [lrange [split $arg] 1 end]] == 1} {
  if {[string is integer [lindex [split $arg] end]]} {
   set kreason "$blackl(kmsg)"
   set btime "[lindex [split $arg] end]"
  } else {
   set kreason "[lrange [split $arg] 1 end]"
   set btime "$blackl(btime)"
  }
 } elseif {[llength [lrange [split $arg] 1 end]] > 1} {
  if {[string is integer [lindex [split $arg] end]]} {
   set kreason "[join [lrange [split $arg] 1 end-1]]"
   set btime "[lindex [split $arg] end]"
  } else {
   set kreason "[join [lrange [split $arg] 1 end]]"
   set btime "$blackl(btime)"
  }
 } else {
  set kreason "$blackl(kmsg)"
  set btime "$blackl(btime)"
 }
 if {![file exists $blackl(file)]} { 
  set temp [open $blackl(file) w]
  close $temp
 }
 set blnick "[string map {\\ \\\\ \[ \\\[ \] \\\]} [lindex [split $arg] 0]]"
 if {![we:can:find:ban $blnick add]} {
  puts [set fs [open $blackl(file) a]] "$blnick $hand $kreason $btime"
  close $fs
  set BLNicks [split [string tolower [read [set inf [open $blackl(file)]]]] "\n"][close $inf]
  set added 1
 }
 set added
}



merci de votre aides.