3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-13 23:49:31 +01:00
Commit Graph

207 Commits

Author SHA1 Message Date
Pragmatic Software
9c3097b8f9 Remove unused legacy list messages functionality 2017-08-30 22:23:35 -07:00
Pragmatic Software
08b28cf6c2 No longer discard "0" valued arguments from find_factoid_with_optional_args 2017-08-30 17:51:42 -07:00
Pragmatic Software
bbb52f99e9 Do not move factlog between channels any longer 2017-08-30 16:07:33 -07:00
Pragmatic Software
8dc7d6554c Correct minor typo 2017-08-30 06:55:57 -07:00
Pragmatic Software
3b93d6c281 Escape single-quotes before using GetOptionsFromString and shellwords 2017-08-30 02:12:05 -07:00
Pragmatic Software
9fbafec4fd factundo/factredo now show modifications 2017-08-28 23:14:32 -07:00
Pragmatic Software
80bceb2c75 Make fact log of factset more concise 2017-08-27 19:02:48 -07:00
Pragmatic Software
ca827a1499 Show factlog output sorted from newest to oldest 2017-08-27 19:00:31 -07:00
Pragmatic Software
90cdc8db7a Correct handling of optional channel argument 2017-08-27 18:52:14 -07:00
Pragmatic Software
73bc7cebe4 Update factset usage to reflect optional channel 2017-08-27 02:44:35 -07:00
Pragmatic Software
cb37eb1ce7 Make channel intelligently optional for more fact* commands 2017-08-27 00:56:55 -07:00
Pragmatic Software
e9971cf29d Factlog revision for factredo now consistent 2017-08-26 21:40:27 -07:00
Pragmatic Software
03b2b8d7b9 Remove left over debug messages 2017-08-26 21:37:31 -07:00
Pragmatic Software
a723bc3f65 Completely botched undo/redo for global factoids -- fixed now 2017-08-26 21:35:46 -07:00
Pragmatic Software
57af14413e Add ability to undo/redo factoid revisions 2017-08-26 07:03:01 -07:00
Pragmatic Software
556821805f Do not allow empty or too long factoids with factchange 2017-08-24 15:18:41 -07:00
Pragmatic Software
872d31528a Add code-factoids! 2017-08-23 19:25:43 -07:00
Pragmatic Software
6f9d9aba07 Improve factmove detection of channel 2017-08-23 19:18:14 -07:00
Pragmatic Software
97aae4bddc Prepend channel name to factshow output if belongs to different channel 2017-08-12 01:28:55 -07:00
Pragmatic Software
485ccf689c Fix factadd and factchange optional channel parameter behavior 2017-08-08 21:18:00 -07:00
Pragmatic Software
74fe574332 Make channel argument optional for factadd, factrem and factchange (other fact commands eventually...) 2017-08-01 21:33:57 -07:00
Tomasz Kramkowski
b5d8f72254 License project under MPL2
This patch adds the file LICENSE which is the verbatim copy of the
Mozilla Public License Version 2.0 as retreived from
https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt on
2017-03-05.

This patch also places license headers for the MPL2 type A variant of
the license header in the following files:

