kittybot 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/kittybot +1 -1
- data/plugins/chatty.rb +54 -0
- metadata +5 -4
data/kittybot
CHANGED
data/plugins/chatty.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'cinch'
|
2
|
+
|
3
|
+
class Chatty
|
4
|
+
include Cinch::Plugin
|
5
|
+
|
6
|
+
listen_to :message
|
7
|
+
|
8
|
+
def listen m
|
9
|
+
if m.message =~ /!kick KittyBot/i
|
10
|
+
m.reply 'NNOOOOOOOO'
|
11
|
+
|
12
|
+
elsif m.message =~ /kittybot:\s*shut up.*/i
|
13
|
+
m.reply "#{m.user.nick}: No"
|
14
|
+
m.reply "#{m.user.nick}: Cats are AWESOME xD"
|
15
|
+
|
16
|
+
elsif m.message =~ /rabbitbot:\s*shut up.*/i
|
17
|
+
m.reply "#{m.user.nick}: Stick it to the Man!"
|
18
|
+
|
19
|
+
elsif m.message =~ /(kittybot.+rabbitbot)|(rabbitbot.+kittybot)/i
|
20
|
+
m.reply "#{m.user.nick}: How dare you mention me in the same sentence as rabbitbot?"
|
21
|
+
|
22
|
+
elsif m.message =~ /(\w+):\s*.*(\^{1,3}|ping)/i
|
23
|
+
m.reply "#{$1}: Isn't it nice to know that someone needs you? :P"
|
24
|
+
|
25
|
+
elsif m.message =~ /(octocat|cat|cats|kitty|kitten|kittens)/i
|
26
|
+
if m.message =~ /(horrid|stupid|nasty|dumb|boring|crazy|suck|bad|stink|windows)/i
|
27
|
+
if m.message =~ /(not|isn't|doesn't|boycotts|boycott)/i
|
28
|
+
# <cat> is not <bad thing>
|
29
|
+
m.reply "#{m.user.nick}: <3"
|
30
|
+
else
|
31
|
+
# <cat> is <bad thing>
|
32
|
+
m.reply "#{m.user.nick}: YOU LIE"
|
33
|
+
end
|
34
|
+
else
|
35
|
+
if m.message =~ /(nice|awsome|rocks|rock|cool|smart|elegant|loyal|fluffy|graceful|amazing|awsomesauce|epic|grand|wonderfull)/i
|
36
|
+
if m.message =~ /not|don't|isn't|/i
|
37
|
+
# <cat> is not <good thing>
|
38
|
+
m.reply "#{m.user.nick}: Pfft!"
|
39
|
+
else
|
40
|
+
# <cat> is <good thing>
|
41
|
+
if rand(3) == 0
|
42
|
+
m.reply "#{m.user.nick}: <3"
|
43
|
+
else
|
44
|
+
m.reply "#{m.user.nick}: Thanks!"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
else
|
48
|
+
# Simply mentions <cat>, doesn't say good or bad things
|
49
|
+
m.reply "Cats are AWSOME xD" unless rand(3) == 0
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kittybot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: .
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cinch
|
16
|
-
requirement: &
|
16
|
+
requirement: &10095800 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *10095800
|
25
25
|
description: SOO ANOYING!
|
26
26
|
email: dboyreed@charter.net
|
27
27
|
executables:
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- plugins.rb
|
34
34
|
- plugins/logger.rb
|
35
35
|
- plugins/echo.rb
|
36
|
+
- plugins/chatty.rb
|
36
37
|
- ./kittybot
|
37
38
|
homepage: ''
|
38
39
|
licenses: []
|