eriq-augustine / clefable Goto Github PK
View Code? Open in Web Editor NEWIRC Chatbot
IRC Chatbot
Options should be a lot easier to add.
Maybe automatic verification.
Perhaps making a child of command can take care of some of this.
(Now that I think about it, this is probably the best option).
Use along side the special map.
The map must be kept for other users that probably won't REGISTER.
Right now it is in server.rb, which cannot be reloaded.
Move it somewhere so it can be reloaded.
Do it.
Special behavior based of channels.
Must at least support something like silent or quiet mode.
A command to reload command core and all util/commands.
Probably not the server, but maybe clefable.rb
We need some logging mechanisms.
I started some skeletons during other bugs, but nothing real.
There are some commands with non-standard options (like send-message).
Show the entire glossary.
Will probably need email.
Either an ability to keep a set of favorite notes, or make them as favorites for east searching.
Would probably put implicit or personal tags on notes.
Tune it to perfect.
Make is so you can get the last commit by a certain author or email.
It's not so bad, but it should be looked over.
When a replay command is supplied an email, there is no need to escape the names with ^.
In the email,
[2012-06-28 15:23:20 -0700] ^eriq: whoa whoa
Should be
[2012-06-28 15:23:20 -0700] eriq: whoa whoa
Also wondering if it would be better to not include the -0700 at every line - maybe just a general note at the top:
"All times are recorded in -0700 (PST)"
It kind of sucks that every command child has to use @@instance.
Find a way to move this into the Command class.
When there's text overflow and Clef splits up the message into multiple parts, parts 3+ are incorrectly done (they include duplicate text). It's always been the 3rd and up for me; never seen it on the second one or not on the third.
Example (not a terrible joke, either):
<Clefable_BOT> Joke #2427: A man has spent many days crossing the desert without water. His camel has died of thirst. He's crawling through the sands, certain that he has breathed his last, when all of a sudden he sees a shiny object sticking out of the sand several yards ahead of him. He crawls to the object, pulls it out of the sand, and discovers what looks to be an ash tray from an old car. He opens it and o
<Clefable_BOT> ut pops a genie.... But this is no ordinary genie. He is wearing a polka dot bow tie and a plaid sport coat. There's a dog-eared little book in the breast pocket with a blue cover. He has a pencil tucked behind one ear. "Well, kid," says the genie. "You know how it works. You have three wishes." "I'm not falling for this." says the man. "I'm not going to trust a used car salesman!" "What do you have to lose? You've got no trans
<Clefable_BOT> ve to lose? You've got no transportation, and it looks like you're a goner anyway! " The man thinks about this for a minute, and decides that the genie is right. "OK, I wish I were in a lush oasis with plentiful food and drink." _POOF_ The man finds himself in the most beautiful oasis he has ever seen. And he is surrounded with jugs of wine and platters of delicacies. "OK, kid, what's your second wish." "My second wish is t
<Clefable_BOT> ond wish." "My second wish is that I were rich beyond my wildest dreams." _POOF_ The Arab finds himself surrounded by treasure chests filled with rare gold coins and precious gems. "OK, kid, you have just one more wish. Better make it a good one!" After thinking for a few minutes, the Arab says: "I wish that no matter where I go a beautiful woman will want and need me." _POOF_ He's turned into a tampon. The moral of the
<Clefable_BOT> into a tampon. The moral of the story? If a used car salesman offers you anything at no cost, there's going to be a string attached s omewhere!
Choose which channel to replay from.
Maybe have a constant for PMs.
Or maybe a different command.
ClefableThread and OutputServer are both similar queuing thread proxies.
They should be merged into a base class.
Track people debts
Clefable will perform a random pokemon attack on a person!
USAGE: METRONOME
Result:
Clefable_BOT DoubleSlaps
Add/Remove an entry in the custom email map.
Suggested command structure:
replay -m
replay -t [time2, default to current time]
if you wanted to be fancy,
replay -t -m minutes
A supported
-c channel
would also be cool
Three Threads:
Besides some possible dependency issues, I don't see a good reason to keep the Thread code in server.rb
In fact, server.rb may be able to be entirely split up.
If there is a dependency issue, it may be able to be solved with a forward declaration.
In `last-message (and probably elsewhere), I believe
"7 days, 18 hours, 16 minutes" would be preferable to "186 hours, 16 minutes"
Expand last-message to be able to chose between the local (channel) last message, and the global one.
There is an infinite sleep in init.rb (end of the main thread).
It would be better if we could go without this.
Perhaps we can have main stop itself.
Or maybe we could have each other thread own a reference to the main thread?
There are some errors/warnings when running in debug mode (-d), clean those up.
Right now there is a rescue in every thread's context.
There might be a better way for error reporting.
Also, make sure that these rescues properly handle thread errors.
Kill the current command (output) queue.
This is important for when some jokers queues up a bunch of long commands that are killer on flood control.
Allow level 1 and up admins to get a login on clef's machine.
Give them access to pretty much just the working source. Then they can do useful things like restart clef.
There is a sleep at the bottom of every thread proxy's init().
This is so that the return doesn't happen before the thread is ready.
This is a bit messy, explore alternatives.
Grep through the history and return results.
Local or global.
Take ruby regexes (or sql)
Be careful of injection.
Maybe provide a JSON query structure like:
{ query: '/foo/', start: 12341243, end: 12342000, user: 'eriq'}
Store, at minimum, some smaller, functionally-required data on the cloud somewhere. Primarily user accounts, so that even if the HDD dies, users can still be AUTH'd for full functionality of commands, even if the bulk of the data storage is missing.
Search (with regex?) the glossary for terms.
Be able to specify when to send a message. Either:
--IN 5 (minutes)
--AT 1730
Have clef do a pull and reload all components (except probably init and server).
Particularly useful for verbs; allow us to specify different tenses. For instance, we should be able to have:
review, reviewed, reviewing
all link to:
The process by which one gets reamed in style, memory safety, and personal preferences.
Obviously, the best we could do is support a separated series of words (comma separated?) e.g.
clef: what -a review, reviewed, reviewing !
Get clef's current health.
Include things like cpu, mem, ping.
Maybe also include status updates like: "On bare server, these commands will fail: ...".
join/part implies activity.
The purpose of last-message is to track activity.
Not `kill. Like a sigint.
I don't even know if the signal is properly sent to the threads (from a systems standpoint, they should be).
Make sure sigints get to the threads, and the threads shut down properly.
bug
feature (alias `suggest)
View / add features
Probably not query.
Note 19 has an empty tag, look into this.
The threading work (ClefableThread) trashed the ability for clefable.rb to be dynamically reloaded.
Fix that.
Clef should give achievements to worthy IRCers.
Example:
DOUBLE TROUBLE: two commits with nothing in between!
Disambiguate shorthand commands.
Ex: `h
There are no other commands that start with 'h', this can be unambiguously expanded to `help.
There is an official one that clef needs to sync up with.
Doesn't have to be automatic, but all those entries need to get in clef.
A resource file would be nice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.