PBot/AntiFlood.pm
PBot/BanTracker.pm
PBot/BlackList.pm
PBot/BotAdminCommands.pm
PBot/BotAdmins.pm
PBot/ChanOpCommands.pm
PBot/ChanOps.pm
PBot/Channels.pm
PBot/Commands.pm
PBot/DualIndexHashObject.pm
PBot/EventDispatcher.pm
PBot/FactoidCommands.pm
PBot/FactoidModuleLauncher.pm
PBot/Factoids.pm
PBot/HashObject.pm
PBot/IRCHandlers.pm
PBot/IgnoreList.pm
PBot/IgnoreListCommands.pm
PBot/Interpreter.pm
PBot/LagChecker.pm
PBot/Logger.pm
PBot/MessageHistory.pm
PBot/MessageHistory_SQLite.pm
PBot/NickList.pm
PBot/PBot.pm
PBot/Plugins.pm
PBot/Plugins/AntiAway.pm
PBot/Plugins/AntiKickAutoRejoin.pm
PBot/Plugins/AntiRepeat.pm
PBot/Plugins/AntiTwitter.pm
PBot/Plugins/AutoRejoin.pm
PBot/Plugins/Counter.pm
PBot/Plugins/Quotegrabs.pm
PBot/Plugins/Quotegrabs/Quotegrabs_Hashtable.pm
PBot/Plugins/Quotegrabs/Quotegrabs_SQLite.pm
PBot/Plugins/UrlTitles.pm
PBot/Plugins/_Example.pm
PBot/Refresher.pm
PBot/Registerable.pm
PBot/Registry.pm
PBot/RegistryCommands.pm
PBot/SQLiteLogger.pm
PBot/SQLiteLoggerLayer.pm
PBot/SelectHandler.pm
PBot/StdinReader.pm
PBot/Timer.pm
PBot/Utils/ParseDate.pm
PBot/VERSION.pm
build/update-version.pl
modules/acronym.pl
modules/ago.pl
modules/c11std.pl
modules/c2english.pl
modules/c2english/CGrammar.pm
modules/c2english/c2eng.pl
modules/c99std.pl
modules/cdecl.pl
modules/cfaq.pl
modules/cjeopardy/IRCColors.pm
modules/cjeopardy/QStatskeeper.pm
modules/cjeopardy/Scorekeeper.pm
modules/cjeopardy/cjeopardy.pl
modules/cjeopardy/cjeopardy_answer.pl
modules/cjeopardy/cjeopardy_filter.pl
modules/cjeopardy/cjeopardy_hint.pl
modules/cjeopardy/cjeopardy_qstats.pl
modules/cjeopardy/cjeopardy_scores.pl
modules/cjeopardy/cjeopardy_show.pl
modules/codepad.pl
modules/compiler_block.pl
modules/compiler_client.pl
modules/compiler_vm/Diff.pm
modules/compiler_vm/cc
modules/compiler_vm/compiler_client.pl
modules/compiler_vm/compiler_server.pl
modules/compiler_vm/compiler_server_vbox_win32.pl
modules/compiler_vm/compiler_server_watchdog.pl
modules/compiler_vm/compiler_vm_client.pl
modules/compiler_vm/compiler_vm_server.pl
modules/compiler_vm/compiler_watchdog.pl
modules/compiler_vm/languages/_c_base.pm
modules/compiler_vm/languages/_default.pm
modules/compiler_vm/languages/bash.pm
modules/compiler_vm/languages/bc.pm
modules/compiler_vm/languages/bf.pm
modules/compiler_vm/languages/c11.pm
modules/compiler_vm/languages/c89.pm
modules/compiler_vm/languages/c99.pm
modules/compiler_vm/languages/clang.pm
modules/compiler_vm/languages/clang11.pm
modules/compiler_vm/languages/clang89.pm
modules/compiler_vm/languages/clang99.pm
modules/compiler_vm/languages/clangpp.pm
modules/compiler_vm/languages/clisp.pm
modules/compiler_vm/languages/cpp.pm
modules/compiler_vm/languages/freebasic.pm
modules/compiler_vm/languages/go.pm
modules/compiler_vm/languages/haskell.pm
modules/compiler_vm/languages/java.pm
modules/compiler_vm/languages/javascript.pm
modules/compiler_vm/languages/ksh.pm
modules/compiler_vm/languages/lua.pm
modules/compiler_vm/languages/perl.pm
modules/compiler_vm/languages/python.pm
modules/compiler_vm/languages/python3.pm
modules/compiler_vm/languages/qbasic.pm
modules/compiler_vm/languages/scheme.pm
modules/compiler_vm/languages/server/_c_base.pm
modules/compiler_vm/languages/server/_default.pm
modules/compiler_vm/languages/server/c11.pm
modules/compiler_vm/languages/server/c89.pm
modules/compiler_vm/languages/server/c99.pm
modules/compiler_vm/languages/server/clang.pm
modules/compiler_vm/languages/server/clang11.pm
modules/compiler_vm/languages/server/clang89.pm
modules/compiler_vm/languages/server/clang99.pm
modules/compiler_vm/languages/server/cpp.pm
modules/compiler_vm/languages/server/freebasic.pm
modules/compiler_vm/languages/server/haskell.pm
modules/compiler_vm/languages/server/java.pm
modules/compiler_vm/languages/server/qbasic.pm
modules/compiler_vm/languages/server/tendra.pm
modules/compiler_vm/languages/sh.pm
modules/compiler_vm/languages/tendra.pm
modules/compliment
modules/cstd.pl
modules/define.pl
modules/dice_roll.pl
modules/excuse.sh
modules/expand_macros.pl
modules/fnord.pl
modules/funnyish_quote.pl
modules/g.pl
modules/gdefine.pl
modules/gen_cfacts.pl
modules/gencstd.pl
modules/get_title.pl
modules/getcfact.pl
modules/google.pl
modules/gspy.pl
modules/gtop10.pl
modules/gtop15.pl
modules/headlines.pl
modules/horoscope
modules/horrorscope
modules/ideone.pl
modules/insult.pl
modules/love_quote.pl
modules/man.pl
modules/map.pl
modules/math.pl
modules/prototype.pl
modules/qalc.pl
modules/random_quote.pl
modules/seen.pl
modules/urban
modules/weather.pl
modules/wikipedia.pl
pbot.pl
pbot.sh

