Code: Select all
# August 21, 2018
# #http://forum.egghelp.org/viewtopic.php?t=20495
# I am looking for tcl script to notify (with private msg to nick) quit events of certain people on channel.
#
# I am following my friend az
#
# Ex. on channel
# * Quits: @az (az@slackware.com) (Ping Timeout)
#
# Ex. in pvt
#
# Egg > hi, doni. az quit right now. Reason: Ping Timeout
###########################################
# set the list of nicks to watch for quits
set nicks2watch "foo moo who"
# set the nick to notify via pm
set pm_nick "your_nick"
# set the channel to watch
bind sign - "#temptest *" do_quit_notify
#####
proc do_quit_notify {nick uhost handle chan reason} {
global nicks2watch pm_nick
if {[lsearch -nocase [split $nicks2watch] [split $nick] ] != -1 } {
putserv "privmsg $pm_nick :Hi $pm_nick. $nick quit right now. Reason: $reason"
}
}
####
The main page for TCL commands is:doni wrote: ...
[08:48] Tcl error [do_quit_notify]: bad search mode "-nocase": must be -exact, - glob, or -regexp
i am using -exact and it's work! what are the differences between exact, glob or regexp?
For this one, go here:"#temptest *" --> why *?
with this one:if {[lsearch -nocase [split $nicks2watch] [split $nick] ] != -1 } {
if {[lsearch [string tolower [split $nicks2watch]] [string tolower [split $nick]] ] != -1 } {
I was unsure of this, and didn't take time to go try to look it up. Thank you.caesar wrote:The -nocase argument was introduced in version 8.5, so most likely he's using 8.4 (if not lower).
You're welcome.doni wrote:Guys, You are amazing!!! Thanks a lot!!!
You said "multiple users", yet your examples are ALSO multi-channel.Just last question...
In the same TCL:
- how can i set for multiple users in the same tcl?
ex. az want check quits of some nicks in #ipv6 channel
john want check quits of different nicks in #tcl channel
You'd just asked for "to user". That's singular. Are you going to later ask for it to be multi-user?- like quit, how can eggdrop catch full NOTICES from channel to send (paste) to user?
ex. on channel:
[Notice] john : hi guys, whatsup?
ex. in pvt or channel
Egg > john : hi guys, whatsup?
ex. on channel:
[Notice] john : hi guys, whatsup?
ex. in pvt or channel
Egg > john : hi guys, whatsup?
I need to catch from channel &SERVERS notices of join and leave of irc servers (netsplit) and paste it in another channel as text messageI don't get it. Perhaps that is because I get notices in channel, in my client. But why would you want to repeat what was just said, just using a different method? Especially why would you want to take what was said in a notice, and repeat it in the open channel?
There must be something that I'm not understanding....
Code: Select all
"privmsg $pm_nick :Hi $pm_nick. $nick quit right now. Reason: $reason"
doni wrote: ...
Hi, how can i show full mask after $nick in privmsg?ex. Hi John. Mario!ident@host.com quit right now etc..Code: Select all
"privmsg $pm_nick :Hi $pm_nick. $nick quit right now. Reason: $reason"
...
Code: Select all
putserv "privmsg $pm_nick :Hi $pm_nick. $nick $uhost quit right now. Reason: $reason"
ThanksReference: http://docs.eggheads.org/mainDocs/tcl-commands.htmlCode: Select all
putserv "privmsg $pm_nick :Hi $pm_nick. $nick $uhost quit right now. Reason: $reason"
and text search to find: bind sign
doni wrote:Hi guys, thanks for help. One last thing. How can i add JOIN notify in same TCL? So, QUIT and JOIN Notify in one TCL.
Code: Select all
# August 21, 2018
# #http://forum.egghelp.org/viewtopic.php?t=20495
# I am looking for tcl script to notify (with private msg to nick) quit events of certain people on channel.
#
# I am following my friend az
#
# Ex. on channel
# * Quits: @az (az@slackware.com) (Ping Timeout)
#
# Ex. in pvt
#
# Egg > hi, doni. az quit right now. Reason: Ping Timeout
###########################################
# set the list of nicks to watch for quits
set nicks2watch "foo moo who"
# set the nick to notify via pm
set pm_nick "your_nick"
# set the channel to watch
bind sign - "#temptest *" do_quit_notify
#####
proc do_quit_notify {nick uhost handle chan reason} {
global nicks2watch pm_nick
if {[lsearch -nocase [split $nicks2watch] [split $nick] ] != -1 } {
putserv "privmsg $pm_nick :Hi $pm_nick. $nick quit right now. Reason: $reason"
}
}
####
###
### August 25, 2019
# One last thing. How can i add JOIN notify in same TCL? So, QUIT and JOIN # Notify in one TCL.
bind join - "* *" do_join_notify
proc do_join_notify {nick uhost handle chan} {
global nicks2watch pm_nick
if {[lsearch [string tolower [split $nicks2watch]] [string tolower [split $nick]] ] != -1 } {
putserv "privmsg $pm_nick :Hi $pm_nick. $nick joined $chan . [strftime %c]"
}
}