View previous topic :: View next topic |
Author |
Message |
ORATEGOD Voice
Joined: 08 Jun 2020 Posts: 34
|
Posted: Tue Jan 03, 2023 5:25 pm Post subject: kill on join. :O |
|
|
Description:
Este código asigna una acción al evento "on join", que se activa cuando un usuario se une a un canal. Cuando se activa este evento, el código obtiene el nombre de usuario del usuario que se ha unido al canal y lo compara con la lista de usuarios a los que quieren dar un kill. Si el usuario está en la lista, el código incrementa la variable de kills afectados y da un kill al usuario con el comando "putserv".
This code assigns an action to the "on join" event, which is fired when a user joins a channel. When this event is fired, the code gets the username of the user who joined the channel and compares it to the list of users it wants to kill. If the user is on the list, the code increments the hit kills variable and kills the user with the "putserv" command.
###########
I found this TCL, but I think it's unfinished.
It is possible to assign a specific #channel, for example #Eggdrop and prevent the entry of guest*!*"
Sorry if this code is STUPID for some....
###########
Code: | # Crea una lista de usuarios a los que quieres dar un kill
# Create a list of users you want to kill
set kill_list { "guest*!*" "user*!*"" "chat*!*" }
# Crea una variable para llevar un registro de cuántos kills has afectado
# Create a variable to keep track of how many kills you have affected
set kills_affected 0
# Asigna una acción al evento "on join"
# Assign an action to the "on join" event
bind join -|- {
# Obtiene el nombre de usuario del usuario que se ha unido al canal
# Gets the username of the user who joined the channel
set username [lindex $event 1]
# Verifica si el usuario está en la lista de usuarios a los que quieres dar un kill
# Check if the user is in the list of users you want to kill
if {[lsearch -exact $kill_list $username] != -1} {
# Incrementa la variable de kills afectados
# Increases the affected kills variable
incr kills_affected
# Da un kill al usuario
# Kill the user
putserv "KILL $username :kill affected ($kills_affected)"
}
} |
##########
Sorry for my bad English
########## |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1027
|
Posted: Tue Jan 03, 2023 11:04 pm Post subject: |
|
|
If u are going to kill them off the server why not use the ircd or services server for that? I use it myself as well on a network i support im not sure what kind of ircd and services you are running tho |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1027
|
Posted: Wed Jan 04, 2023 2:07 am Post subject: |
|
|
If you want to manage per channel why not just kickban instead of killing them off the server? |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1108 Location: France
|
Posted: Wed Jan 04, 2023 5:41 am Post subject: |
|
|
Your script can't work because you use -exact in lsearch, you need -glob (or nothing, -glob is default)
You can try this:
Code: | namespace eval nkiller {
variable kill_list {"guest*!*" "user*!*" "chat*!*"}
variable kills_affected 0
setudef flag killnick
proc kjoin {nick uhost handle chan} {
if {![channel get $chan killnick]} { return }
set umask "$nick!$uhost"
if {[lsearch -glob -nocase $::nkiller::kill_list $umask] >= 0} {
incr ::nkiller::kills_affected
putserv "KILL $nick :kill affected ($::nkiller::kills_affected)"
}
}
bind join - * ::nkiller::kjoin
} |
Note : you'll have to activate the script on each chan by doing .chanset #channel +killnick _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|