It is highly recommended that this list of files is reviewed to ensure
that all files are the copyright of the sole maintainer of the
repository. If any files with license headers contain the intellectual
property of anyone else, it is recommended that a request is made to
revise this patch or that the explicit permission of the co-author is
gained to allow for the license of the work to be changed.

I (Tomasz Kramkowski), the contributor, take no responsibility for any
legal action taken against the maintainer of this repository for
incorrectly claiming copyright to any work not owned by the maintainer
of this repository.
2017-03-06 00:31:15 +00:00
Pragmatic Software
85b8915494 Fixed some stuff 2017-01-29 18:01:26 -08:00
Pragmatic Software
df8e15b39e Fix factlog for deleted factoids not in global channel 2016-11-17 15:57:48 -08:00
Pragmatic Software
f3b3e90cdc Add factoid effective-level metadata and ability to kick from such factoids
Factoids can now have an effective-level metadata field. When set, certain
functionality requiring an effective-level will be enabled.

For now, that is currently only the /kick command, which has an effective-level
of 10.

Factoids with an effective-level set will also have the locked metadata
attribute set as well to prevent people from changing the factoid.  The
locked and/or effective-level attributes will be removable only by admins
whose level is equal to or greater than the effective-level.
2016-11-16 19:07:01 -08:00
Pragmatic Software
2e0a5e411c Make "is" optional in factadd 2016-01-16 16:55:18 -08:00
Pragmatic Software
c306ae4ce6 Minor text reformatting 2015-12-22 08:12:59 -08:00
Pragmatic Software
8b66bd82ec Improve factlog command
Now, by default, uses concise timestamp relative durations; e.g. "2d5h ago"
instead of "2 days and 5 hours ago".

Now, by default, shows only nick instead of full hostmask for each entry.

Now accepts optional arguments -t and -h to control the above behavior.

If -t is specified, then it shows a full timedate instead of a relative duration;
e.g., "Sun Dec 13 14:26:56 PST 2015" instead of "2d5h ago".

