/[projects]/smsdaemon/plugins/SpamPlugin.cpp
ViewVC logotype

Diff of /smsdaemon/plugins/SpamPlugin.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 195 by torben, Mon Dec 8 21:49:49 2008 UTC revision 196 by torben, Thu Dec 18 06:53:29 2008 UTC
# Line 12  using namespace std; Line 12  using namespace std;
12    
13    
14  SpamPlugin::SpamPlugin()  SpamPlugin::SpamPlugin()
15  : Plugin("spam", "Sends a number of messages to a given phone nr")                  : Plugin("spam", "Sends a number of messages to a given phone nr")
16  {  {
17  }  }
18    
# Line 28  void SpamPlugin::Execute(ISmsTransceiver Line 28  void SpamPlugin::Execute(ISmsTransceiver
28                  modem.SendSms(sms.GetSender(), USAGE, false);                  modem.SendSms(sms.GetSender(), USAGE, false);
29                  return;                  return;
30          }          }
31            
32          vector<string> parts = Util::str_split(cmd," ");          vector<string> parts = Util::str_split(cmd," ");
33    
34    
# Line 42  void SpamPlugin::Execute(ISmsTransceiver Line 42  void SpamPlugin::Execute(ISmsTransceiver
42          unsigned int count = atoi(parts[1].c_str());          unsigned int count = atoi(parts[1].c_str());
43          if (count > 25)          if (count > 25)
44                  count = 25;                  count = 25;
45            
46          ostringstream os;          ostringstream os;
47          os << "Spamming " << nr << " " << count << " times.";          os << "Spamming " << nr << " " << count << " times.";
48          Logger::logMessage(os.str());          Logger::logMessage(os.str());

Legend:
Removed from v.195  
changed lines
  Added in v.196

  ViewVC Help
Powered by ViewVC 1.1.20