Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates for latest isaac, 0.2.6. Put ops? in a helper. Add 'status' t…

…est command. Verbose logging
  • Loading branch information...
commit 7a66bc840064f6c9582116bf4ce21d4236bbe6c9 1 parent 0f34e8a
@jamiew authored
Showing with 16 additions and 3 deletions.
  1. +16 −3 fatbot.rb
View
19 fatbot.rb
@@ -22,15 +22,24 @@
$twitter ||= TwitterSearch::Client.new
configure do |c|
- c.nick = "dubtron"
+ c.nick = "dubtr0n"
c.realname = "jamiew's bot"
c.server = "irc.freenode.net"
c.port = 6667
+ c.verbose = true
+ c.version = "FATBOT <http://github.com/jamiew/fatbot>"
end
# NickServ-based security: simple check for FAT Lab fellows
-def ops?(nick)
- ['jamiew','ttttbx','fi5e','randofo','bekathwia','MissSubmarine','gleuch','agoasi','monki','bennett4senate'].include?(nick)
+helpers do
+ def ops?(nick)
+ ['jamiew','ttttbx','fi5e','randofo','bekathwia','MissSubmarine','gleuch','agoasi','monki','bennett4senate'].include?(nick)
+ end
+
+ def check
+ msg channel, "dubtron is enabled for this channel, #{channel}"
+ end
+
end
@@ -44,6 +53,10 @@ def ops?(nick)
msg channel, "#{match[0]}"
end
+on :channel, /status/ do
+ check
+end
+
# print a randomly generated meme phrase using Automeme API by @inky
on :channel, /^\!meme/i do
meme = open("http://meme.boxofjunk.ws/moar.txt?lines=1").read.chomp rescue 'ERROR: could not reach AutoMeme :-('
Please sign in to comment.
Something went wrong with that request. Please try again.