If -h is specified, then it shows the full hostmask for each entry instead of
just the nick.
2015-12-14 16:13:43 -08:00
Pragmatic Software
167d8c2143 Correct error handling for log_factoid() failure to open file 2015-12-14 14:30:44 -08:00
Pragmatic Software
3a25afdb01 Minor textual correct for factlog disambig text 2015-12-13 22:28:00 -08:00
Pragmatic Software
1540483639 Show factlog for currently deleted factoids if log file exists 2015-12-13 22:20:57 -08:00
Pragmatic Software
eb5d90ec48 Fix minor bug creating empty factoid in factset without key argument 2015-12-13 22:08:17 -08:00
Pragmatic Software
e6ac123fe1 Add factlog command to see factoid changelogs 2015-12-13 14:24:25 -08:00
Pragmatic Software
e6e7f325fb Add individual change-logs for factoid triggers 2015-12-13 13:58:01 -08:00
Pragmatic Software
a3df01bae3 Escape delim in factchange command to allow delimiters such as the pipe character 2015-09-30 09:50:37 -07:00
Pragmatic Software
04aaeb5475 Fix handling of no factoid found from find_factoid() 2015-09-19 00:27:15 -07:00
Pragmatic Software
97bbb298e4 Allow bot admins to factset factoids from /msg
Fix some channel/from discrepancies in factset, etc.
2015-09-03 20:43:16 -07:00
Pragmatic Software
3fa12c208e Improve handling of word-boundaries in searches 2015-08-16 05:20:57 -07:00
Pragmatic Software
35653cb996 Add word-boundaries around text searches 2015-08-05 12:28:15 -07:00
Pragmatic Software
cc9f4926ee Make channel argument optional for factrem as well 2015-07-23 17:46:01 -07:00
Pragmatic Software
ba87aef524 Improve factshow/factfind behavior
factshow's and factfind's channel argument is now optional.

The commands will now automatically determine the channel a factoid lives in
if it is the only factoid of that name.

If there are multiple factoids existing in different channels then the commands
will display a disambiguation message and require an explicit channel argument
to choose a specific channel's factoid.
2015-07-21 15:07:56 -07:00
Pragmatic Software
04f1672f19 Update some admin levels 2015-07-13 02:47:30 -07:00
Pragmatic Software
e3eb698f27 Properly show/hide star for logged in admins in list admins 2015-07-09 23:24:39 -07:00
Pragmatic Software
62b8432be9 Factoid commands now check for admins in factoid's channel instead of channel command was used in 2015-06-05 22:26:02 -07:00
Pragmatic Software
715ff8ee78 Find factoids in proper channel namespace 2015-04-26 16:05:03 -07:00
Pragmatic Software
59c29977e6 Improve handling of factoids
Fix adding factoid to local channel when a factoid of same name already exists for global channel
Fix calling factoid from another channel with `fact` command
Do not prepend nick argument to aliases (/call factoids)
2015-04-10 14:59:17 -07:00
Pragmatic Software
060d3aee6a Fix wrong channel for fact command
The `fact` command was using $channel instead of $from, which
caused the result to be sent to the channel the factoid lives
in instead of the channel the command was invoked in.
2015-04-03 10:08:57 -07:00
Pragmatic Software
cb9ead7624 Incorporate custom workdir field into URL for modules 2015-03-15 20:12:44 -07:00
Pragmatic Software
04f47ba3a1 Show "global" if namespace is ".*" 2015-02-15 20:17:36 -08:00
Pragmatic Software
b289fd155e Add repo_module to registry to customize source URL in factinfo command 2014-12-29 23:15:46 -08:00
Pragmatic Software
4dbec8001e Fix regex factoids in global namespace not being triggered 2014-10-14 02:30:14 +00:00
Pragmatic Software
65073e311d Add support for nooverride to prevent commands from being overridden in different namespaces 2014-07-11 12:56:17 +00:00
Pragmatic Software
33765c6d3a Add -editby to factfind, move some responses from /msg to public 2014-06-01 21:31:54 +00:00
Pragmatic Software
7b2fb432c0 Restrict factset add_nick to level 10 2014-05-31 01:04:26 +00:00
Pragmatic Software
a81ba775fc Restored load, unload, count and histogram commands.
Removed enable/disable commands; use factset instead.

Add default_rate_limit registry entry.

Add newlines to output of DualIndexHashable set() subroutine.
2014-05-24 12:01:59 +00:00
Pragmatic Software
02c0143634 Add factmove command to rename/move factoids between channels 2014-05-23 12:42:23 +00:00
Pragmatic Software
1cce945412 Remove unnecessary ${} around some objects from previous commit 2014-05-18 20:19:30 +00:00
Pragmatic Software
30e3c5ce35 Remove PBot getter/setters; move anti-flood registry defaults to AntiFlood.pm 2014-05-18 20:09:05 +00:00
Pragmatic Software
d955bfa06c Add centralized configuration registry module
Allows changing of bot configuration values without needing to restart
bot instance or needing to edit pbot.pl script.

