Page 1 of 1

Check for quotes on join

Posted: 05.04.2009 20:22
by Tuxman
When a user joins a channel you are in, this snippet checks if there is a random quote containing his nickname in your /quotes database and echoes it into the particular channel ...

Code: Select all

on *:join:#:{
  if (%autoquote != 1) {
    set -u10 %autoquote 1
    window -w0h @gircSearchQuotesTempWindow
    filter -fwc bin\txt\quotes.txt @gircSearchQuotesTempWindow $+(*, $nick, *)
    if ($line(@gircSearchQuotesTempWindow,$rand(1,$filtered))) { msg $chan $v1 }
    window -c @gircSearchQuotesTempWindow
  }
}