Commit Graph

32 Commits

Author SHA1 Message Date
topkecleon
85c9785099 administration.lua: Generic action is optimized.
drua-tg.lua: Now packed with otouto because why keep it in a
 separate repo?
2016-05-22 16:08:45 -04:00
topkecleon
68c1ae226c administration.lua: kicking via tg is much faster than kicking via API
control.lua: added /script command
2016-05-20 20:47:13 -04:00
topkecleon
64621a640e I guess there were more changes last commit.
utilities change should make them work.
2016-05-20 03:38:43 -04:00
topkecleon
523eb8eecd updated readme
better user caching
improved me.lua
2016-05-15 08:22:31 -04:00
topkecleon
7df8992abe patterns.lua - Bugfix; was gsub-ing twice. 2016-05-13 13:22:10 -04:00
topkecleon
24892a9537 xkcd.lua: Removed needless require.
administration.lua: Easier for users to get command list.
nick.lua: Swap newlines for spaces.
lastfm.lua: Someone was tired writing this.
utilities.lua: Remove needless console output.
2016-05-10 15:49:05 -04:00
Brayden Banks
f536395c91 Merge branch 'master' into less-magic 2016-04-25 22:40:31 -07:00
topkecleon
73f4863bc3 Small improvements to administration.lua. 2016-04-20 16:43:08 -04:00
Brayden Banks
56abfab0b4 Through the Testing-Glass, & What Drew Found There 2016-04-15 22:55:06 -07:00
Brayden Banks
1dc61d2c44 Final fixes. 2016-04-15 06:57:42 -07:00
Brayden Banks
80930f389c Merge branch 'master' into less-magic 2016-04-12 06:47:30 -07:00
topkecleon
38b4b68ba2 hearthstone.lua: Temporary fix. API does not play well with lua-sec, so using curl for now.
bindings.lua: Added support for kickChatMember and unbanChatMember methods.

utilties.lua: enrich_message() will rename the new_chat_member and left_chat_member values to the names
expected by plugins: new_chat_participant and left_chat_participant.

bot.lua: Removed migration code. Rewrite soon.

eightball.lua: Bugfix.
2016-04-12 05:24:56 -04:00
Brayden Banks
24deaec759 *Should* have a working local refactor now. 2016-04-10 21:04:47 -07:00
Brayden Banks
acb679f8fa I should probably commit now. Less global magic! 2016-04-08 14:12:02 -07:00
topkecleon
c74d1913a4 New method to escape markdown.
Improvements to patterns.lua.
2016-04-02 19:20:28 -04:00
topkecleon
0f453b7bdc administration.lua:
1.7 update.
  /alist for governors+ to get list of admins.
  /glist for owner to get list of groups.
  Single-governor groups. Auto-migration through 1.8.
whoami.lua:
  Fixed markdown support.
utilities.lua:
  Added build_name() to concatenate first and last names easily.
2016-04-01 13:29:00 -04:00
topkecleon
b643154df8 administration.lua: Added antiflood flag.
bible.lua: Some better error handling.
hearthstone.lua: Corrected help message.
utilities.lua: Added string:index() to succeed get_word().
2016-03-31 07:53:12 -04:00
topkecleon
b5ea8f3bbe bunch of stuff
administration.lua: everything's better; automatic migration.
database.usernames -> database.users. View with /me.
Nicks and lastfm usernames moved to database.users; auto migrate.
2016-03-22 06:16:26 -04:00
topkecleon
ddaf304460 administration.lua:
Version 1.2.
  Rules are now in a table. Automatic migration until 1.4.
  New command: changerule
    /changerule <i> <rule>
    Change a rule. Use "/changerule 1 --" to delete rule 1.
  ahelp:
    Only displays commands the user can use.
    Attempts to PM before group.
  desc:
    Now displays group's flags and their "short" descs.
    Attemps to PM before group.
  antisquig:
    Second RTL character added to, and Strict.
