notify for when users enter the server

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
flink
Halfop
Posts: 83
Joined: Sun Feb 21, 2021 9:27 am
Location: Canarias

notify for when users enter the server

Post by flink »

the request would know of any notify tcl server level,
Last edited by flink on Mon Jul 29, 2024 4:40 am, edited 2 times in total.
Mi ingles: no es el mejor, Manda el traductor... :)
s
simo
Revered One
Posts: 1143
Joined: Sun Mar 22, 2015 2:41 pm

Re: notify for when users enter the server

Post by simo »

you could try this :

Code: Select all


set monchan "#MonitorChannel"
bind raw - NOTICE SnoticeMonitor

proc SnoticeMonitor {from key text} {

   if {[string match *!*@* $from]} { return 0 ; # not a server notice }

  if {[regexp -nocase { CONNECT: Client connecting on port (\d+) \(class (\S+)\): ([^!]+)!([^@]+)@(\S+) \(([0-9a-f.:]+)\) \[(.*)\]} $text -> port class nick ident host  ip realname]} {
   putserv "PRIVMSG $::monchan :$nick connecting from $ident!$host"
 }

  if {[regexp -nocase { REMOTECONNECT: Client connecting at (\S+\:) ([^!]+)!([^@]+)@(\S+) \(([0-9a-f.:]+)\) \[(.*)\]} $text ->  server nick ident host ip realname] } { 
   putserv "PRIVMSG $::monchan :$nick connecting from $ident!$host"
}
   return 0
}


User avatar
flink
Halfop
Posts: 83
Joined: Sun Feb 21, 2021 9:27 am
Location: Canarias

Re: notify for when users enter the server

Post by flink »

Thanks simo for answering, what you propose does not work.
Mi ingles: no es el mejor, Manda el traductor... :)
Post Reply