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 |
|
|
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 |
|
|
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()); |