Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.79 KB | None | 0 0
  1. proc ::addspam::addspam {nick host hand chan text} {
  2.     if {$chan ne $::addspam::chanback} { putnow "NOTICE $nick :Accès refusé"; return}
  3.     set type [string range $text 0 [string first " " $text]]
  4.     set text [string range $text [expr [string first " " $text] + 1] end]
  5.     set motif [string first "-motif" $text]
  6.     if { $motif == -1 } {
  7.         set lienspamcmd [string map {" " "_"} $text]
  8.         set raisonspam "Default_spam_reason"
  9.     } else {
  10.         set lienspamcmd [string map {" " "_"} [string range $text 0 [expr $motif - 1]]]
  11.         set raisonspam [string map {" " "_"} [string range $text [expr $motif + 7] end]]
  12.     }
  13.     putlog "lienspamcmd => $lienspamcmd"
  14.     putlog "raison => $raisonspam"
  15.     if {$lienspamcmd == ""} {
  16.         putnow "NOTICE $nick :\002Syntaxe:\002 !addspam <gline/shun/block> <test.fr>"
  17.         return 0
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement