Posted to tcl by old at Tue Aug 13 20:19:41 GMT 2019view raw

  1. proc znc:request { nick host handle chan text } {
  2. global scriptCommandPrefix zncPasswordSecurityLevel zncPasswordLength zncnetworkname zncrealname zncquitmsg zncvhost zncDefaultUserModules zncDefaultNetworkModules usePreconfiguredNetworks bannednetworks
  3. set username [lindex $text 0]
  4. set email [lindex $text 1]
  5. set networkname [lindex $text 2]
  6. set server [lindex $text 3]
  7. set port [lindex $text 4]
  8. if {[regexp -nocase {^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$} $email]} {
  9. putserv "PRIVMSG $chan :The e-mail is invalid."
  10. return
  11. }