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

68 Commits

Author SHA1 Message Date
Pragmatic Software
9243a40228 Track and remember channel modes and topicinfo 2018-08-05 22:47:38 -07:00
Pragmatic Software
d6715fad8d Do not infinitely WHO empty/non-channels 2018-08-03 13:38:28 -07:00
Pragmatic Software
772ea03ddf NickList now tracks user modes as metadata 2018-08-03 12:31:45 -07:00
Pragmatic Software
55347ea463 Sort Dumper output by keys 2018-02-28 11:13:56 -08:00
Pragmatic Software
1b70de807b Change split / / to split /\s+/ throughout 2017-09-02 00:39:29 -07:00
Pragmatic Software
b932fe73eb Move WHO stuff to IRCHandlers.pm 2017-08-01 21:35:56 -07:00
Pragmatic Software
f3620ddd90 Normalize /session hostmasks 2017-06-19 18:21:47 -07:00
Pragmatic Software
fa854c087f Normalize x-random hostmasks with user field to not pollute message database
Significant optimizations to message database structure and queries
2017-06-18 03:40:51 -07:00
Pragmatic Software
29f6510ec2 Check for existing temp ban before temp-banning 2017-05-23 17:05:25 -07:00
Pragmatic Software
2d85b14b2e Add ircd config mapping; automatically unban certain types of bans after 7 days 2017-05-21 02:20:44 -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
d47edc100b Improve robustness of message history tracking 2016-12-01 04:57:25 -08:00
Pragmatic Software
bbf45a3fab Fix potential channel name case-sensitivity issues; misc minor fixes 2016-11-29 01:44:31 -08:00
Pragmatic Software
2c554328c9 Whoops, do check-bans on join for unidentified users as well when extended-join capability is active 2016-08-30 02:14:21 -07:00
Pragmatic Software
1442485d0b Support account-notify and extended-join capabilities 2016-08-28 03:49:27 -07:00
Pragmatic Software
857d1aa0d3 Refactor message account linking
Linking of message accounts is now significantly less likely to produce
false-positives.

Previously, any hostmasks with matching nick!*@* would be strongly linked
together.  This led to falsely-linking accounts, either inadvertently or
intentionally.

For example, Bob might also be known as Bob_ and Bobby,
but primarily uses Bob as his main nick.  Somebody else might join with
Bobby and end up being linked to Bob.  Now both Bob and the new Bobby are
linked together as the same person, but likely with different *!user@host.

Now if the new Bobby ever gets banned, then Bob will also end up being
banned for evading Bobby's ban.

This was a sore spot in the previous linking implementation.

This new implementation has several adjustments to more intelligently link
accounts only when they're proven beyond a reasonable doubt to be the same
person (e.g. by matching nickserv accounts, etc).

Consequently, rather than aggressively linking accounts and catching more
ban-evaders at the risk of potentially falsely-linking accounts and falsely
detecting innocent people as ban-evaders, this new implementation will instead
link accounts more reliably at the risk of potential ban-evaders not yet being
linked together and thus being able to evade a ban.

This is a more preferable and reasonable risk.  Active channel ops should be
able to catch any obnoxious ban-evaders that slip through this net.
2016-08-17 20:34:45 -07:00
Pragmatic Software
de856f3887 Now joins channel if /invited (and channel is registered and enabled) 2016-07-01 13:01:34 -07:00
Pragmatic Software
e5097eee69 Move URL titles to UrlTitles.pm plugin
Add $event->{interpreted} field to events to notify other handlers
whether an event was successfully interpreted by the interpreter.

An $event->{interpreted} that is equal to or greater than 100 means the entire
message was consumed and handlers shouldn't do any further processing of it
that would generate any output to channels or users.

Otherwise, $event->{interpreted} is incremented by 1 for each referenced
command that was processed.
2015-09-08 01:37:34 -07:00
Pragmatic Software
16f467252b Do not process server NOTICES as public messages
Add time-out to automatically unban ##fix_your_connection ban-forwards
2015-09-06 22:04:21 -07:00
Pragmatic Software
8e1f008f9b Redirect NOTICEs as public messages (anti-flood, command parsing, etc) 2015-09-03 20:46:12 -07:00
Pragmatic Software
154b46194f Use comma-separated list of channels when auto-joining to reduce IRC commands 2015-07-28 17:47:53 -07:00
Pragmatic Software
09c7437246 Use can_gain_ops/has_un[ban,mute]_timeout subroutines 2015-06-25 20:55:42 -07:00
Pragmatic Software
d0ebf98441 Automatically unmute +q'd offenders after mute_timeout (7 days) 2015-05-27 10:46:30 -07:00
Pragmatic Software
cdb84a8602 Link nick-changes to original nick's account instead of new nick's 2015-05-22 04:24:38 -07:00
Pragmatic Software
3892295bf1 Wait for nick-change to botnick before joining to prevent joining with random nick 2015-05-12 22:51:04 -07:00
Pragmatic Software
7599fb0c19 Correct handling of bot trigger in /msg since earlier commit allowing trigger to be a regex 2015-03-27 13:00:43 -07:00
Pragmatic Software
7970018777 Improve handling of nick-change flood 2015-03-11 02:00:10 -07:00
Pragmatic Software
386e03c184 Add stayloggedin field to admin accounts to prevent logging out when /parting or /quitting 2015-03-04 00:39:44 -08:00
Pragmatic Software
559b9ddde1 Use NickList instead of MessageHistory for target channels 2015-02-14 04:03:39 -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
a09d3c1d63 Add permop channel flag; when non-zero bot automatically ops itself when joining channel, otherwise bot ops itself only when needing to perform an op command and then deops itself after its deop timeout has elapsed 2014-12-18 08:46:13 +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
a679b0ff15 Improve handling of KICK events wrt to message history 2014-10-14 02:32:22 +00:00
Pragmatic Software
654cce66a5 Improve check for ban-evasion when nick-change is detected 2014-08-12 05:51: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
2fd23c7222 Ghost nick through NickServ if already on server 2014-06-01 21:33:31 +00:00
Pragmatic Software
4696df7ea1 Add subroutines to release and identify nick if necessary 2014-05-31 01:07:29 +00:00
Pragmatic Software
c2089562c5 Add registry entry for ChanServ ban timeout 2014-05-23 05:03:54 +00:00
Pragmatic Software
937282a114 Add more values to registry for antiflood and lagchecker 2014-05-19 02:42:18 +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
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
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
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
416115f12f Ban timeouts hash converted to DualIndexHashObject to properly group masks by channels 2013-07-24 12:35:40 +00:00
Pragmatic Software
0f234734b8 Prepend "/me" to ACTION messages; update Quotegrabs to recognize "/me" messages 2013-06-04 17:09:30 +00:00