Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


Protect /oper
#1
Coucou à tous...

Voilà, j'ai essayé de crée un TCL afin que mes "opers" ne se opers pas avec l'ident "guest" sinon le robot kill, mais j'aurai voulus activé la détection sur un salon préçis, par exemple à l'auto-oper il rejoint #Opers, et donc activé cette protection sur le salon, voici le code:


tcl
set badchan "#Opers"
 
bind join - * flooder:join
 
proc flooder:join {nick uhost handle channel} {
   set ident [lindex [split $uhost @] 0]
   if {[regexp "guest" $ident]} {
      putquick "PRIVMSG #Opers : Erreur Opers $nick à essayé de se Opers avec un Ident guest - Auto-Killed"
      putquick "KILL $nick :Merci, d'utilisé votre réservation avant de vous /opers !"
   }
}


Comment je peux le modifier ? :x

Cordialement,
BlueIRC.fr - Serveur de t'Chat IRC ;-)
http://www.BlueIRC.fr
#2
bonsoir,

pourquoi ne t'inspire tu pas d'un bad ident ?

voici un code trouve en 5 mn sur google


tcl
##################################################
### Start editing variables from here onwards! ###
##################################################
 
#Set the channel(s) you want this script active on.
#This script supports multiple channels.
#Usage: "#channel1 #channel2 #mychannel"
#(To activate on all channels use: "")
set badidentchans "#mychannel"
 
#Set the *bad words* for the script to react on. 
#When users join a channel this script is activated 
#and their idents match this current world list, 
#they will be kicked/banned. (wildcards "*" are accepted)
#(Set/edit these words according to your needs)
#(I have already added some as examples)
set badidents {
"Guest"
}
 
 
#Set the flags for bot owners, masters, ops
#and users which to exempt from the script.
#(Usage: m, n, o, or "mnf", "fbo" etc)
set badidentexempt "mnof|mnof"
 
#For how long you wish (in minutes) to ban the 
#user with the bad ident. (mins)
set badidbantime 30
 
 
###############################################################################
### Don't edit anything else from this point onwards, even if you know tcl! ###
###############################################################################
 
bind join - * join:badident
 
proc join:badident {nick host hand chan} {
 global botnick badidents badidentchans badidentexempt badidbantime
  if {(([lsearch -exact [string tolower $badidentchans] [string tolower $chan]] != -1) || ($badidentchans == "*")) && ($nick != $botnick)} {
    foreach badident [string tolower $badidents] {
     set badidentban1 "*!*$badident*@*"
     set badidentban2 "*!*@[lindex [split $host @] 1]"
     set userident "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
    if {[string match *$badident* [string tolower $userident]]} {
      if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $badidentexempt $chan]) && ([onchan $nick $chan])} {
          putquick "MODE $chan -o+bb $nick $badidentban1 $badidentban2"
        putquick "KICK $chan $nick :Bad User Ident Kick  - Unacceptable *User Ident* detected. Please change your 'IDENT' to a suitable one and then rejoin back."
        timer $badidbantime "pushmode $chan -b $badidentban2"
        return 0
        }
      }
    }
  }
}
# (ain't i an asskicker?...)
 
 
putlog "Bad Ident Kicker Script v1.65.ab by \002awyeah (awyeah@usa.net)\002 -=Loaded=-"
putlog "*ENABLED* Bad Ident Kicker Script on:\002 $badidentchans"
 
return



Cordialement DnS
La différence entre Linux et Windows ,c'est que Linux c'est comme une belle fille , il faut l'apprivoiser , la comprendre , la séduire tandis que Windows , c'est comme une prostitué , il faut payer et surtout bien se protéger.


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Script] Flood & Protect uDc 33 1,465 15/01/2022, 01:49
Last Post: CrazyCat
  [Demande] Oper automatiquement sur un salon Dydouch 2 3,650 02/12/2013, 22:58
Last Post: Dydouch
  [KILL] Protection de la commande /oper pseudo FauxPass mecmec 12 7,135 24/04/2011, 23:14
Last Post: aliasangelius
  Bind raw - FAILED OPER alanfollow 9 5,554 31/12/2010, 17:29
Last Post: cestlemien
  Oper-Tcl Meribre 4 5,093 14/11/2009, 18:25
Last Post: Su_e_do_is

Forum Jump:


Users browsing this thread: 1 Guest(s)