31/10/2010, 01:19
Re,
j'ai retrouvé ceci , si ça peux servir ...
A NOTER QUE L4EGGDROP DOIS AVOIR UNE O-LINE
j'ai retrouvé ceci , si ça peux servir ...
A NOTER QUE L4EGGDROP DOIS AVOIR UNE O-LINE
tcl
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# NSGLIST.TCL
set NSGlist_version "1.1.1"
# by ToM (2006)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# DESCRIPTION :
# Designed to allow any IRCOp to see the nicks group of some user.
# The script is active in the channels by using .chanset #chan +glist
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# CHANGELOG :
# v1.0
# Script creation
# v1.1
# Added the comments - You never know who will maintain your scripts.
# Added an init: $glistout wasnt set on load and all notices were processed.
# Added an output when no arg are given, then we know Services dont just lag.
# v1.1.1
# Added a channel flag: .chanset #chan +nsglist
# Bind changed from pubm to pub
# Renamed to NSGlist.tcl
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TODO LIST :
# - Maybe someday add some way to make the output switchable between full
# display or in a single line
# - Add an optional access protection (chan status, user flag)
# - Split the NickServ query from the nsglist:input proc, to make it
# available for other scripts - Maybe turn all of this to a gigantic
# Services Query script...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Do not edit bellow until you know what you're doing :p
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# INIT
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Set $glistout to 0 on load, or any notice will be
# processed until the script is triggered.
set glistout 0
setudef flag nsglist
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# CHANNEL TRIGGER
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind pub - "!glist" nsglist:input
proc nsglist:input { nick uhost handle chan arg } {
if { ! [channel get $chan nsglist] } {
putlog "WARNING: $nick$uhost @ $chan tried to use !glist: $arg"
return 0
}
# No arg? Lets explain this complicated syntax.
if { [lindex $arg 0] == "" } {
putserv "privmsg $chan :Syntax: !glist <NiCk>"
return 0
}
putserv "privmsg Nickserv :glist [lindex $arg 0]"
global glistoutchan
set glistoutchan $chan
# Tracability
putlog "GList: $nick$uhost on $chan used !glist: $arg."
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# NICKSERV NOTICES HANDLERS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# toggle output on
bind notc - "List of nicknames in the group of*" nsglist:bind
proc nsglist:bind { nick uhost handle text dest } {
global glistout
set glistout 1
}
# Display
bind notc - * nsglist:output
proc nsglist:output { nick uhost handle text dest } {
global glistout glistoutchan
if { $glistout == 1 } {
putserv "privmsg $glistoutchan :$text"
}
}
# Toggle output off
bind notc - "*nicknames in the group." nsglist:unbind
proc nsglist:unbind { nick uhost handle text dest } {
global glistout
set glistout 0
}
} else {
puthelp "PRIVMSG $chan : $nick : desolé je n'y ai pas accés à la liste de $arg, il me faut le flag ircop , ou le pseudo n'est pas enegistré"
}
return 0
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
putlog "\002NSGList.tcl\017 v$NSGlist_version by ToM loaded. (commande en pl .chanset #chan +nsglist etsur lechan !glist)"