#--------------------------------------------------------------------- # privategreet.tcl # TCL script for IRC bot eggdrop # # If a channel is set +greet, the bot will greet a recognised # user with the greet line of that user in public. # With this script and the channel setting -greet, the user will be # greeted in private. # # v0: 16-Mar-2002 #--------------------------------------------------------------------- bind join - * privategreet proc privategreet { nick uhost hand chan } { # If channelsetting is +greet, omit this script... set chaninfo [channel info $chan] if {[lsearch -exact $chaninfo +greet] != -1} { return } # known user? if {![validuser $hand]} { return } # retrieve channel greeting set changreet [getchaninfo $hand $chan] if {[string length $changreet] != 0} { puthelp "NOTICE $nick :\[$nick\] $changreet" return } # retrieve global greeting # getinfo available in compat.tcl set globgreet [getinfo $hand] if {[string length $globgreet] != 0} { puthelp "NOTICE $nick :\[$nick\] $globgreet" return } } putlog "Privategreet version 0 loaded."