hoaproject/Irc

Allow to add new command in Client::_run

marmotz opened this issue · 4 comments

For now, the only way to add commands in Client::_run is to extends this method, reparse message and call parent for base message.

Please provide a simple way to add custom commands (or/and implement all the base commands, see #14).

A good solution should be to add an empty method in Client (by exemple "manageCustomCommand") and call it in default case.

Irc/Client.php

Lines 213 to 218 in 9024ef7

default:
$listener = 'other-message';
$bucket = [
'line' => $line,
'parsed_line' => $matches
];
is not enough?

well... no :)

@marmotz Why? This is the flexibility you were waiting for.

maybe...