Comment 3 for bug 190469

Revision history for this message
MikeJJ (mrmikejj) wrote :

I've seen quite a few multiline kick messages (mainly from hubs abusing the filter to spam the status bar with advertisements.

Could do with a little advice for the cleaner solution . . . i assumed you mean sending messages like:
fire(ClientListener::Message(), this, ClientListener::MESSAGE, unescape(message), *ou);
fire(ClientListener::Message(), this, ClientListener::STATUS_MESSAGE, unescape(line));
fire(ClientListener::Message(), this, ClientListener::SILENT_STATUS_MESSAGE, unescape(line));

(I had to swap the order for normal messages from "user, message" to "message, user").
But I fail at finding a working default for OnlineUser& for when that doesn't get passed (i.e. from the StatusMessages).

virtual void on(Message, Client*, MessageType messageType, const string&, const OnlineUser& = NULL, bool = false) throw() { }
(It doesn't like NULL)
./dcpp/ClientListener.h:47: error: default argument for parameter of type 'const dcpp::OnlineUser&' has type 'int'

Or am i going about this all wrong ?