All pastes #27873 Raw Edit

Untitled

public text v1 · immutable
#27873 ·published 2005-11-07 13:11 UTC
rendered paste body
bind pub - !add regex_rlstest

set bot(chans) "#chan1 #chan2 #chan3"
foreach one $bot(chans) { set bot(dupe-[string tolower $one]) "" }

proc regex_rlstest {nick host handle chan arg} {
 global bot
 putlog "$arg"

 if { [string match $arg $bot(dupe-[string tolower $chan])] } {
  putlog "\002DEBUG:\002 Skipping ($bot(dupe-[string tolower $chan])) from ($chan), already seen it."
  return
 }

 set stripped_rls [string map -nocase {"repack." ""} $arg]
 set bot(dupe-[string tolower $chan]) $arg

 if { [regexp -nocase -inline -- {\.repack\.} $arg] == 1 } {
  putquick "PRIVMSG $chan :REPACK RELEASE -> !nuke $stripped_rls get.repack"
 } else {
  putquick "PRIVMSG $chan :$stripped_rls is not a REPACK RELEASE."
 }
}