Registry will initially be populated with default values from pbot.pl,
but if a registry file exists then the registry values will take
precedence over the pbot.pl values. For instance, if you regset the
bot trigger to '%' then the trigger will be '%' even if pbot.pl has '!'
or something else explicitly set.

Some registry items can have trigger hooks associated with them.  For
instance, the irc->botnick registry entry has a change_botnick_trigger
associated with it which changes the IRC nick on the server when a new
value is set via regset/regadd.

Tons of other fixes and improvements throughout.
2014-05-17 20:08:19 +00:00
Pragmatic Software
cebcafba70 Do not allow RE2 to fallback to PCRE 2014-04-29 17:00:51 +00:00
Pragmatic Software
595e6a34d2 Use DFA regex engine on user-supplied regexs to avoid potential denial-of-service attacks 2014-04-28 17:20:01 +00:00
Pragmatic Software
b642460d84 Don't allow spaces in factoid keywords 2014-04-19 10:37:03 +00:00
Pragmatic Software
765e907aa7 Remove single-quotes from found-one-factoid keyword/action 2014-03-07 00:57:08 +00:00
Pragmatic Software
d080a6ff89 factshow command now shows module action 2014-03-05 14:30:02 +00:00
Pragmatic Software
c1f87bf177 Don't show regex escapes in factfind output 2014-03-04 10:48:08 +00:00
Pragmatic Software
23d2e57527 Added ability to lock factoids to prevent editing; improved detection of ban-evasion by devalidating accounts on part/quit and devalidating existing accounts that match a banmask when a ban occurs 2013-09-13 21:48:19 +00:00
Pragmatic Software
edff4b6c4c Update ref_user to use full hostmask instead of just nick; add edited_by/edited_on to factoid metadata levels hash 2013-07-31 13:48:50 +00:00
Pragmatic Software
d2d5695dda Add edited_by/edited_on fields when changing factoids; Use full hostmasks instead of just nick for owner/edited_by fields when adding/editing factoids 2013-07-31 13:29:37 +00:00
Pragmatic Software
dc52430044 Add SSL support, and other misc updates 2013-02-25 02:27:24 +00:00
Pragmatic Software
39a38b58f8 Triggering non-existent factoids now attempts to factfind (for keywords and text) before trying a levenshtein closest match (of keywords) 2012-11-04 20:42:38 +00:00
Pragmatic Software
c4ed12b0cb anti-flood, IRC, etc: added support for tracking NickServ accounts; refactored flood message history to be keyed on hostmask instead of nick; placed message history channels into its own sub-key 2011-02-11 02:46:35 +00:00
Pragmatic Software
8d524089db anti-flood: added last offense timestamp; decrease offense counter once every 24 hours without offense 2011-01-27 06:17:39 +00:00
Pragmatic Software
31ae068202 factoid commands: removed unnecessary direct privmsg call 2011-01-27 01:51:16 +00:00
Pragmatic Software
1e74e36dd7 factoid commands: updated top20 to work with new factoid structure 2011-01-27 00:49:36 +00:00
Pragmatic Software
44b737a8c3 factoids: allow factset/factunset by regular users; factset/factunset now has list of metadata levels, and does ownership checking; added action_with_args metadata field to be substituted for action if factoid triggered with arguments 2011-01-25 22:40:22 +00:00
Pragmatic Software
7eea052b36 Updated BotAdmins to use DualIndexHashObject 2010-08-15 08:25:35 +00:00
Pragmatic Software
5b0aef5e31 Replaced ".*" with "the global channel" for factalias 2010-07-04 07:36:51 +00:00
Pragmatic Software
f53ebf7f88 factalias command adds to global if channel \!~ /^# 2010-07-04 07:26:43 +00:00
Pragmatic Software
c6e48954c5 Levenshtein distance increased from 50% to 60%; Levenshtein searches all channels on unfound factoid 2010-06-30 10:59:50 +00:00
Pragmatic Software
d7f2583aac Prettier export headers; factrem output for not owner now includes channel 2010-06-29 07:14:26 +00:00
Pragmatic Software
43089e4599 Cleaned up extra factoid groups; made export factoids a little prettier; renamed "default channel" to "global channel" throughout 2010-06-29 06:12:52 +00:00
Pragmatic Software
b869321eb4 Adding factoid in /msg now adds factoid to default channel; replaced "all channels" with "default channel" throughout factoid command output 2010-06-29 05:48:46 +00:00
Pragmatic Software
7aa724569e factfind now works; find aliases factfind for all channels 2010-06-29 04:33:27 +00:00
Pragmatic Software
6d3fc7f628 find_factoid now takes exact_trigger parameter; this fixes confusion with regex factoids 2010-06-27 02:52:06 +00:00
Pragmatic Software
e0a2fc25e8 factchange usage output appears in channge instead of /msg; aliased change to factchange 2010-06-23 02:18:26 +00:00
Pragmatic Software
48e1c8c455 add, info, show, remove, etc, renamed to factadd, factinfo, factshow, factrem, etc; fact* commands now all take a channel parameter 2010-06-23 02:15:13 +00:00
Pragmatic Software
c150e2018c Make usage output of some commands visible in channel instead of msg 2010-06-21 14:48:40 +00:00
Pragmatic Software
eabb249d79 !info and !show now require channel parameter 2010-06-21 14:41:39 +00:00
Pragmatic Software
65470a139b Added !fact command to allow calling factoids belonging to another channel 2010-06-21 13:54:27 +00:00
Pragmatic Software
562d265261 Adding factoid in a channel now creates that factoid in that channel instead of .*; info command now shows what channel factoid belongs to 2010-06-21 13:28:54 +00:00
Pragmatic Software
645310de15 factset command output appears in channel now (to show-off); added pragma as admin 2010-06-21 11:44:39 +00:00
Pragmatic Software
f9ab0c7e77 Added Time::Duration::ago() to !info command 2010-06-21 10:44:15 +00:00
Pragmatic Software
94076628a6 !foo is bar now works again for adding factoids; factoid commands in /msg are set to use channel .* 2010-06-21 03:19:41 +00:00
Pragmatic Software
4be7fe3b34 Refactored Factoids to use DualIndexHashObject; added factset/factunset to set factoid meta-data; factoids now per-channel; slightly unfinished 2010-06-20 06:16:48 +00:00
Pragmatic Software
49bbf5c73e Temporary hack to skip hostmask entry when iterating channels in message history, will fix soon 2010-06-06 07:22:23 +00:00
Pragmatic Software
9b3a8f1284 Show offenses and join_watch count in list messages 2010-06-06 00:34:27 +00:00
Pragmatic Software
c699ae26a8 Require "is" as separator to allow add factoids with spaces in trigger 2010-05-13 19:45:52 +00:00
Pragmatic Software
8ebe546850 New factoid loading/saving -- much more flexible! 2010-05-08 23:36:56 +00:00
Pragmatic Software
1330bfcff5 Allow <foo> is <bar> to pass through to other interpeters if factoid already exists 2010-04-18 07:34:01 +00:00
Pragmatic Software
cffe7f6c4e Improved display of timestamp in !info command 2010-04-05 13:30:33 +00:00
Pragmatic Software
cd73f1104e Admins management improved. Admins now save and load, and can be added and removed. 2010-03-29 12:30:35 +00:00
Pragmatic Software
a5618c41a1 Added dict.org module and !dict command, allowed dashes in module launcher arguments 2010-03-28 11:19:54 +00:00
Pragmatic Software
21e4415289 Improved find command by adding optional -owner and -by search parameters 2010-03-26 08:58:25 +00:00
Pragmatic Software
a743261059 See Changes file 2010-03-26 05:14:03 +00:00
Pragmatic Software
d299a8fb0f 90% done in object-oriented conversion -- IgnoreList doesnt save/load/use regex yet. 2010-03-24 06:47:40 +00:00
Pragmatic Software
313da0b587 Progressing on converting things to objects 2010-03-23 03:09:03 +00:00
Pragmatic Software
bd46c11120 Half-way through converting everything to objects. Committing mostly working copy as preview. 2010-03-22 07:33:44 +00:00