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

70 Commits

Author SHA1 Message Date
Pragmatic Software
ddeef3cc62 Add support for GECOS 2016-02-10 03:42:42 -08:00
Pragmatic Software
17e4cdb8b3 Move Quotegrabs to Plugins 2015-09-08 11:42:43 -07:00
Pragmatic Software
adfdccfd27 Rename Pluggable to Plugins 2015-09-06 22:52:39 -07:00
Pragmatic Software
8d666984dc Move AntiAway and AntiKickAutoRejoin to Pluggable 2015-09-06 22:38:59 -07:00
Pragmatic Software
0d7f0bf184 Add loadable core plugins
These are different from the loadable factoid modules.  The factoid modules
are external executable shell commands that take stdin as arguments and print
to stdout as a return value.  As such, they are not integrated into the bot
and cannot make use of the bot's internal subroutines.

These plugins are loaded internally and integrated into the bot such that they
can interface with the bot's internal subroutines and state.

All files in the Pluggable directory not beginning with an underscore will be
automatically loaded at bot start-up.

Plugins (including those starting with an underscore) can be manually loaded
or unloaded with the `plug` and `unplug` commands.  Use `pluglist` to list
loaded plugins.
2015-09-06 22:17:07 -07:00
Pragmatic Software
2c6209b578 Use set_default to set default Registry values 2015-07-05 17:48:27 -07:00
Pragmatic Software
204f95cba7 Add "refresher" to allow PBot::Module subroutines to be reloaded during runtime 2015-06-15 19:55:46 -07:00
Pragmatic Software
5e94890c61 Increase bot's default admin level to 90
`rebuildaliases` command requires level 90 admin due to it's special
use-case.
2015-05-11 21:28:36 -07:00
Pragmatic Software
3776bef88a Reduce WHOIS queries when target joins multiple channels at once 2015-05-10 12:36:47 -07:00
Pragmatic Software
9a52fffcdd Rename ShitList to BlackList; minor refactor of IgnoreList 2015-03-16 21:08:25 -07:00
Pragmatic Software
e604767517 Add support for shitlisting hostmasks 2015-03-15 13:52:30 -07:00
Pragmatic Software
9f23aef2d0 Random IRC nicks cannot start with a digit 2015-02-14 04:01:09 -08:00
Pragmatic Software
8810605691 Show server:port when connecting 2015-01-23 05:35:06 -08:00
Pragmatic Software
7243832cc3 Improve connecting/nicking logic
Randomize nick when connecting and change to botnick after identifying.

Identify after receiving connection welcome message.

Ghost existing nick if it is already in use and then attempt to regain it.
2015-01-10 15:56:43 -08:00
Pragmatic Software
ecd2bad066 Add anti-kick-auto-rejoin module that temporarily kickbans offenders who immediately auto-rejoin after having been kicked 2014-12-28 00:44:15 +00:00
Pragmatic Software
e5909965f7 Move anti-away stuff to its own AntiAway.pm module; add /me actions to anti-away detection 2014-12-27 04:53:42 +00:00
Pragmatic Software
598e2e4988 Add NickList module to track nicks present in channels; dispatch pbot.join/pbot.part events when bot joins/parts channels 2014-11-15 01:18:33 +00:00
Pragmatic Software
d1e7abc175 Add event dispatcher module to allow modules to dispatch events and
to register handlers to listen for events.

Update IRCHandlers module to use new event dispatcher to dispatch
irc.events.  Update several modules to register with dispatcher
to listen for irc.events.

Improve handling of reconnection upon unexpected disconnection.

Todo: update more things to use new event dispatcher logic.
2014-11-01 00:15:21 +00:00
Pragmatic Software
068c6a0559 Add default handler for unhandled IRC events; ignore certain IRC events; improve handling of chan-op requests 2014-08-11 07:34:30 +00:00
Pragmatic Software
f463852093 Add registry entry to toggle debugging of IRC module 2014-05-31 01:03:42 +00:00
Pragmatic Software
548b4681ac Add %conf to all module creation; add deop timeout registry entry 2014-05-19 22:59:51 +00:00
Pragmatic Software
937282a114 Add more values to registry for antiflood and lagchecker 2014-05-19 02:42:18 +00:00
Pragmatic Software
020d512ee4 Minor indentation fix 2014-05-18 22:51:37 +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
bf4920b866 Set default identify_password to "none" to avoid empty value in registry 2014-05-18 00:30:51 +00:00
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
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
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
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
4a110848e9 Add SelectHandler class to register callbacks for selecting and reading handles; updating StdinReader to use SelectHandler 2014-03-14 05:51:15 +00:00
Pragmatic Software
80a29256ed Fix undefined variable $from when issuing commands from stdin 2014-03-07 16:50:35 +00:00
Pragmatic Software
5a61f57f3c Use Storable to save/load message history hash
Reuse config_dir/data_dir variable in pbot.pl
2014-02-05 01:10:56 +00:00
Pragmatic Software
416115f12f Ban timeouts hash converted to DualIndexHashObject to properly group masks by channels 2013-07-24 12:35:40 +00:00
Pragmatic Software
dc52430044 Add SSL support, and other misc updates 2013-02-25 02:27:24 +00:00
Pragmatic Software
876d9fb5c6 Improved grab command to accept regex for history 2012-08-01 09:57:43 +00:00
Pragmatic Software
44ba3001cb Updated mode +q list tracking to updated freenode syntax; added ban whitelist (for evasion allowing) 2011-12-11 22:56:57 +00:00
Pragmatic Software
3c6288920e Added channel ban tracking 2011-02-13 05:07:02 +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
805832d977 pbot: allowed bot trigger to be customizable from pbot.pl; bot registry coming soon... 2011-01-30 03:22:00 +00:00
Pragmatic Software
8983a53732 pbot: slightly improved readability/flow of PBot.pm 2011-01-26 10:13:06 +00:00
Pragmatic Software
aaa261b66e pbot: correct default config directory 2011-01-26 10:04:55 +00:00
Pragmatic Software
e6e89023a0 pbot: made PBot.pm more readable and concise 2011-01-26 09:40:08 +00:00
Pragmatic Software
45a2a66d0f Moved lag-checking code to LagChecker.pm; improved output of !lagcheck command 2011-01-24 23:56:55 +00:00
Pragmatic Software
b11b660929 antiflood/pbot: added basic support for lag detection 2011-01-22 09:26:04 +00:00
Pragmatic Software
e3655749fd Added Net::IRC as PBot::IRC in order to support PONG events and possible future customisation 2011-01-22 08:35:31 +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
547087b81d Corrected join flood to get correct time distance between join messages 2010-06-19 19:19:56 +00:00