Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added some testing methods to view the queue and trigger the batch job

  • Loading branch information...
commit 459d23264e5da7697a95fce429566c7e2474b36b 1 parent e21aa05
@d0ugal d0ugal authored
Showing with 18 additions and 2 deletions.
  1. +18 −2 mailer.cpp
View
20 mailer.cpp
@@ -180,6 +180,20 @@ class CMailer : public CModule {
CString message = "Testing";
MessagesList.push_front(message);
BatchSend();
+ } else if (action == "testshowqueue"){
+
+ list<CString>::iterator it;
+
+ CString message;
+
+ for ( it=MessagesList.begin() ; it != MessagesList.end(); it++ ){
+ DebugPrint(*it);
+ }
+
+ } else if (action == "testbatchsend"){
+
+ BatchSend();
+
}
}
@@ -191,6 +205,9 @@ class CMailer : public CModule {
CString message = "<" + location + ":" + Nick.GetNick() + "> " + sMessage + "\n\n";
MessagesList.push_front(message);
+ DebugPrint("Added message...");
+ DebugPrint(message);
+
if (MessagesList.size() > MaxNotifications){
MessagesList.pop_back();
}
@@ -259,11 +276,10 @@ class CMailer : public CModule {
return;
}
- DebugPrint(sMessage);
-
fprintf(email, "%s", (char*) sMessage.c_str());
pclose(email);
+ DebugPrint(sMessage);
DebugPrint("Sent");
}
Please sign in to comment.
Something went wrong with that request. Please try again.