dilbert.lua:
  New command: dilbert
    /dilbert [YYYY-MM-DD]
    Returns a date's or the latest Dilbert strip.
    Caches strips so they are not downloaded more than once.
gImages.lua & youtube.lua:
  Title now displayed for links.
  The "zero-width non-joiner" was a stupid idea.
help.lua:
  Commands now properly bulleted.
utilities.lua:
  download_file():
    Now allows for specification of a path instead of /tmp/.
2016-02-25 04:42:13 -05:00
topkecleon
02a7d411fa Database is now centralized. All data is stored in tables within the database table,
which is automatically saved. Please be sure to always stop the bot with /halt to
prevent data loss.
2016-02-21 14:28:40 -05:00
topkecleon
03ce363c98 Switched from dkjson to cjson. lua-cjson is now a dependency.
administration.lua now saves its database every minute. This will be changed in a
future update.
2016-02-21 00:21:48 -05:00
topkecleon
180cd6078a Added administration.lua.
Adds self-hosted, single-realm administrative functions to otouto.
Check out the README for a detailed description.

Also added msg.from.name, which is msg.from.first_name + msg.from.last_name (if it
exists), because I'm too lazy to build it each time.
Fixed a crash-causing bug (ironically) in the handle_exception() function.
2016-02-20 05:07:20 -05:00
topkecleon
b1b4a0be6c Nothing important.
Old local changes I never committed.
2016-02-14 03:47:02 -05:00
topkecleon
c94c8e3b4d minor improvements 2016-01-14 22:39:24 -05:00
topkecleon
fe549add63 Better logging, new preview.lua plugin.
When an exception is caught, info will be printed to the config.log_chat or the console.
/preview will give an "unlinked" preview for the link.
youtube.lua now uses config.google_api_key.
youtube.lua now uses unlinked previews.
lastfm.lua gives more informative error messages.
New utility: handle_exception().
2016-01-13 13:00:17 -05:00
topkecleon
c50b1ca3fa Username cachine and various fixes.
Usernames seen by the bot are now cached in the $usernames table. To get the ID associated with a
username, use the resolve_username() function from utilities.lua.
The table_size() function in utilities.lua will tell you the number of items in a key/pair table.
about.lua no longer displays a link preview in the about message.
currency.lua now accepts decimal arguments for the amount.
luarun.lua now correctly displays "false" return values.
moderation.lua will no longer send "I do not administrate this group".
2016-01-12 05:22:28 -05:00
topkecleon
26c1299374 Rewrote help.lua and added markup support to several plugins.
help.lua has been rewritten to support "/help command".
New variable "command" has been added to plugins for the syntax (w/out slash) to be displayed in main
help message. "doc" will be displayed upon "/help command".

Output of >12 plugins has been reformated to utilize markup.
There is a fairly standard style throughout plugins.

get_word() in utilities.lua now has defaults for nil arguments.
2016-01-08 08:44:37 -05:00
topkecleon
c827004bc7 fixed default config
rewrote get_word()
2015-12-13 16:31:22 -05:00
topkecleon
cacfea1fa5 otouto v3 is out!
Everything reworked and rewritten.
Antisquig is now a plugin to work with moderation.lua.
The bot can now upload photos, stickers, and other files.
Return values in plugin functions to affect the bot's behavior.
All this and more!
2015-11-24 21:22:04 -05:00
topkecleon
60570e90f3 added cron jobs for plugins
added example plugin with documentation
added liberbot-compliant flood control
	see Liberbot Support for details on getting compliant
added Kickass Torrent plugin
various bugfixes
all files seem to have been marked changed due to a shift in platform
	I will do a clean clone and testing to ensure there is no issue.
2015-08-28 23:15:01 -07:00
topkecleon
3a3a45d44e added Liberbot moderation capability
see comment in moderation.lua for info

added capability to create a json "database"
2015-07-28 18:13:46 -04:00
dupie
236c8bebdb initial commie bastard 2015-07-02 18:15:52 -04:00