unexist.dev

Changeset 299:13398d3a8d5d

Added stfu arg
author unexist
date Fri, 13 Jan 2012 20:27:34 +0100
parents 8fc4ad9f99c2
children bbe8fd9ac1c8
files bot/cinch.rb
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bot/cinch.rb	Thu Jan 05 22:48:38 2012 +0100
+++ b/bot/cinch.rb	Fri Jan 13 20:27:34 2012 +0100
@@ -20,10 +20,10 @@
 
 # Config
 if "aral" == Socket.gethostname
-  NICK     = "Geass-test"
+  NICK     = "SFW-test"
   CHANNELS = [ "#subtle-test" ]
 else
-  NICK     = "Geass"
+  NICK     = "SFW"
   CHANNELS = [ "#subtle" ]
 end
 
@@ -274,6 +274,9 @@
       # Exclude CIA service bots
       return if m.user.nick.start_with?("CIA")
 
+      # STFU!
+      return if m.message.match(/stfu$/)
+
       # Fetch title
       page   = @agent.get("http://subforge.org/issues/%s" % [ id ])
       title  = page.title.gsub(/[\x00-\x1f]*/, "").gsub(/[ ]{2,}/, " ").strip
@@ -391,6 +394,9 @@
         @agent.max_history      = 0
       end
 
+      # STFU!
+      return if m.message.match(/stfu$/)
+
       URI.extract(m.message, ["http", "https"]) do |link|
         # Fetch data
         uri  = URI.parse(link)