Ticket #14 (closed task: fixed)

Opened 5 years ago

Last modified 5 years ago

Command

Reported by: tobias382 Owned by: tobias382
Priority: high Component: plugins
Version: 1.0.2 Severity: normal
Keywords: Cc:

Description (last modified by tobias382) (diff)

This would be an abstract plugin with an onPrivmsg event handler that parses the contents of the incoming message for a command and an optional set of accompanying parameters and then calls onDoCOMMANDNAME and passes the parameters via call_user_func_array. This provides for an easy method of maintaining user-issued commands and registering commands with the bot so it can avoid (or at least warn the user of) redundant handling of the same command by multiple plugins.

Change History

  Changed 5 years ago by tobias382

  • description modified (diff)

AdminCommand? should extend this class and override onPrivmsg to do an isAdmin check, then call the onPrivmsg implementation in the parent class. Quit should be updated to take advantage of the new command handler methods.

follow-up: ↓ 3   Changed 5 years ago by tobias382

In onPrivmsg check, the message text should be checked to ensure that it begins with the bot's nick followed by an optional colon and then one or more spaces.

in reply to: ↑ 2   Changed 5 years ago by tobias382

Replying to tobias382:

In onPrivmsg check, the message text should be checked to ensure that it begins with the bot's nick followed by an optional colon and then one or more spaces.

Correction, this should be the case for AdminCommand? when it is modified to use Command, not for Command itself.

  Changed 5 years ago by tobias382

  • status changed from new to closed
  • resolution set to fixed

(In [24]) Fixes #14 * Added plugin short name retrieval and configuration namespacing methods to the base event handler class * Added Command class, modified AdminCommand? to extend it, and modified Quit and JoinPart? to use it * Updated Cron, Nickserv, RSSParser, and Autojoin to use the new configuration namespacing features * Removed a debugging echo left in the Users::onResponse method

  Changed 5 years ago by tobias382

  • status changed from closed to reopened
  • resolution fixed deleted

This needs to check for default values and use them when argument values aren't provided. It should also not call the handler method if the argument counts do not match, rather than simply substituting explicit NULL values for arguments that aren't provided.

  Changed 5 years ago by tobias382

  • priority changed from normal to high

  Changed 5 years ago by tobias382

  • version changed from 1.1 to 1.0.2

  Changed 5 years ago by tobias382

  • status changed from reopened to closed
  • resolution set to fixed

(In [60]) Fixes #1, #8, #14, #10, #13 * Fixed some parameter parsing issues in the streams driver and Command plugin * Fixed an issue in the streams driver where quitting would not cause the

connection to be terminated on the client side

* Added automated directory creation to the event handler class * Added isInChannel() and TYPE_KICK to request event class * Modified the bootstrap file to use a full path when referencing the Plugin

directory and to include plugin loading debugging messages

* Fixed a bug in the bootstrap file where it would not produce an error when

required configuration settings existed, but were empty

* Cleared default values and unused settings out of the config file * Made modifications to the fromAdmin method in the AdminCommand? plugin to

optimize performance

* Fixed a bug in the parsing logic in the Acronym plugin and added a check for

instances where the per-IP bandwidth limit has been executed

* Added a check for cases where a server has no MOTD to the Autojoin plugin * Modified the Drink plugin to filter coffee drinks when scraping data for the

coke table and to remove the profanity filter array from memory once the init method is done using it

* Added an avogadro alias for the mole fixed karma and added support for

configurable fixed karma for the bot

* Modified the Logging plugin to extend the Command plugin and to use PDO in

place of the standalone SQLite driver

* Modified the Php plugin to use full URLs to function pages rather than the

shorthand version, which does not always resolve to the expected URL

* Renamed the Say plugin to Puppet and added support emulation of CTCP ACTION

commands

* Modified the Url plugin to use the MIME type of the resource in place of

the title in cases where it is not HTML-based

* Fixed an issue with the parsing logic in the onMode handler of the Users

plugin

* Uncommented the onPrivmsg handler and modified it to use the new debug

configuration setting

* Added alternate nick support to the Nickserv plugin * Removed the CONTRIBUTE file, as its fairly out of date

Note: See TracTickets for help on using tickets.