This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

kill on join. :O

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
O
ORATEGOD
Voice
Posts: 39
Joined: Mon Jun 08, 2020 5:50 pm

kill on join. :O

Post by ORATEGOD »

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: Select all

# 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
##########
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

If you want to manage per channel why not just kickban instead of killing them off the server?
User avatar
CrazyCat
Revered One
Posts: 1215
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Your script can't work because you use -exact in lsearch, you need -glob (or nothing, -glob is default)

You can try this:

Code: Select all

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
Post Reply