#############################################################
# joinnotify.tcl v1.0 by greenbear <greenbear@defragged.org>
#
# Someone asked for it, so here it is.
#
# It sends you a email when any of the nicks specified
# join one of the channels specified.
#
# notify you when any of theese nicks join your chan
set ppl "nick1 nick2"
# your email addy
set mail "email@addy.com"
# channels you want to monitor
set mailchans "#channel1 #channel2"
bind join - * notify
proc notify {nick uhost handle chan} {
global ppl mail mailchans
if {![file exists emptyfile] } {
set tempfile [open emptyfile w]
puts $tempfile " "
close $tempfile
}
if {([lsearch -exact [string tolower $ppl] [string tolower $nick]] != -1) && ([lsearch -exact [string tolower $mailchans] [$
putlog "$nick ($uhost) joined $chan, emailing $mail about it."
exec mail -s "$nick ($uhost) joined $chan" $mail < emptyfile
}
}
This is the script .. My idea is if you can eliminate static nicks and to ensure that the bot to see when entering the channel if the user has added to his userfile, and have +S flag is then sent to email to me..
Vignette:
The idea of the whole job is to receive mail2sms on my phone when someone added with +S flag and *hostmask* in bot userfile joining the channels..
I strongly hope someone can help. Thank you in advance:)
if {[validuser $handle] && [matchattr $handle |S $chan]} {
, which I think is what you want... it checks to see if the handle of the person joining is in the userfile and has the +S flag on the channel. Proc halts and does nothing otherwise.
Note that to give the user +S on the channel, you need to do ".chattr handle |+S" in the partyline. The "|" separates global from channel flags. In case you didn't know...
#############################################################
# joinnotify.tcl v1.0 by greenbear <greenbear@defragged.org>
#
# Someone asked for it, so here it is.
#
# It sends you a email when any of the nicks specified
# join one of the channels specified.
#
# notify you when any of theese nicks join your chan
set ppl "nick1 nick2"
# your email addy
set mail "email@addy.com"
# channels you want to monitor
set mailchans "#channel1 #channel2"
bind join - * notify
proc notify {nick uhost handle chan} {
if {[validuser $handle] && [matchattr $handle |S $chan]} {
global ppl mail mailchans
if {![file exists emptyfile] } {
set tempfile [open emptyfile w]
puts $tempfile " "
close $tempfile
}
if {([lsearch -exact [string tolower $ppl] [string tolower $nick]] != -1) && ([lsearch -exact [string tolower $mailchans] [$
putlog "$nick ($uhost) joined $chan, emailing $mail about it."
exec mail -s "$nick ($uhost) joined $chan" $mail < emptyfile
}
}
return
)