- if (*Config->DieValue)
- {
- printf("WARNING: %s\n\n",Config->DieValue);
- this->Log(DEFAULT,"Died because of <die> tag: %s",Config->DieValue);
- Exit(ERROR);
- }
+ std::string copy_text = text;
+
+ int MOD_RESULT = 0;
+ FOREACH_RESULT_I(this, I_OnWhoisLine, OnWhoisLine(user, dest, numeric, copy_text));
+
+ if (!MOD_RESULT)
+ user->WriteServ("%d %s", numeric, copy_text.c_str());
+}
+
+void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...)
+{
+ char textbuffer[MAXBUF];
+ va_list argsPtr;
+ va_start (argsPtr, format);
+ vsnprintf(textbuffer, MAXBUF, format, argsPtr);
+ va_end(argsPtr);
+
+ this->SendWhoisLine(user, dest, numeric, std::string(textbuffer));