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

2233 Commits

Author SHA1 Message Date
Pragmatic Software
e07df35cbf Move command modules out of PBot.pm and into their respective modules
E.g., FactoidCommands.pm is now loaded inside Factoids.pm, etc.

Misc reformatting/refactoring of PBot.pm
2014-05-18 00:27:57 +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
d8d26b1cea Add registerable atexit functionality and trap SIGINT 2014-05-16 22:11:31 +00:00
Pragmatic Software
b1cb9fa200 Reduce nick-flood limit to 3 within 30 minutes instead of within 1 hour 2014-05-16 22:10:55 +00:00
Pragmatic Software
2e2188532c Correct logic for Guest nick-change allowance 2014-05-16 05:58:21 +00:00
Pragmatic Software
a7681c36cb Don't enforce nick anti-flood for services-mandated changes to Guest nick 2014-05-16 05:53:39 +00:00
Pragmatic Software
591dbd70ab Set generic default export websites in pbot.pl 2014-05-16 04:11:25 +00:00
Pragmatic Software
cd54dcb573 Track and handle nick-change events; add anti-nick-flood detection 2014-05-16 00:48:46 +00:00
Pragmatic Software
1f242aeec4 Detect and handle KICK events 2014-05-15 15:49:56 +00:00
Pragmatic Software
f8fc04f6e5 Distinct JOIN and DEPARTURE events to improve join-flood detection, etc 2014-05-15 01:39:33 +00:00
Pragmatic Software
92b4ef00cf Improve recall command with better capabilities
The nick field is now optional and Getopt::Long is used to accept targeted
options for channel/history, allowing recalls by text/channel for any nick
which is useful when you know what text the message contained but not who
said it.
2014-05-14 21:23:59 +00:00
Pragmatic Software
dad69fb0c8 Use AutoInactiveDestroy attribute to fix SQLite I/O error due to DBH handle being destroyed when forked process exits 2014-05-13 20:14:38 +00:00
Pragmatic Software
ae6f3a6b3d Don't skip begin_work() if commit() fails 2014-05-13 15:18:33 +00:00
Pragmatic Software
11efde4d0d Comment out some verbose debugging log statements 2014-05-13 15:09:29 +00:00
Pragmatic Software
54ac8ec0ef Convert message history to use SQLite database instead of Perl hashtable
Added MessageHistory.pm and MessageHistory_SQLite.pm.  May eventually port
and add MessageHistory_Hashtable.pm as was done with Quotegrabs, but this is
not particularly high on the todo list.

Antiflood.pm has been updated to use the new MessageHistory API.

The `recall` command has been moved from Quotegrabs into MessageHistory.  It
also now has the ability to ignore messages containing the recall command
itself, for improved usability.

Likewise, the `grab` command will now ignore previous `grab` commands when
grabbing by regex in order to prevent accidentally grabbing previous grab
attempts.

The `join` and `part` commands have been improved to accept multiple channels,
and `part` will use the current channel if none is provided.
2014-05-13 10:15:52 +00:00
Pragmatic Software
ae1842e3db compiler_vm: Improve a couple of output sanitization regexs 2014-05-08 13:07:24 +00:00
Pragmatic Software
62d93c76c3 Remove left-over debugging print statements 2014-05-06 05:17:31 +00:00
Pragmatic Software
239e3de8ea Quotegrabs.pm now uses quotegrabs_db API for interfacing with storage backend
Two quotegrabs_db backends are now availble:

  * Quotegrabs_Hashtable.pm: the original hashtable implementation
  * Quotegrabs_SQLite.pm: the new SQLite implementation

Quotegrabs_SQLite.pm is now the default quotegrabs_db backend.

This was done to reduce the memory footprint of the bot by not needing to
keep the entire quotegrabs table in memory any longer.

