From 2b91e8424d6afd42e53b76f04ca497f190ee4a63 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 6 Apr 2008 13:08:24 +0000 Subject: support NOTICEs git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@332 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- config.sample | 1 + nsa | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.sample b/config.sample index 5fb761e..83754a0 100644 --- a/config.sample +++ b/config.sample @@ -11,5 +11,6 @@ projects: 'oftc': [ '#oftc' ] 'weasel': [ 'weasel' ] + 'tor': [ 'NOTICE:#tor' ] '*': [ '#commits' ] # vim:syn=yaml diff --git a/nsa b/nsa index d9cd333..cd7a2cd 100755 --- a/nsa +++ b/nsa @@ -398,7 +398,12 @@ while (1) do line = pr + line channellist = CONFIG['projects'].has_key?(project) ? CONFIG['projects'][project] : CONFIG['projects']['*'] channellist.each do |c| - bot.print "PRIVMSG #{c} :#{line}" + m = /^NOTICE:(.*)/.match c + if m + bot.print "NOTICE #{m[1]} :#{line}" + else + bot.print "PRIVMSG #{c} :#{line}" + end end end } -- cgit v1.2.3