Add .quote to Mod_Fun
parent
6a615cae69
commit
c6cdbe1c64
|
@ -34,7 +34,9 @@ module Vrobot4::Server
|
|||
"ded",
|
||||
"proceeding to die",
|
||||
"bye",
|
||||
"dedededed"].sample
|
||||
"dedededed",
|
||||
"Thanks, bye!",
|
||||
"GOTTAGOBYE"].sample
|
||||
exit
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
require 'open-uri'
|
||||
require 'json'
|
||||
|
||||
class Mod_Fun < Vrobot4::Module::Module
|
||||
Vrobot4::Module.add_module_type self, "Fun"
|
||||
|
||||
Qdb = "http://greyserv.net/qdb"
|
||||
|
||||
def initialize
|
||||
super
|
||||
register :c_carmack, "carmack", "mmmmmmmmmm"
|
||||
|
@ -10,6 +15,7 @@ class Mod_Fun < Vrobot4::Module::Module
|
|||
register :c_box, "box", "S H I T P O S T I N G"
|
||||
register :c_zdoom, "zdoom", "ZDoom™"
|
||||
register :c_marble, "marble", "mararuaruaruaruarb"
|
||||
register :c_quote, "quote", "Queries the Doominati Quote Database."
|
||||
register :c_what, "what", "What the fuck did you just fucking say about"
|
||||
end
|
||||
|
||||
|
@ -27,7 +33,7 @@ class Mod_Fun < Vrobot4::Module::Module
|
|||
end
|
||||
end
|
||||
text << str.reverse
|
||||
m.reply_spaced text
|
||||
m.reply_b text
|
||||
end
|
||||
|
||||
def c_zdoom m, argv
|
||||
|
@ -50,6 +56,17 @@ class Mod_Fun < Vrobot4::Module::Module
|
|||
m.reply text
|
||||
end
|
||||
|
||||
def c_quote m, argv
|
||||
check_args argv, "", "N"
|
||||
if argv.length == 0
|
||||
res = open(Qdb + "/interface.cgi").read
|
||||
max = JSON.parse(res)["numQuotes"] - 1
|
||||
m.reply_b open(Qdb + "/q/" + (rand(max) + 1).to_s).read
|
||||
else
|
||||
m.reply_b open(Qdb + "/q/" + argv[0].to_i.to_s).read
|
||||
end
|
||||
end
|
||||
|
||||
def c_what m, argv
|
||||
m.reply "What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little \"clever\" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo."
|
||||
end
|
||||
|
|
|
@ -18,21 +18,21 @@ module Vrobot4::Server
|
|||
chan: nil,
|
||||
serv: nil,
|
||||
reply: nil,
|
||||
reply_spaced: nil)
|
||||
reply_b: nil)
|
||||
@msg = msg
|
||||
@user = user
|
||||
@chan = chan
|
||||
@serv = serv
|
||||
@reply = reply
|
||||
@reply_spaced = reply_spaced
|
||||
@reply_b = reply_b
|
||||
end
|
||||
|
||||
def reply *args
|
||||
@reply.call args.join(" ")
|
||||
end
|
||||
|
||||
def reply_spaced *args
|
||||
@reply_spaced.call args.join(" ")
|
||||
def reply_b *args
|
||||
@reply_b.call args.join(" ")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ class Sv_Discord < Vrobot4::Server::Server
|
|||
user: User.new(evt.user, @admins),
|
||||
chan: Channel.new(evt.channel),
|
||||
serv: self,
|
||||
reply: -> (text) {evt.respond text},
|
||||
reply_spaced: -> (text) {evt.respond "```\n" + text + "```"}
|
||||
reply: -> (text) {evt.respond text},
|
||||
reply_b: -> (text) {evt.respond "```\n" + text + "```"}
|
||||
|
||||
if m.msg.start_with? '.'
|
||||
argv = m.msg.split
|
||||
|
|
Loading…
Reference in New Issue