A similiar change will be coming soon to the Factoids table as well as the
MessageHistory table.
2014-05-06 05:15:27 +00:00
Pragmatic Software
2c2b2c2e4b Truncate all messages beyond MAX_NICK_MESSAGES 2014-05-05 05:18:59 +00:00
Pragmatic Software
af447c2614 More nickometer tweaks 2014-05-02 03:57:19 +00:00
Pragmatic Software
8e07eb300e compiler_vm: add -Wshadow; support -include 2014-05-02 00:43:42 +00:00
Pragmatic Software
c1fa37f982 Tweaks to nickometer module 2014-05-01 23:20:15 +00:00
Pragmatic Software
a0b0cb8a74 Add nickometer module 2014-05-01 03:40:56 +00:00
Pragmatic Software
6de1023ee8 Use Getopt::Long to parse rq options 2014-04-30 21:37:28 +00:00
Pragmatic Software
cebcafba70 Do not allow RE2 to fallback to PCRE 2014-04-29 17:00:51 +00:00
Pragmatic Software
7fa458ab34 Do not expand me or remove trailing punctuation for factset/factchange 2014-04-29 04:05:20 +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
b35382109c Show random quotegrab: if nick_search begins with "#", assume they meant to specify channel_search 2014-04-28 01:52:49 +00:00
Pragmatic Software
96c57d80e5 Minor updates to various modules 2014-04-26 15:22:46 +00:00
Pragmatic Software
db66a47257 Update quotegrabs and factoids data 2014-04-26 15:21:00 +00:00
Pragmatic Software
ba8dc5195a Update PBot.html documentation 2014-04-26 15:20:38 +00:00
Pragmatic Software
f50fec1f90 Fix failed substitution of undefined variables 2014-04-26 15:19:55 +00:00
Pragmatic Software
76cd4965f1 compiler_vm: allow ()'s around function identifiers; e.g. int (main)(void) {} 2014-04-26 15:17:11 +00:00
Pragmatic Software
fc1e372908 Update C-Faq module to use latest questions and links 2014-04-22 15:10:10 +00:00
Pragmatic Software
6dabff19bb Fix ban evasion kicking 2014-04-21 07:26:06 +00:00
Pragmatic Software
8cd59b25da Fix chanop command execution, kick ban evaders 2014-04-19 10:38:16 +00:00
Pragmatic Software
b642460d84 Don't allow spaces in factoid keywords 2014-04-19 10:37:03 +00:00
Pragmatic Software
030fed38f2 Allow kicking from private message 2014-04-19 10:35:27 +00:00
Pragmatic Software
b3ab3bae8f Remove extraneous debug logging statements 2014-04-19 10:34:21 +00:00
Pragmatic Software
f003ff1178 Add unquote_spaces factoid module metadata to remove escaped quotes from quotemeta, and allow g modifier to modulelauncher_subpattern 2014-04-19 10:32:49 +00:00
Pragmatic Software
08e300bd54 compiler_vm: bump "Same output" length case to 22 to allow repetitions of "Success (no output)" 2014-04-07 07:24:14 +00:00
Pragmatic Software
f347c6d1e3 Update man.pl to use newer manpage, and minor formatting fixes 2014-04-07 05:12:00 +00:00
Pragmatic Software
7367e4f18c Include action_with_args in factoids export 2014-04-07 04:50:00 +00:00
Pragmatic Software
736056b586 compiler_vm: Don't display "Same output" unless length of output is greater than 10 characters 2014-04-03 07:54:35 +00:00
Pragmatic Software
8a7c539e0f compiler_vm: print "Same output" only if same output is within 10 minutes of last snippet otherwise print actual output again 2014-04-03 07:47:19 +00:00
Pragmatic Software
b2544d9d5a compiler_vm: remember last output per channel and print "Same output." if the current output matches the last output 2014-04-02 23:48:43 +00:00
Pragmatic Software
4e8aa560e8 Use proper letter-casing of nick in recall command results 2014-04-02 01:58:35 +00:00
Pragmatic Software
1ec463f021 compiler_vm: Remember last keyword when chaining together "and" statements in editor
This allows the more natural "replace 'a' with 'b' and 'c' with 'd'" syntax
rather than the previous syntax of "replace 'a' with 'b' and replace 'c' with 'd'"
2014-04-02 00:23:14 +00:00
Pragmatic Software
474f7ed168 Remove compiler_vm ability to execute .gdbinit commands 2014-03-24 15:37:54 +00:00
Pragmatic Software
f13adc1500 Fix derp in math.pl 2014-03-24 03:10:08 +00:00