diff options
author | Peter Palfrader <peter@palfrader.org> | 2008-04-06 13:08:24 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2008-04-06 13:08:24 +0000 |
commit | 2b91e8424d6afd42e53b76f04ca497f190ee4a63 (patch) | |
tree | 394536858ae46f86df9c009e813a05484008bd81 | |
parent | 592962ef56b6bbf543ed837b0893a1d466e8e764 (diff) |
support NOTICEs
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@332 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rw-r--r-- | config.sample | 1 | ||||
-rwxr-xr-x | nsa | 7 |
2 files changed, 7 insertions, 1 deletions
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 @@ -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 } |