Skip to content

Instantly share code, notes, and snippets.

@xatlas
Last active May 5, 2017 17:40
Show Gist options
  • Save xatlas/b05868db8c6819cfa28ca99048cdd4f4 to your computer and use it in GitHub Desktop.
Save xatlas/b05868db8c6819cfa28ca99048cdd4f4 to your computer and use it in GitHub Desktop.
Script para Eggdrop que hace un whois en cada join para obtener la lista de canales del usuario que entra al canal
set whois_debugchan "#canal_ops"
set whois_mainchan "#canal"
bind join -|- * whois_cmd
bind raw -|- "319" whois_channels
proc whois_cmd {n u h c} {
global whois_mainchan
if {[string tolower $c] == [string tolower $whois_mainchan]} {
putserv "WHOIS $n"
}
}
proc whois_channels {f k t} {
global whois_debugchan whois_mainchan botnick
set whois_nick [lindex [split $t " "] 1]
set whois_chan [string range [lindex [lrange [split $t " "] 2 end-1]] 1 end]
if {$whois_nick != $botnick } {
putserv "PRIVMSG $whois_debugchan :Canales de \002$whois_nick\002 -> $whois_chan"
}
}
putlog "Script autowhois cargado"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment