Provides an interface for filtering commands. More...
Inherited by IrcQmlFilter, and IrcQmlFilter.
Public Member Functions | |
virtual | ~IrcCommandFilter () |
virtual bool | commandFilter (IrcCommand *command)=0 |
IrcCommandFilter may be used to intercept commands before they get sent further. In order to use IrcCommandFilter, it must be installed via IrcConnection::installCommandFilter().
Command filtering can be useful doing extra tasks for specific type of commands. The following example sends a PING command after each PRIVMSG command. A consequent PONG reply from the server verifies that the PRIVMSG has been also processed.
|
inlinevirtual |
Destructs the command filter.
The command filter is automatically removed from any connection(s) it is installed on.
|
pure virtual |
Reimplement this function to filter commands to installed connections.
Return true
to filter the command out, i.e. stop it being handled further; otherwise return false
.